I have followed several threads around the new ENABLE_BITCODE setting in Xcode, have also tried as much as I can (admitted I'm not a xcode pro) but still cannot get the project to compile for use on my test phone?
My app runs fine on the simulator but I cannot deploy it onto my iPhone for testing. On latter one I just installed iOS 9 beta.
Now, here is the error message I receive. It appears the setting does not impact the PARSE.com lib, that is part of my project? How can I get my project to deploy onto my phone? Thanks for any advice.
Ld /Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti- bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods/Parse.framework/Parse normal armv7
cd /Users/xxxxxx/Documents/DigitalTempusDev/graffiti/Pods
export IPHONEOS_DEPLOYMENT_TARGET=8.0
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods -L/Users/xxxxxx/Documents/DigitalTempusDev/graffiti/Pods/Parse -F/Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods -filelist /Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Intermediates/Pods.build/Debug-iphoneos/Pods-Parse.build/Objects-normal/armv7/Parse.LinkFileList -install_name #rpath/Parse.framework/Parse -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -miphoneos-version-min=8.0 -dead_strip -fembed-bitcode-marker -ObjC -lParseLib -lz -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework Social -ObjC -fobjc-arc -fobjc-link-runtime -framework AudioToolbox -framework Bolts -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework Foundation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -single_module -compatibility_version 1 -current_version 1 -Xlinker -dependency_info -Xlinker /Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Intermediates/Pods.build/Debug-iphoneos/Pods-Parse.build/Objects-normal/armv7/Parse_dependency_info.dat -o /Users/xxxxxx/Library/Developer/Xcode/DerivedData/graffiti-bnmizxueojwiqcbbnsvilljhosrw/Build/Products/Debug-iphoneos/Pods/Parse.framework/Parse
---
ld: warning: -weak_framework is treated as -framework when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES). Weak linking may still happen based on availability mark-up in headers
ld: warning: -weak_framework is treated as -framework when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES). Weak linking may still happen based on availability mark-up in headers
ld: '/Users/xxxxxx/Documents/DigitalTempusDev/graffiti/Pods/Parse/libParseLib.a(PFSQLiteDatabase.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Are you sure you've selected Enable Bitcode to NO against build config you're using (eg DEBUG)? You can check it out in project->target->build settings-> search enable bitcode->set NO in DEBUG (good to remember to try to update libs before test release, maybe it'll contain bitcode already). Then Edit Scheme -> Run -> check if you have DEBUG config atm.
Note that for projects using CocoaPods you should set ENABLE_BITCODE = NO on both the project and the Pods container project targets.
This error
Ld /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos/ParseTwitterUtils.framework/ParseTwitterUtils normal arm64
cd /Users/maximveksler/Developer/ParseUI-iOS/Pods
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode-beta.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode-beta.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -dynamiclib -isysroot /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk -L/Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos -L/Users/maximveksler/Developer/ParseUI-iOS/Pods/ParseTwitterUtils -F/Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos -filelist /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Intermediates/Pods.build/Debug-iphoneos/ParseTwitterUtils.build/Objects-normal/arm64/ParseTwitterUtils.LinkFileList -install_name #rpath/ParseTwitterUtils.framework/ParseTwitterUtils -Xlinker -rpath -Xlinker #executable_path/Frameworks -Xlinker -rpath -Xlinker #loader_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -fembed-bitcode-marker -ObjC -lParseTwitterUtilsLib -lsqlite3 -lz -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework Social -fobjc-arc -fobjc-link-runtime -framework AudioToolbox -framework Bolts -framework CFNetwork -framework CoreGraphics -framework CoreLocation -framework Foundation -framework Parse -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -single_module -compatibility_version 1 -current_version 1.8.1 -Xlinker -dependency_info -Xlinker /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Intermediates/Pods.build/Debug-iphoneos/ParseTwitterUtils.build/Objects-normal/arm64/ParseTwitterUtils_dependency_info.dat -o /Users/maximveksler/Library/Developer/Xcode/DerivedData/ParseUI-gwtgmlgbpobjfjfjgkiwdahqveos/Build/Products/Debug-iphoneos/ParseTwitterUtils.framework/ParseTwitterUtils
ld: '/Users/maximveksler/Developer/ParseUI-iOS/Pods/ParseTwitterUtils/libParseTwitterUtilsLib.a(PFTwitterAuthenticationProvider.o)' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
was resolved by:
I had also faced the same problem in Xcode7. Solution for this:
go to PROJECT
build Settings
select All Tab
type in search Enable Bitcode
Update Flag to No (which will be beneath of your project (second column))
I had similar problem with GoogleAnalytics cocoa pod library, and the library was not compiling for iPhone 6 with iOS 8.
My solution was to turn to NO "Enable Bitcode" flag in target of the application project - not in Pods project.
If your Bitcode is not showing please selec All. When xcode select Basic your Bitcode option is not showing.
When you select All you can see Bitcode. After then set No for ads config
I just set it for my project.
MyProjectTarget -> Build Settings -> Enable Bitcode = NO
As everybody said, the answer is set Enable Bitcode to No in build settings, but I think some of you might be interested in doing this from the command line.
My Xcode project is being generated by Unity and I don't want any manual intervention on the Xcode project settings. Maybe there's a better way or a tool that can edit Build Settings a bit like how PlistBuddy lets you update values in plist files. I don't know any tool that does this for build settings so I'm using sed.
sed: Run replacements based on regular expressions.
How to set Enable Bitcode to No from command line:
Here, my project name is Unity-iPhone so I run the following command from the root of my Xcode project:
sed -i -e 's/ENABLE_BITCODE = YES;/ENABLE_BITCODE = NO;/g' \
Unity-iPhone.xcodeproj/project.pbxproj
-e -- specify sed commands to run
-i -- edit files in-place, running scripts separately for each file
Remove -i if you only want a preview of what it does ;)
Note that all of your build configurations will be changed using this command, the line ENABLE_BITCODE = YES; appeared 6 times in my project.pbxproj.
Now my build steps can be fully automated as fastlane takes care of the rest!
If you don't find enable_bitcode flag. Click "All" tab on the upper toolbar beside the search bar.
try this command in terminal if you arn't able to change BITCODE settings withing the project,
xcodebuild -target "target" -configuration "configuration" ENABLE_BITCODE=NO
If you are using Cocoapods, this will solve the problem:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end
Related
I am not able to resolve this issue from so long please do help me anyone..
Apple Mach-O Linker (Id) Error
Linker command failed with exit code 1 (use -v to see invocation)
Ld /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify- bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/newNotify.app/newNotify normal arm64
cd /Users/anubhavpilania/newNotify/ios
export IPHONEOS_DEPLOYMENT_TARGET=11.4
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -
L/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos -F/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef
/Build/Products/Debug-iphoneos -filelist /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify.LinkFileList -Xlinker -rpath -Xlinker #executable_path/Frameworks -miphoneos-version-min=11.4 -Xlinker -object_path_lto -Xlinker /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -lc++ -ObjC /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTPushNotification.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTBlob.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAzureNotificationHubManager.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libWindowsAzureMessaging.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAnimation.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libReact.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTActionSheet.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTGeolocation.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTImage.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTLinking.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTNetwork.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTSettings.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTText.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTVibration.a /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTWebSocket.a -Xlinker -dependency_info -Xlinker /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Intermediates.noindex/newNotify.build/Debug-iphoneos/newNotify.build/Objects-normal/arm64/newNotify_dependency_info.dat -o /Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/newNotify.app/newNotify
duplicate symbol _RCTRemoteNotificationReceived in:
/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTPushNotification.a(RCTPushNotificationManager.o)
/Users/anubhavpilania/Library/Developer/Xcode/DerivedData/newNotify-bcawjuyeqhqkypfnultgtirfnbef/Build/Products/Debug-iphoneos/libRCTAzureNotificationHubManager.a(RCTAzureNotificationHubManager.o)
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
In my case this issue occurred when I switched from PushNotificationIOS provided with the React Native core to the extracted version from #react-native-community/push-notification-ios. (Around version RN 0.60)
After linking the new library and installing the CocoaPods dependencies of the iOS project this issue started popping up.
For some reason while setting up the core RN Push Notification library I manually added libRCTPushNotification.a to the "Linked Frameworks and Libraries" of my project. Removing this reference to the core library resolved the issue and let me compile again.
The PushNotificationIOS was split out from the core React Native. So this issue comes up when migrating to the new module #react-native-community/push-notification-ios.
To fix this, just remove or comment out the PushNotificationIOS library from the Podfile: ./ios/Podfile
pod 'React-RCTPushNotification', :path => '../node_modules/react-
native/Libraries/PushNotificationIOS'
Then, run the following commands:
rm -rf Pods
pod install
Rebuild and then run your project.
If you are using a Podfile you can also remove React-RCTPushNotification and add the following...
pod 'RNCPushNotificationIOS', :path => '../node_modules/#react-native-community/push-notification-ios'
because React-RCTPushNotification is from 'react-native' but push notifications has been moved to #react-native-community.
I ran into the same issue as #Padarom, upgrading.
In Podfile, I had to remove the RCTPushNotification line
pod 'React',
:path => "../node_modules/react-native",
:inhibit_warnings => true,
:subspecs => [
"Core",
"ART",
"RCTActionSheet",
"RCTAnimation",
"RCTCameraRoll",
.....
"RCTPushNotification", <== REMOVE
after another pod install it worked
I have realized that it's lots of trouble and pain to compile qemu with gcc4,
so I have installed gcc-3.2 toolchain in my linux box and now I'm compiling qemu,
These are the steps that I have followed and emitted output.
root#sandun-Aspire-4741:/src/openmoko/qemu-neo1973# ./configure --target-list=arm-softmmu --cc=gcc-3.4 --disable-sdl --disable-gfx-check --extra-cflags='-isystem=\usr\include'
big/little test failed
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
binary directory /usr/local/bin
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /src/openmoko/qemu-neo1973
C compiler gcc-3.4
Host C compiler gcc
make make
install install
host CPU i386
host big endian no
target list arm-softmmu
gprof enabled no
profiler no
static build no
-Werror enabled no
SDL support no
mingw32 support no
Adlib support no
AC97 support no
GUS support no
CoreAudio support no
ALSA support no
EsounD support no
DSound support no
FMOD support no
OSS support yes
VNC TLS support no
kqemu support yes
Documentation no
root#sandun-Aspire-4741:/src/openmoko/qemu-neo1973# make
gcc-3.4 -isystem=\usr\include -Wall -O2 -g -fno-strict-aliasing -I. -I/src/openmoko/qemu-neo1973 -MMD -MP -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/src/openmoko/qemu-neo1973/slirp -c -o qemu-img.o qemu-img.c
qemu-img.c: In function `read_password':
qemu-img.c:178: error: `EAGAIN' undeclared (first use in this function)
qemu-img.c:178: error: (Each undeclared identifier is reported only once
qemu-img.c:178: error: for each function it appears in.)
qemu-img.c:178: error: `EINTR' undeclared (first use in this function)
qemu-img.c: In function `img_create':
qemu-img.c:307: error: `EOPNOTSUPP' undeclared (first use in this function)
qemu-img.c: In function `img_commit':
qemu-img.c:359: error: `ENOENT' undeclared (first use in this function)
qemu-img.c:362: error: `EACCES' undeclared (first use in this function)
qemu-img.c:365: error: `EOPNOTSUPP' undeclared (first use in this function)
qemu-img.c: In function `img_convert':
qemu-img.c:481: error: `EOPNOTSUPP' undeclared (first use in this function)
make: *** [qemu-img.o] Error 1
But compilations stops with these error messages, sounds like it does not have correct
system include path,so I gave it explicitly with -isystem switch. But still not compiling
correctly.
Any workaround on this?
--Thanks in advance--
which version of qemu? operating system? We need more gold info.
for example on my ubuntu 12.04 and git version of qemu:
$ git clone git://git.qemu.org/qemu.git > /dev/null
...
$ cd qemu/
$ ./configure --target-list=arm-softmmu --disable-sdl
Install prefix /usr/local
BIOS directory /usr/local/share/qemu
binary directory /usr/local/bin
library directory /usr/local/lib
libexec directory /usr/local/libexec
include directory /usr/local/include
config directory /usr/local/etc
local state directory /usr/local/var
Manual directory /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /home/user/qemu
C compiler cc
Host C compiler cc
Objective-C compiler cc
CFLAGS -O2 -D_FORTIFY_SOURCE=2 -g
QEMU_CFLAGS -Werror -fPIE -DPIE -m32 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fstack-protector-all -Wendif-labels -Wmissing- include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -I/usr/include/p11-kit-1 -I/usr/include/libpng12 -I/usr/include/pixman-1
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m32 -g
make make
install install
python python
smbd /usr/sbin/smbd
host CPU i386
host big endian no
target list arm-softmmu
tcg debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
-Werror enabled yes
pixman system
SDL support no
curses support yes
curl support yes
mingw32 support no
Audio drivers oss
Extra audio cards ac97 es1370 sb16 hda
Block whitelist
Mixer emulation no
VirtFS support no
VNC support yes
VNC TLS support yes
VNC SASL support yes
VNC JPEG support no
VNC PNG support yes
xen support no
brlapi support yes
bluez support yes
Documentation yes
NPTL support yes
GUEST_BASE yes
PIE yes
vde support yes
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
TCG interpreter no
fdt support yes
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
sigev_thread_id yes
uuid support yes
libcap-ng support no
vhost-net support yes
Trace backend nop
Trace output file trace-<pid>
spice support no (/)
rbd support no
xfsctl support no
nss used no
usb net redir no
OpenGL support yes
libiscsi support no
build guest agent yes
seccomp support no
coroutine backend ucontext
GlusterFS support no
virtio-blk-data-plane no
gcov gcov
gcov enabled no
$ make -j3 >/dev/null
$
so everything fine...
I have this problem with freeradius module.
I'm trying to add my custom module, but after I launch radius server in debug mode it shows me this error:
/usr/local/etc/raddb/modules/m2[2]: Failed to link to module 'rlm_m2': libmysql.so.16: cannot open shared object file: No such file or directory
/usr/local/etc/raddb/sites-enabled/default[224]: Failed to load module "m2".
/usr/local/etc/raddb/sites-enabled/default[69]: Errors parsing authorize section.
My system is Ubuntu 12, all mysql packages are installed correctly(there does exist libmysql.so.16 in usr/lib/mysql) freeradius runs smoothly with default parameters and so on. I really don't have an idea what exactly can't find this mysql library or how to show it to it.
Try compile like this:
gcc -I/usr/include/mysql rlm_m2.c -o rlm_m2 -lmysqlclient -lnsl -lm -lz\
-L/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib64/mysql
I'm just trying to build an old project of mine using cuda 5.0 preview.
I get an Error when linking, telling me that certain cuda functions can not be found. For example:
undefined reference to 'cudaMalloc'.
My linking command includes the following options for cuda :
-L/usr/local/cuda/lib64 -L/home/myhome/NVIDIA_CUDA_Samples/C/lib -L/home/myhome/NVIDIA_CUDA_Samples/C/common/lib/linux -lcudart
ls -lah /usr/local/cuda/lib64/ gives me 8 cuda libraries including libcudart.so.5.0.7 with symlinks using only the .so-file-ending.
ls /home/myhome/NVIDIA_CUDA_Samples/C/lib/ gives me an empty directory, which is kind of strange?
ls /home/myhome/NVIDIA_CUDA_Samples/C/common/lib/linux/ gives me two directories: i686 and x86_64 both containing only libGLEW.a
I have no idea which way to look for a solution. Any help is appreciated!
EDIT:
Here is my complete linking command (TARGET_APPLICATION is my binary and x86_64/Objectfiles.o stands for all (23) object files including the object file compiled with nvcc):
/home/myhome/nullmpi-0.7/bin/mpicxx -CC=g++ -I. -I/home/myhome/nullmpi-0.7/src -I/usr/lib/openmpi/include -L/usr/local/cuda/lib64 -L/home/myhome/NVIDIA_CUDA_Samples/C/lib -L/home/myhome/NVIDIA_CUDA_Samples/C/common/lib/linux -lcudart -o TARGET_APPLICATION x86_64/Objectfiles.o /usr/lib/liblapack.so /usr/lib/libblas.so /home/myhome/nullmpi-0.7/lib/libnullpmpi.a -lm
I use nullmpi for compilation and linking (project uses MPI and CUDA), which internally uses g++ as can be seen by -CC=g++, i wanted to keep this stuff out.
The compilation command for my cuda object file:
/usr/local/cuda/bin/nvcc -c -arch=sm_21 -L/home/myhome/NVIDIA_CUDA_Samples/C/lib -O3 kernelwrapper.cu -o x86_64/kernelwrapper.RELEASE.2.o
echo $LD_LIBRARY_PATH results in:
/usr/local/cuda/lib64:/usr/local/cuda/lib:
echo $PATH results in:
otherOptions:/usr/local/cuda/bin:/home/myhome/nullmpi-0.7/bin
I'm building 64-bit. For the sake of completeness I'm building on Ubuntu 12.04. (64bit).
Building the CUDA Samples works fine.
SOLUTION (thanks to talonmies for pointing me to it):
This is the correct linking command:
/home/myhome/nullmpi-0.7/bin/mpicxx -CC=g++ -I. -I/home/myhome/nullmpi-0.7/src -I/usr/lib/openmpi/include -L/usr/local/cuda/lib64 -L/home/myhome/NVIDIA_CUDA_Samples/C/lib -L/home/myhome/NVIDIA_CUDA_Samples/C/common/lib/linux -o TARGET_APPLICATION x86_64/Objectfiles.o /usr/lib/liblapack.so /usr/lib/libblas.so /home/myhome/nullmpi-0.7/lib/libnullpmpi.a -lcudart -lm
You have your linking statements in the incorrect order. It should be something more like this:
/home/myhome/nullmpi-0.7/bin/mpicxx -CC=g++ -I. -I/home/myhome/nullmpi-0.7/src \
-I/usr/lib/openmpi/include -L/usr/local/cuda/lib64 \
-L/home/myhome/NVIDIA_CUDA_Samples/C/lib \
-L/home/myhome/NVIDIA_CUDA_Samples/C/common/lib/linux \
-o TARGET_APPLICATION x86_64/Objectfiles.o \
/home/myhome/nullmpi-0.7/lib/libnullpmpi.a -llapack -lblas -lm -lcudart
The source of your problem is that you have specified the CUDA runtime library before the object file that contains a dependency to it. The linker simply discards libcudart.so from the linkage because there are no dependencies to it at the point when it is processed. Golden rule in POSIX style compilation statements: linkage statements are parsed left-to-right; so objects containing external dependencies first, libraries satisfying those dependencies afterwards.
I am installing DBD-mysql-4.020 perl module on 5.14.2.
when running make, I encounter the below error:
cc -c -I/u01/app/appadmin/product/perl-5.14.2/lib/site_perl/5.14.2/x86_64-linux/auto/DBI -I/usr/local/mysql-standard-4.1.14-pc-linux-gnu-i686/include -mtune=pentiumpro -DDBD_MYSQL_INSERT_ID_IS_GOOD -g -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -DVERSION=\"4.020\" -DXS_VERSION=\"4.020\" -fPIC "-I/u01/app/appadmin/product/perl-5.14.2/lib/5.14.2/x86_64-linux/CORE" dbdimp.c
dbdimp.c:1: error: CPU you selected does not support x86-64 instruction set
make: * [dbdimp.o] Error 1
upgraded compiler to gcc4.4 and did put a lot of effort to overcome this. Your inputs in resolving this and installing the perl Module are greatly appreciated.
error: CPU you selected does not support x86-64 instruction set make:
Does this machine have a 64-bit CPU?
If so, have you checked to see if you have 64 bit versions of perl and mysql? Or you can you the 'lazy' route and just try installing a 32 bit version of DBD-mysql and see what happens.