You are not logged in.
I've tried to test several different libraries with SCon's CheckLib() and it always says I don't have the library installed. For example:
[deficite@Vagabond temp]$ ls /usr/lib | grep libasound
libasound.so
libasound.so.2
libasound.so.2.0.0
[deficite@Vagabond temp]$ cat SConstruct
env = Environment()
conf = env.Configure()
if conf.CheckLib('asound'):
print "w00t"
[deficite@Vagabond temp]$ scons
scons: Reading SConscript files ...
Checking for main() in C library asound... no
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
[deficite@Vagabond temp]$
I even tried appending "/usr/lib" to SCons library path using env.Append() and it still says "no".
Offline
try:
$ echo $LIBPATH
to verify....
If it doesn't exist, try focing it in the Environment ctor. Also, I have no idea if it changes things, but most examples use Configure(env) as opposed to env.Configure() - not sure if they're different at all.
$ cat SConstruct
env = Environment(LIBPATH = ['/usr/lib'])
conf = Configure(env)
if conf.CheckLib('asound'):
print "w00t"
Offline
[deficite@Vagabond temp]$ export LIBPATH="/usr/lib"
[deficite@Vagabond temp]$ echo $LIBPATH
/usr/lib
[deficite@Vagabond temp]$ scons
scons: Reading SConscript files ...
Checking for main() in C library asound... no
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
I also tried adding the assignment of LIBPATH inside of the SConstruct file, like you showed, but that didn't work either.
Configure(env) == env.Configure() -- I tested both of them.
Offline
I think I've found the problem. Here's config.log generated by scons:
file SConstruct,line 2:
Configure( confdir = .sconf_temp )
Checking for main() in C library asound... scons: `.sconf_temp/conftest_0.c' is up to date.
gcc -c -o .sconf_temp/conftest_0.o .sconf_temp/conftest_0.c
Use of uninitialized value in concatenation (.) or string at /bin/gcc line 183.
Can't exec "/usr/local/bin/gcc": No such file or directory at /bin/gcc line 202.Couldn't exec at /bin/gcc line 202.
scons: *** [.sconf_temp/conftest_0.o] Error 2
no
Failed program was:
1:
2:
3:
4: int
5: main() {
6: main();
7: return 0;
8: }
9:
10:
Which made me think for a second. I pulled up vim on /bin/gcc, and I remembered that I installed colorgcc from AUR the other day, and apparantly it conflicts with SCons's library checking functionality. I'm reporting it right now.
Offline
I installed colorgcc from AUR the other day, and apparantly it conflicts with SCons's library checking functionality. I'm reporting it right now.
I just fixed colorgcc. A new PKGBUILD is now in AUR. It should work now with scons.
Offline