Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MayPeng

macrumors member
Original poster
Nov 21, 2010
53
0
I download libusb-1.0.8 from sourceForge net. It is installed as x86_64 by default. But I need it to install as i386 .How can i do?
ps. My mac doesn't support 64bit kernel and Extensions.
 
The -arch command-line switch to GCC selects which architectures are to be targeted when compiling. -arch x86_64 will compile 64-bit. -arch i386 will compile 32-bit.

Try exporting a CFLAGS environment variable before running configure.

Code:
[b]$[/b] export CFLAGS='-arch i386'
[b]$[/b] ./configure
 
There is a good chance you will need LDFLAGS set to the same thing. And depending on the makefile you might need other flags for C++ sources.
 
The -arch command-line switch to GCC selects which architectures are to be targeted when compiling. -arch x86_64 will compile 64-bit. -arch i386 will compile 32-bit.

Try exporting a CFLAGS environment variable before running configure.

Code:
[b]$[/b] export CFLAGS='-arch i386'
[b]$[/b] ./configure

Resolve the problem.Thank you!
But mac pc must support '64bit kernel and extensions', or set CFLAGS = i386 ,it still installs as x86_64.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.