Scons throwing errors

I’m not sure if this is going to the right forum; sorry if not. I’m trying to install Ardour from source on an OpenSuSE 10.0 machine. I verified that all required pakcages and libraries were installed and then grabbed the latest stable Scons RPM and installed it. But when I run the scons command, it throws errors about not being able to find many of the aforementioned libararies. I can’t figure out where to go to change the path variables. Any ideas?

Could you give us a copy of what scons outputs ?

Marc-Olivier Barre,
Kinoko en Orbite

Here it is:

user@linux:~> cd ‘/home/user/Desktop/ardour-0.99.3/ardour-0.99.3’
user@linux:~/Desktop/ardour-0.99.3/ardour-0.99.3> sudo scons
Password:
scons: Reading SConscript files …
Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing sndfile.pc' to the PKG_CONFIG_PATH environment variable No package 'sndfile' found Package lrdf was not found in the pkg-config search path. Perhaps you should add the directory containinglrdf.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘lrdf’ found
Package raptor was not found in the pkg-config search path.
Perhaps you should add the directory containing raptor.pc' to the PKG_CONFIG_PATH environment variable No package 'raptor' found Package samplerate was not found in the pkg-config search path. Perhaps you should add the directory containingsamplerate.pc’
to the PKG_CONFIG_PATH environment variable
No package ‘samplerate’ found
sh: gtk-config: command not found
Checking for C header file alsa/asoundlib.h… no
Checking for C header file /System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h… no
system triple: i686-pc-linux-gnu


detected DIST_TARGET = i686


Checking for internationalization support …
This system is not configured for internationalized applications (no xgettext command). An english-only version will be built

Checking for C header file libintl.h… yes
Checking for C header file /System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/CoreAudio.h… no
Checking for C function posix_memalign()… yes
Checking for C function getmntent()… yes
KeyError: ‘SYSMIDI’:
File “SConstruct”, line 727:
SConscript (subdir + ‘/SConscript’)
File “/usr/lib/scons/SCons/Script/SConscript.py”, line 581:
return apply(method, args, kw)
File “/usr/lib/scons/SCons/Script/SConscript.py”, line 508:
return apply(_SConscript, [self.fs,] + files, {‘exports’ : exports})
File “/usr/lib/scons/SCons/Script/SConscript.py”, line 239:
exec file in stack[-1].globals
File “libs/midi++/SConscript”, line 35:
if env[‘SYSMIDI’] == ‘CoreMIDI’:
File “/usr/lib/scons/SCons/Environment.py”, line 290:
return self._dict[key]
user@linux:~/Desktop/ardour-0.99.3/ardour-0.99.3>

I hope this comment appears in the right place…

I fixed the pkg-config errors by setting the PKG_CONFIG_PATH in the .profile (e.g. .bash_profile, .bashrc, etc.). Also, I think it is possible to set this directory path via the command line like this: ./configure --“options”. Sorry, that I am not more exact. Try ./configure --help Also, if you are unsure where pkg-config directory is located, I believe you can type in $> whereis pkg-config.

I hope this helps.

mgrav

You said you have all relevant packages installed. But, do you have the development packages for these libraries installed? Without them, you will be unable to compile software whicih use the libraries.

There is a recuring message in your scons output : “Package sndfile was not found in the pkg-config search path”

I believe the problem is just that. To solve this (maybe) here’s what you could do :

  • Open a console, locate where sndfile.pc is on your system
  • Set the PKG_CONFIG_PATH with the path where sndfile.pc was found (export PKG_CONFIG_PATH='/path/to/sndfile.pc')
  • Make this simple test : 'pkg-config --print-errors --modversion sndfile', it should print out sndfile's version (or whatever package you have specified
  • With 'pkg-config --list-all' you can get a list of all the modules found in the PKG_CONFIG_PATH
  • Once you get your pkgconfig path right, everything should work :-)

And about mgrav70’s comment, ardour is not using configure, it is using scons. I am not sure you can define environment variables on the command line, and I don’t think it is useful is the case of a wrong pkgconfig search path. It has to be the right one system wide, which means defining it in a global profile file or any other equivalent method on one’s system.

Marc-Olivier Barre,
Kinoko en Orbite

Sampo:

I carefully checked and double-checked to make sure I had the -devel package of everything. Even if one or two slipped by me, that wouldn’t explain the error. Scons is missing EVERYTHING. I haven’t had time to try the other solution, but hopefully will tomorrow. I’ll post with results.

Thanks,
Kenquad

I am sorry about the configure comment. Yes, Artreju is right about Ardour using scons. I hope that I didn’t waste any of your time, Kenquad. My mind was on my particular scenario in dealing with pkg-config. (I think I was installing hydrogen or some other application.) I will try to proofread my messages better in the future.

Arteju:

YaST shows ‘libsndfile’ installed, but I’m not having any success searching for sndfile.pc. I’ll keep trying. No hint of where it should be, I suppose?

mgrav70:
I appreciate your bothering to post even if your advice was erroneous. In point of fact I’d barely sat down to work when I saw arteju’s post.

Thanks guys,
Kenquad

I decided to poke around and try to find out more information in regards to pkg-config. I typed in pkg-config --all | grep sndfile

sndfile sndfile - A library for reading and writing audio files

(Thanks Arteju)

Then, I wanted to see the library information:

pkg-config --libs

pkg-config --libs sndfile
-L/usr/local/lib -lsndfile

So, this means that on my machine sndfile.pc is under /usr/local/lib/pkgconfig/

/usr/local/lib/pkgconfig]$ ls -l
total 4
-rw-r–r-- 1 root root 249 2006-08-05 20:33 sndfile.pc

By the way, my machine has a ton of .pc files under /usr/lib/pkgconfig, which makes me wonder if I should have configured libsndfile with a /usr prefix. Anyway, it looks like there a ton of .pc files everywhere – heh, I need to read more of the man pkg-config page…

mgrav70

Hi again:

Sorry, guys. Looks like Arteju guessed right the First time. I didn’t have the -devel libs! You see, I was narrow-mindedly looking through YaST, thinking that if searching for ‘sndfile’ only brought up ‘libsndfile’ then this file must not need a -devel version. (An unfortunate misimpression that SuSE has everything). So, I went hunting on rpmfind.net and grabbed the files. Problem solved! First problem, that is. Here’s what happens now when I try to compile:

user@linux:~/Desktop/ardour-0.99.3/ardour-0.99.3> sudo scons
Password:
scons: Reading SConscript files …
Checking for C header file alsa/asoundlib.h… yes
system triple: i686-pc-linux-gnu


detected DIST_TARGET = i686


Warning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)
Checking for internationalization support …
This system is not configured for internationalized applications (no xgettext command). An english-only version will be built

Checking for C header file libintl.h… yes
Checking for C header file /System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/CoreAudio.h… no
Checking for C function posix_memalign()… yes
Checking for C function getmntent()… yes
Checking for jack_client_open()…failed
Checking for jack_recompute_total_latencies()…failed
Checking for C header file wordexp.h… yes
Checking for C header file sys/vfs.h… yes
Checking for executable gtk-config …yes
scons: done reading SConscript files.
scons: Building targets …
scons: ardour.rc' is up to date. scons:libs/soundtouch/libsoundtouch.a’ is up to date.
scons: libs/sigc++/libsigc++.a' is up to date. scons:libs/pbd/libpbd.a’ is up to date.
g++ -O3 -fomit-frame-pointer -ffast-math -fstrength-reduce -DARCH_X86 -mmmx -m3dnow -march=i686 -DBUILD_SSE_OPTIMIZATIONS -Wall -DWITH_ALSA -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Ilibs/midi++ -Ilibs -Ilibs/sigc++ -Ilibs/sigc++/sigc++/config -I/usr/include/libxml2 -Ilibs/pbd -c -o libs/midi++/fd_midiport.o libs/midi++/fd_midiport.cc
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/g++ line 183.
g++ -O3 -fomit-frame-pointer -ffast-math -fstrength-reduce -DARCH_X86 -mmmx -m3dnow -march=i686 -DBUILD_SSE_OPTIMIZATIONS -Wall -DWITH_ALSA -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -Ilibs/midi++ -Ilibs -Ilibs/sigc++ -Ilibs/sigc++/sigc++/config -I/usr/include/libxml2 -Ilibs/pbd -c -o libs/midi++/fifomidi.o libs/midi++/fifomidi.cc
Use of uninitialized value in concatenation (.) or string at /usr/local/bin/g++ line 183.
scons: done building targets.

This last paragraph,

Use of uninitialized value in concatenation (.) or string at /usr/local/bin/g++ line 183.
scons: done building targets.

repeats until stopped by ctrl-c.

???

Hi,

The devel libs have burned me before too. I understand…

I have experienced the concatenation (.) or string errors as well. However, I got a more specific error message that had to do with parsing errors (e.g. can’t find example files).

Sorry that I can’t help. Maybe Arteju or the other gurus can help. :slight_smile:

mgrav70

From the looks of the log you posted, ardour was compiling correctly. The messages weren’t “repeating”, they were compile commands for different source files. Those concatenation messages looked like warnings (altough, they didn’t say “warning” like g++ warning normally do).

Which version of g++ are you using?

If I was you, I’d let scons run through and see if Ardour builds.

I agree with sampo, let the build roll, everything looks normal.

Marc-Olivier Barre,
Kinoko en Orbite

Thanks, guys. Compiled perfectly, despite the ominous-looking error messages. I just ran ‘sudo scons’ and ‘sudo scons install’ and that was it. At least, that was apparently it. I’m not sure because the program hangs on startup due to inability to connect to the JACK server. I’m running JACK .99something, which I know is less than Ardour likes (couldn’t find a SuSE RPM of the latest version), but as yet I can’t get JACK to start anyway. I’m using a QT frontend, which shows the following output when I try to start:

20:00:46.917 Startup script…
20:00:46.917 artsshell -q terminate
unix_connect: can’t connect to server (unix:/tmp/ksocket-user/linux.site-3114-44d6631f)
20:00:47.235 Startup script terminated with exit status=256.
20:00:47.235 JACK is starting…
20:00:47.235 /usr/bin/jackd -R -m -dalsa -dhw:0 -r48000 -p1024 -n2 -H
20:00:47.252 JACK was started with PID=5337 (0x14d9).
jackd 0.99.0
Copyright 2001-2003 Paul Davis and others.
jackd comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
loading driver …
apparent rate = 48000
creating alsa driver … hw:0|hw:0|1024|2|48000|0|0|hwmon|swmeter|-|32bit
control device hw:0
configuring for 48000Hz, period = 1024 frames, buffer = 2 periods
20:00:47.262 JACK was stopped successfully.
20:00:49.359 Could not connect to JACK server as client.

I’m using a Soundblaster SB0410 which seems to be properly recognized by SuSE. Does anyone know how to interpret this error?

BTW, the first part of that error quote may not be the beginning. I tried several times and may have mixed up the output.