[Scons-users] CheckPkG on OS X 10.9

Mr iQ mriq.13 at gmail.com
Thu May 1 17:16:30 EDT 2014


Hi all,

i use Mac OS X. I get problem compiling a simple source code which does
print a gtk+ window. i can paste the source code if necessary but i don't
think it does anything to do with the source code.

i took the second example from this url :
http://www.scons.org/wiki/UsingPkgConfig

after running scons i get the following error message :
scons: Reading SConscript files ...
Checking for pkg-config...yes
Checking for gtk+-3.0no
GTK+-3.0 not be found

Interesting is that when i run pkg-config --exists 'gtk+-3.0' from command
line the exit code is 0

here is the SConstruct file :

import os

env = Environment()
env["PKG_CONFIG_PATH"] = os.environ.get("PKG_CONFIG_PATH") # a user in IRC
suggested
def CheckPKGConfig(context, version):
context.Message( 'Checking for pkg-config...' )
ret = context.TryAction('pkg-config --atleast-pkgconfig-version=%s'
% version)[0]
context.Result( ret )
return ret

def CheckPKG(context, name):
context.Message( 'Checking for %s' % name )
ret = context.TryAction('pkg-config --exists \'%s\'' % name)[0]
context.Result( ret )
return ret

# Configuration

conf = Configure(env, custom_tests = { 'CheckPKGConfig' : CheckPKGConfig,
'CheckPKG' : CheckPKG})

if not conf.CheckPKGConfig('0.15.0'):
print 'pkg-config not found'
Exit(1)


if not conf.CheckPKG('gtk+-3.0'):
print 'GTK+-3.0 not be found'
Exit(1)

# Your extra checks here

env = conf.Finish()

# Now, build
env.ParseConfig('pkg-config --cflags --libs gtk+-3.0')
env.Program('main.c')


and here is the config.log

file /Users/love_osx/Desktop/testscons/SConstruct,line 19:
Configure(confdir = .sconf_temp)
scons: Configure: Checking for pkg-config...
pkg-config --atleast-pkgconfig-version=0.15.0
scons: Configure: yes

scons: Configure: Checking for gtk+-3.0
pkg-config --exists 'gtk+-3.0'
scons: Configure: no


Is there something that a mac user should do before running scons ?

P.S. i was also in IRC and a user suggested to enter the second line pasted
in the SConstruct file, but no luck.


Thanks for any help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20140501/f92fc915/attachment.htm


More information about the Scons-users mailing list