Aircrack compilation errors

Discussion in 'Mac Apps and Mac App Store' started by Jethryn Freyman, Mar 11, 2009.

  1. Jethryn Freyman macrumors 68020

    Jethryn Freyman

    Joined:
    Aug 9, 2007
    Location:
    Australia
    #1
    Tried to compile the latest version of aircrack-ng today (1.00 rc2.)

    There seems to be a few errors in the aircrack-ng.h file that prevent me from compiling it.

    Code:
    laptop:aircrack-ng-1.0-rc2 jethryn$ make install
    make -C src install
    make -C osdep
    Building for Darwin
    gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fPIC -I..    -c -o osdep.o osdep.c
    gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fPIC -I..    -c -o network.o network.c
    gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fPIC -I..    -c -o dummy.o dummy.c
    gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fPIC -I..    -c -o dummy_tap.o dummy_tap.c
    ar cru libosdep.a  osdep.o network.o dummy.o dummy_tap.o
    ranlib libosdep.a 
    touch .os.dummy
    Your platform is unsupported
    touch .os.Darwin
    gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -Iinclude   -c -o aircrack-ng.o aircrack-ng.c
    gcc -g -W -Wall -Werror -O3 -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -Iinclude   -c -o crypto.o crypto.c
    In file included from crypto.c:26:
    aircrack-ng.h:230: error: syntax error before ‘pthread_cond_t’
    cc1: warnings being treated as errors
    aircrack-ng.h:230: warning: no semicolon at end of struct or union
    aircrack-ng.h:231: warning: type defaults to ‘int’ in declaration of ‘mutex’
    aircrack-ng.h:231: warning: data definition has no type or storage class
    
    Lines 230-232 of aircrack-ng.h are below:
    Code:
    pthread_cond_t cond;			/* condition for waiting when buffer is full until keys are tried and new keys can be written */
    	pthread_mutex_t mutex;
    };
    Does anybody know how I should go about fixing this?

    I am using the software for legitimate, legal purposes, in case you were wondering.
     
  2. boast macrumors 65816

    boast

    Joined:
    Nov 12, 2007
    Location:
    Phoenix
    #2
    any specific reason you don't install it from macports instead?
     
  3. Jethryn Freyman thread starter macrumors 68020

    Jethryn Freyman

    Joined:
    Aug 9, 2007
    Location:
    Australia
    #3
    Thanks for the answer, but Macports has only got the old version, which compiles fine for me.
     
  4. Jethryn Freyman thread starter macrumors 68020

    Jethryn Freyman

    Joined:
    Aug 9, 2007
    Location:
    Australia
    #4
    Same problem installing on another Mac.

    Does anybody have any experience fixing this error? It looks to be caused by a piece of incorrect code in the source.
     
  5. AlainM macrumors newbie

    Joined:
    Mar 22, 2009
    Location:
    Belgium
    #5
    Jethryn - I had the very same problem, and managed to get it to compile by adding #include <pthread.h> to aircrack-ng.h

    So, the first lines of aircrack-ng.h should look like:

    Code:
    #ifndef _AIRCRACK_NG_H
    #define _AIRCRACK_NG_H
    
    #include <stdint.h>
    #include <stdio.h>
    #include <pthread.h>
    #include "aircrack-ptw-lib.h"
    
    BTW - this is my very first post on macrumors - hope it helps :)

    Cheers
    Alain
     
  6. jw2002 macrumors 6502

    Joined:
    Feb 23, 2008
    #6
    Aside from proof of concept is there any utility to having aircrack on an iphone/ipod? Without something like airodump or aireplay the iphone/ipod is pretty much a crippled solution for WEP analysis purposes. After all if you are collecting packets on another computer, that same computer can probably execute aircrack-ng 4-5x faster than an iphone.
     
  7. AlainM macrumors newbie

    Joined:
    Mar 22, 2009
    Location:
    Belgium
    #7
    You're absolutely right, of course.

    It's actually when compiling the latest version of aircrack-ng for Leopard that I ran into the odd problem that Jethryn described.
     
  8. Jethryn Freyman thread starter macrumors 68020

    Jethryn Freyman

    Joined:
    Aug 9, 2007
    Location:
    Australia
    #8
    It helped a lot - it compiles perfectly now.

    Thank you!
     

Share This Page