Reputation: 3187
I am on MAC 10.9 with XCode 4.6.3 and have command line tools installed
I am trying to compile pycrypto-2.1.0 using python setup.py build and getting following error
----------------------------------------------------------------------------- ld: warning: ignoring file build/temp.macosx-10.6-intel-2.7/src/MD2.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-2.7/src/MD2.o ld: file not found: /usr/lib/system/libdnsinfo.dylib for architecture i386 collect2: ld returned 1 exit status ld: file not found: /usr/lib/system/libdnsinfo.dylib for architecture x86_64 collect2: ld returned 1 exit status ------------------------------------------------------------------------------------
locate is giving
$ locate libdnsinfo.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib/system/libdnsinfo.dylib /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/system/libdnsinfo.dylib /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk/usr/lib/system/libdnsinfo.dylib
These path are also added to PATH.
Following is command and error
$ python setup.py build running build running build_py running build_ext warning: GMP library not found; Not building Crypto.PublicKey._fastmath. building 'Crypto.Hash.MD2' extension gcc-4.2 -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/ -O3 -fomit-frame-pointer -Isrc/ -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/MD2.c -o build/temp.macosx-10.6-intel-2.7/src/MD2.o gcc-4.2 -bundle -undefined dynamic_lookup -arch i386 -arch x86_64 -g -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/lib -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/ -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/c++/4.2.1/ build/temp.macosx-10.6-intel-2.7/src/MD2.o -o build/lib.macosx-10.6-intel-2.7/Crypto/Hash/MD2.so ld: warning: ignoring file build/temp.macosx-10.6-intel-2.7/src/MD2.o, file was built for unsupported file format ( 0xcf 0xfa 0xed 0xfe 0x 7 0x 0 0x 0 0x 1 0x 3 0x 0 0x 0 0x 0 0x 1 0x 0 0x 0 0x 0 ) which is not the architecture being linked (i386): build/temp.macosx-10.6-intel-2.7/src/MD2.o ld: file not found: /usr/lib/system/libdnsinfo.dylib for architecture i386 collect2: ld returned 1 exit status ld: file not found: /usr/lib/system/libdnsinfo.dylib for architecture x86_64
Any idea to fix this?
Upvotes: 1
Views: 3241
Reputation: 831
Use libdns_services instead, libdnsinfo.dylib is no more supported by latest sdk.
Upvotes: 0
Reputation: 66
Faced same issue in eclipse Following worked for me:
1) Find location of lib
locate libdnsinfo.dynlib
2) Copy and paste location to
project > properties > C/C++ Build > Settings > MacOS X C Linker > Libraries > Library Search Path
Upvotes: 0
Reputation: 51
I ran into this issue as well after upgrading to osx 10.9 while attempting to link in openssl libraries to a simple c application.
The quick solution that worked for me is to link one of the libdnsinfo files into /usr/lib/system
ex:
ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/lib/system/libdnsinfo.dylib /usr/lib/system/libdnsinfo.dylib
Upvotes: 0