#22 Does not compile on Mac

Steven Ross

Hi, not sure if this is a bug or by design and I posted this already in Open Discussion, but it says the best way to get help is to open a bug, so here goes...

I downloaded rcracki_mt_0.6.5.2_src and the readme lists Mac OS X as supported platform and the INSTALLING file says:
"Mac OSX users Depending upon your version and installed dev tools make may be sufficient but if it fails then run gmake."

Usually I compile software with 3 steps:
make install

I have to admit, I'm not a developer and I follow these steps kind of blindly from instructions I found on a Mac blog. Usually this works fine, but I wouldn't be able to adjust the steps on my own if problems arise. With rcracki ./configure gives a "No such file or directory" error and make gives:
g++ -Wall -ansi -O3 -mtune=native -c BaseRTReader.cpp
BaseRTReader.cpp:1: error: bad value (native) for -mtune= switch
make: *** [BaseRTReader.o] Error 1

gmake gives: "-bash: gmake: command not found". I have the Xcode 3.1.4 developer tools installed on a PowerMac G5 running Mac OS X 10.5.8. Am I doing something wrong or is rcracki not compatible?


  • James Nobis

    James Nobis - 2011-04-20

    Remove -mtune=native from the Makefile and you should be ready to run make. Apparently, I should look into which versions of gcc/g++ support the flag and on which systems as I'm finding more and more that do not.

  • Steven Ross

    Steven Ross - 2011-04-21

    Thanks, it seemed to compile fine, although I got this during compilation:

    ChainWalkSet.cpp: In member function ‘bool CChainWalkSet::FindInFile(long long unsigned int*, unsigned char*, int)’:
    ChainWalkSet.cpp:151: warning: ‘offset’ may be used uninitialized in this function

    Now when I try to run it, it produces this:

    Using 1 threads for pre-calculation and false alarm checking...
    Found 40 rainbowtable files...

    reading index... 46227852 bytes read, disk access time: 1.51 s
    rcracki_mt(3677) malloc: *** mmap(size=3174916096) failed (error code=12)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    (last 3 lines repeat many times with decreasing mmap size)
    rcracki_mt(3677) malloc: *** mmap(size=2352832512) failed (error code=12)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    reading table...

    At that point, my computer became almost unresponsive and I had to quit (Ctrl-c) the process.

  • Steven Ross

    Steven Ross - 2011-04-21

    BTW, these tables work fine when running with rcracki_mt on another computer.

  • James Nobis

    James Nobis - 2011-05-15

    In the git repository (http://gitorious.org/freerainbowtables-applications/freerainbowtables) I've corrected the warning.

    The rest of that says memory allocation is failing. The code is suppose to catch the failed allocation, without anything displayed, and will retry with smaller sizes until it succeeds. This also likely means the free memory detection code isn't quite right on OSX.

    That first allocation failure is it trying to allocate 3 GiB. It shouldn't ever try to allocate that much.

    Is this 32-bit or 64-bit OSX? Can you paste the output of:
    uname -a
    file rcracki_mt (the built binary)
    vmstat -a
    g++ -v

    Would you please try the latest beta source release http://freerainbowtables.com/download/rcracki_mt_0.6.6_beta1_src.7z

  • James Nobis

    James Nobis - 2011-05-27

    From a forum thread, http://www.freerainbowtables.com/phpBB3/topic2830.html, I have reports of a OSX user having no build issues for rcracki_mt_0.6.5.2 or rcracki_mt_0.6.6_beta2_src.7z. Additionally, they report runs across an md5 set without issue. They are on OS X10.6.7, Imac intel I7, running in "32-bit mode" and have tried "64-bit mode" and both 64-bit builds and 32-bit builds.

    I'm curious what you get with the newer beta release as well as what differences are contributing to your problems. The build issues seem like an older OSX or Xcode dev tools. The issues in execution could be specific to a given algorithm like SHA.

  • James Nobis

    James Nobis - 2011-05-27
    • assigned_to: nobody --> quelrod
  • James Nobis

    James Nobis - 2011-07-18

    *oh* PowerMac

    Right now the code only works on little endian platforms like x86/x86_64/arm

  • James Nobis

    James Nobis - 2011-07-18
    • status: open --> closed-duplicate

Log in to post a comment.