You are not logged in.

#1 2005-11-02 16:49:00

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

SCons CheckLib always reports "no"

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

#2 2005-11-02 18:10:48

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: SCons CheckLib always reports "no"

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

#3 2005-11-03 01:56:55

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

Re: SCons CheckLib always reports "no"

[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

#4 2005-11-03 02:09:22

deficite
Member
From: Augusta, GA
Registered: 2005-06-02
Posts: 693

Re: SCons CheckLib always reports "no"

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

#5 2005-11-03 05:12:19

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: SCons CheckLib always reports "no"

deficite wrote:

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. smile

Offline

Board footer

Powered by FluxBB