problem with pkg-config while compiling 3.0

Slightly odd problem, it might be scons messing up, but i have a feeling its me. I don’t know if i should file this as a bug report or not.

When i compile ardour 3.0, scons can’t find my version of sndfile (which is in /usr/local/lib and the headers in /usr/local/include).

I get the following readout when trying to compile:

scons: Reading SConscript files ... SCons.Script:18: DeprecationWarning: the sets module is deprecated

scons: warning: The Options class is deprecated; use the Variables class instead.
File “/home/benjamin/src/ardour/3.0/SConstruct”, line 32, in

scons: warning: The BoolOption() function is deprecated; use the BoolVariable() function instead.
File “/home/benjamin/src/ardour/3.0/SConstruct”, line 36, in

scons: warning: The PathOption() function is deprecated; use the PathVariable() function instead.
File “/home/benjamin/src/ardour/3.0/SConstruct”, line 42, in

scons: warning: The EnumOption() function is deprecated; use the EnumVariable() function instead.
File “/home/benjamin/src/ardour/3.0/SConstruct”, line 43, in

Checking for pkg-config version >= 0.8.0… yes
Checking for gthread-2.0… yes
Checking for jack… yes
Checking for flac… yes
Checking for sndfile… yes
Checking for libgnomecanvas-2.0… yes
Checking for samplerate… yes
Checking for raptor… yes
Checking for ogg… yes
Checking for glib-2.0… yes
Checking for lrdf… yes
Checking for aubio… yes
Checking for gtk±2.0… yes
Checking for libxml-2.0… yes
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
OSError: ‘pkg-config --cflags --libs sndfile’ exited 1:
File “/home/benjamin/src/ardour/3.0/SConstruct”, line 538:
libraries[‘sndfile’].ParseConfig(‘pkg-config --cflags --libs sndfile’)
File “/usr/lib/python2.6/site-packages/SCons/”, line 1447:
return function(self, self.backtick(command))
File “/usr/lib/python2.6/site-packages/SCons/”, line 585:
raise OSError("’%s’ exited %d" % (command, status))

however i DO have the latest pre-release of sndfile and i DO have the right pkg-config directory listed in PKG_CONFIG_PATH

> echo $PKG_CONFIG_PATH /usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/opt/qt/lib/pkgconfig > pkg-config --cflags --libs sndfile -I/usr/local/include -L/usr/local/lib -lsndfile > pkg-config --modversion sndfile 1.0.18pre24h > pkg-config --version 0.23 > scons --version SCons by Steven Knight et al.: script: v1.2.0.r3842, 2008/12/20 22:59:52, by scons on scons-dev engine: v1.2.0.r3842, 2008/12/20 22:59:52, by scons on scons-dev Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation

the sndfile.pc file is in /usr/local/lib/pkgconfig however if i move it to /usr/lib/pkgconfig suddenly i can compile.

i’m guessing scons isn’t getting my version of PKG_CONFIG_PATH for some reason, but have no idea why, I’m sure its something incredibly stupid on my part.

I’d blame your python version (2.6).
Ardour seems picky about scons/python versions; 1.1.0 / 2.5.2 seems like a good combo.