Ticket #687 (closed enhancement: fixed)

Opened 11 months ago

Last modified 5 months ago

Fix for OSX (little/big endian conversion functions)

Reported by: Alejandro Leiva <gloob@…> Owned by:
Priority: minor Milestone:
Component: osdep Version: trunk
Keywords: Cc:

Description

Hi,

I made a patch for clean compiling on OSX (tested on 10.6 but probably will work in any 10.x version). Now use the current api for little/big endian conversion functions. Now only need to add a macro to common.mak for detect apple architecture and add -arch i386 (maybe adding this flag in general conf would work in all archs)

Attachments

byteorder.patch Download (2.4 KB) - added by Alejandro Leiva <gloob@…> 11 months ago.
force-32bit-on-darwin.diff Download (281 bytes) - added by Kyle Fuller <inbox@…> 10 months ago.
Make sure that we compile aircrack-ng as 32bit on Darwin
sha1-sse2.patch Download (3.0 KB) - added by bushing@… 8 months ago.
patch to fix compilation on x86_64

Change History

Changed 11 months ago by Alejandro Leiva <gloob@…>

  Changed 11 months ago by Alejandro Leiva <gloob@…>

in all i386 architectures i mean :)

  Changed 11 months ago by misterx

Is there a way to get the version of OSX or the API (via a define)?

  Changed 11 months ago by Alejandro Leiva <gloob@…>

[http]://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html

using Availability.h (>10.6) or AvailabilityMacros?.h (>10.2)

other way should be using the sysctl API (third method in the document) [http]://cocoadevcentral.com/articles/000067.php

Also I check that we can use LITTLE_ENDIAN and BIG_ENDIAN to define LITTLE_ENDIAN and BIG_ENDIAN at byteorder.h

  Changed 11 months ago by Alejandro Leiva <gloob@…>

Another way is to use CMake to build the software it provide a bunch of useful defines and macros automatically. Reviewing the makefiles I think should not be difficult.

Changed 10 months ago by Kyle Fuller <inbox@…>

Make sure that we compile aircrack-ng as 32bit on Darwin

in reply to: ↑ description   Changed 10 months ago by Kyle Fuller <inbox@…>

Replying to Alejandro Leiva <gloob@…>:

Now only need to add a macro to common.mak for detect apple architecture and add -arch i386 (maybe adding this flag in general conf would work in all archs)

I have attached a file to do that, I now have aircrack-ng successfully compiling on Snow Leopard.

Changed 8 months ago by bushing@…

patch to fix compilation on x86_64

  Changed 8 months ago by bushing@…

Forcing the build to be 32-bit is the wrong solution; it doesn't really address the problem. A little bit of searching turned up  hxxp://www.mail-archive.com/fink-commits@lists.sourceforge.net/msg81390.html, which I modified slightly and attached to this bug; it should be used instead of force-32bit-on-darwin.diff.

  Changed 8 months ago by misterx

  • component changed from patches to osdep

What does %rip do?

  Changed 7 months ago by misterx

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1657.

  Changed 5 months ago by gstu@…

Don't worry about defining macros to common.mak if this is easier. Just compile with the command

$ make CC="gcc -arch i386"

and all occurrences of gcc will be replaced accordingly when compiling on a Mac

Add/Change #687 (Fix for OSX (little/big endian conversion functions))

Author


E-mail address and user name can be saved in the Preferences.


Action
as closed
The resolution will be deleted. Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.