[CLAM] compile question

David García Garzón dgarcia at iua.upf.edu
Fri Feb 29 23:27:36 PST 2008


Sorry for not being so helpfull. Maybe other mac'er in the list than Pau could 
help more. Anyway i'll try to do my best.

It would help if you could send us the config.log file that is generated.

Notice that PKG_CONFIG_PATH and PKG_CONFIG are different vars. The first one 
contains the paths where to find .pc files. The second one contains the 
pkg-config binary, this one is the one that is defined empty. PKG_CONFIG 
scons vars gets its value at a function at scons/libs/clam_build_helpers.py 
+242. The first lines of the log should show what happened. And a kludgy 
workarround would be to hardwrite the path in such a function but i would 
like to know why it is failing.


On Saturday 01 Març 2008, Pablo Colapinto wrote:
> Can't find any earlier errors.
>
> I wonder where the PKG_CONFIG_PATH is set.
> Is it imported from the Environment?  I don't see where.
> Can I set it manually doing
> opts.Add('PKG_CONFIG_PATH','/opt/local/bin/') or something?
> I don't really know python yet . . .
>
> I copied this from the SConstruct File:
> note the last opts.Add line of code
> ---------------------
> def load_config_file_to_env( env, dir ):
>     opts = Options(dir+'/flags.conf')
>     opts.Add( 'CPPPATH', 'CPP PATH')
>     opts.Add( 'CCFLAGS', 'CC FLAGS')
>     opts.Add( 'CPPFLAGS', 'CPP FLAGS')
>     opts.Add( 'LIBPATH', 'LIB PATH')
>     opts.Add( 'LIBS', 'libs to link')
>     opts.Add( 'LINKFLAGS', 'LINKFLAGS') # This one added because on Mac
> OS X we need additional '-framework OpenGL && AGL'
>     opts.Add( 'pkg_config_available', 'PKG Config Available', 'False')
>     opts.Update(env)
>
> def save_config_file_from_env( env, dir ):
>     # workaround due to bug in scons (if we add the flag after loading
> it will add "" to the new flagand will fail
>     opts = Options()
>     opts.Add( 'CPPPATH', 'CPP PATH', '')
>     opts.Add( 'CCFLAGS', 'CC FLAGS', '')
>     opts.Add( 'CPPFLAGS', 'CPP FLAGS', '')
>     opts.Add( 'LIBPATH', 'LIB PATH', '')
>     opts.Add( 'LIBS', 'libs to link', env['LIBS'])
>     opts.Add( 'LINKFLAGS', 'LINKFLAGS', '') # This one added because on
> Mac OS X we need additional '-framework OpenGL && AGL'
>     opts.Add( 'pkg_config_available', 'PKG Config Available', 'False')
>     opts.Save(dir+'/flags.conf', env)
>
> ----------------------
>
> David García Garzón wrote:
> > Weird. It seems that at that point scons var $PKG_CONFIG is empty. It
> > runs "$PKG_CONFIG --cflags...." and it seems to be executing "
> > ---cflags...". That variable is filled in a previous check that should be
> > failing. Take a look at earlier error messages.
> >
> > Pau, arround?
> >
> > On Friday 29 Febrer 2008, Pablo Colapinto wrote:
> >> Hi David
> >>
> >> Thanks for your help.
> >>
> >> I found this more specific error in the config.log
> >>
> >> PKG_CONFIG_PATH='' --cflags --libs vorbisfile vorbisenc
> >> sh: line 1: --cflags: command not found
> >> scons: Configure: no
> >>
> >> I have followed all the build instructions and checked
> >> that "which pkg-config" points to /opt/local/bin/pkg-config.
> >>
> >> I have confirmed that the .pc files exist in /opt/local/lib/pkgconfig
> >>
> >> I have also tried making sure the PKG_CONFIG_PATH is set to this by
> >> writing
> >>
> >> $ export PKG_CONFIG_PATH=/opt/local/lib/pkgconfig
> >>
> >> before running
> >>
> >> $ scons configure
> >>
> >> David García Garzón wrote:
> >>> Yes, this list is the proper place to ask technical questions about
> >>> CLAM.
> >>>
> >>> Maybe Pau could answer your question better than me as he did the last
> >>> macosx build system changes. But as he is busy with his thesis i will
> >>> try to answer the best i can.
> >>>
> >>> I supose you are following the wiki page to build for Mac[1].
> >>> [1] http://iua-share.upf.edu/wikis/clam/index.php/Devel/Mac_OSX_build
> >>>
> >>> You might have a conflicting version of pkg-config installed. If you
> >>> execute 'which pkg-config', it should point to
> >>> /opt/local/bin/pkg-config if not follow the wiki troublesshooting
> >>> instructions for that case.
> >>>
> >>> If you have further problems try to locate pkg-config files for those
> >>> libraries. Such files have the .pc extension and a typical path for
> >>> them could be /opt/local/lib/pkgconfig in mac. For example fftw3.pc
> >>>
> >>> David.
> >>>
> >>> On Thursday 28 Febrer 2008, Pablo Colapinto wrote:
> >>>> Not sure if this is appropriate place to ask technical questions.
> >>>>
> >>>> I get the following dependency errors when I try "scons configure"
> >>>> I'm running mac os x 10.4.11.
> >>>>
> >>>> Checking for fftw3 pkg-config file... no
> >>>>
> >>>> Checking for vorbisfile vorbisenc pkg-config file... no
> >>>>
> >>>> Any ideas?  pkg-config and fftw3 are both installed using sudo port
> >>>> install
> >>>>
> >>>> Thanks,
> >>>> pc
> >>>>
> >>>>
> >>>>
> >>>> ---------------------------------------
> >>>> Pablo Colapinto
> >>>> ---------------------------------------
> >>>> Media Arts and Technology Program
> >>>> University of California, Santa Barbara
> >>>> ---------------------------------------
> >>>> http://www.wolftype.com
> >>>> ---------------------------------------
> >>>> tel: (215)327-6201
> >>>> ---------------------------------------
> >>>>
> >>>>
> >>>> _______________________________________________
> >>>> CLAM mailing list
> >>>> CLAM at iua.upf.es
> >>>> http://clam.iua.upf.edu



-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-users-clam-project.org/attachments/20080301/3e745d82/attachment.sig>


More information about the clam-users mailing list