NVIDIA CUDA SDK Gcc 4.4 Problems Solved in Kubuntu/Ubuntu Jaunty 9.10: “/usr/bin/ld: cannot find -lglut” And __signbit/__signbitf/__signbitl/__signbitd “cannot be declared weak”
Nvidia’s CUDA is a great technology though it’s not without it’s problem. I’m not here to talk about CUDA and it’s up’s and down’s. The issue at hand today is installing the SDK in Kubuntu Jaunty 9.10.
See, the main issues here are that a) Jaunty is rather fresh and tries to use new technology b) Jaunty isn’t exactly the best coded OS out there, they have plenty of ‘quality’ bugs to iron out c) CUDA isn’t made for the latest and greatest, it’s made from stable sources!
Thus, if you’re a user of ANY *nix OS that has GCC 4.4 and/or G++ 4.4 you’ll have the following main issue to go around while trying to compile the SDK sample source files:
/usr/include/string.h:43: error: inline function ‘void* memcpy(void*, const void*, size_t)’ cannot be declared weak
/usr/include/string.h:64: error: inline function ‘void* memset(void*, int, size_t)’ cannot be declared weak
/usr/include/bits/string3.h:49: error: inline function ‘void* memcpy(void*, const void*, size_t)’ cannot be declared weak
/usr/include/bits/string3.h:78: error: inline function ‘void* memset(void*, int, size_t)’ cannot be declared weak
/usr/local/cuda/bin/../include/common_functions.h:59: error: inline function ‘void* memset(void*, int, size_t)’ cannot be declared weak
/usr/local/cuda/bin/../include/common_functions.h:62: error: inline function ‘void* memcpy(void*, const void*, size_t)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:412: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:417: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathcalls.h:350: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/include/bits/mathinline.h:36: error: inline function ‘int __signbitf(float)’ cannot be declared weak
/usr/include/bits/mathinline.h:42: error: inline function ‘int __signbit(double)’ cannot be declared weak
/usr/include/bits/mathinline.h:48: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
/usr/local/cuda/bin/../include/math_functions.h:442: error: inline function ‘int __signbitl(long double)’ cannot be declared weak
make[1]: *** [obj/release/convolutionFFT2D.cu.o] Error 255
make: *** [src/convolutionFFT2D/Makefile.ph_build] Error 2
With the main interst and annoying part being:
‘int __signbit(double)’ cannot be declared weak
‘int __signbitf(float)’ cannot be declared weak
‘int __signbitl(long double)’ cannot be declared weak
‘int __signbitf(float)’ cannot be declared weak
‘int __signbit(double)’ cannot be declared weak
‘int __signbitl(long double)’ cannot be declared weak
Well, what to do now? After a little bit of searching around I discovered the above mentioned facts:
- CUDA is NOT made for GCC version greater than 4.3
- Ubuntu/Kubuntu 9.10 Jaunty is NOT officially supported
- Installing GCC 4.3 and 4.4 along side each other in Jaunty is useless in many ways
- The fix is annoying, but easy to do
Read more
Sphere: Related ContentCanon Image Resizer Script v .5 – smallver.py
Filed under: Linux, Photography, Programming, Software
Canon DSLR camera’s can produce amazing photographs, though the problem arises in holding those files. Even a bigger problem to e-mail it. A `simple’ image from a 40D in best quality will easily produce an image of 5MB. Not exactly e-mail worthy, nor website worthy for displaying. Sure, it’s great if you want people to see it in best quality AND wait forever to actually see it.
So, being a user of a 40D I needed a way to quickly resize (scale down) all the pictures, in a command line way. I also needed plenty of other features which I really did not feel like manually typing all the time. Thus out came my smallver.py script (smallver dot Py).Currently still in beta and in version .5. Also it’s made for linux and in python 2.5. Though I’m pretty sure it’ll work in py 2.4.
This script is in essence a wrapper for Imagemagick (which is requied for use). IM had a lot things that bothered me, so I wrapped all of it in a easy script. Here is what my script will currently do (more or less in order):
- Find all .jpg and .jpeg files in a given folder
- ignoring all not supported files (will add quick raw support soon)
- Create a ’small_ver’ folder to place all the scaled down files into
- Current scaling is down to 1200×800
- Create all scaled down images in ’small_ver’ folder
It has several useful features, here is a mostly complete list of current features:
- Image scaling using ImageMagick
- Image filtering (selecting only image files)
- Multiple file and folder input
- Command line version for quick and easy access
- Selecting your own ’small’ version tag
- Overwrite and non-overwrite ’small_ver’ modes
- Small version folder selection
- (Poor) non-standard file dimension handling
- and more …
I have also left the comments in in this release. Hopefully they will be useful to others should they choose to look at the code.
Download: smallvery.py
Sphere: Related Content
