You are not logged in.

#1 2010-08-03 07:36:41

lefallen
Member
From: Melbourne, Australia
Registered: 2006-07-06
Posts: 36
Website

gx2osd's waf not finding boost libs

(excuse the C++, boost and waf ignorance that may be contained below)

I'm trying to build gx2osd for xmms2 and have come across an issue where the build fails:

$ ./waf configure --prefix=/usr 
/data/aur/gx2osd/src/gx2osd/.waf-1.1.0-1300596208/wafadmin/Params.py:7: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os, sys, types, inspect, md5, base64, stat
Checking for program g++                : ok /usr/bin/g++ 
Checking for program cpp                : ok /usr/bin/cpp 
Checking for program ar                 : ok /usr/bin/ar 
Checking for program ranlib             : ok /usr/bin/ranlib 
Checking for package xmms2-client-cpp   : ok  
Checking for package xmms2-client-cpp-glib  : ok  
Checking for package gtkmm-2.4              : ok  
Checking for package cairomm-1.0            : ok  
Checking for package libglademm-2.4         : ok  
Checking for header boost/program_options.hpp  : ok  
Checking for library boost_program_options     : ok  
Checking for header boost/filesystem/path.hpp  : not found 
header boost/filesystem/path.hpp cannot be found via compiler 

Verbose shows:

Checking for package libglademm-2.4         : ok  
/usr/bin/g++ -Wall -Wextra -ansi -pedantic -pipe -ggdb3  -I. -Idefault -Idefault/ -I..  ../test.c -c -o default/test.o
/usr/bin/g++ default/test.o -o default/testprog   
Checking for header boost/program_options.hpp  : ok  
/usr/bin/g++ -Wall -Wextra -ansi -pedantic -pipe -ggdb3  -I. -Idefault -Idefault/ -I..  ../test.c -c -o default/test.o
/usr/bin/g++ default/test.o -o default/testprog -L/usr/lib/ -Wl,-Bdynamic -lboost_program_options  
Checking for library boost_program_options     : ok  
/usr/bin/g++ -Wall -Wextra -ansi -pedantic -pipe -ggdb3  -I. -Idefault -Idefault/ -I..  ../test.c -c -o default/test.o
/usr/bin/g++ default/test.o -o default/testprog   

default/test.o: In function `__static_initialization_and_destruction_0':
/usr/include/boost/system/error_code.hpp:208: undefined reference to `boost::system::get_system_category()'
/usr/include/boost/system/error_code.hpp:209: undefined reference to `boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:214: undefined reference to `boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:215: undefined reference to `boost::system::get_generic_category()'
/usr/include/boost/system/error_code.hpp:216: undefined reference to `boost::system::get_system_category()'
collect2: ld returned 1 exit status
ERROR:  == Runner ==  task failed! (return code 129 for #1)
ERROR:  == Task ==  -- task details begin --
action: cpp_link
idx:    1
source: [<b:/data/aur/gx2osd/src/gx2osd/build/.wscript-trybuild/test.o>]
target: [<b:/data/aur/gx2osd/src/gx2osd/build/.wscript-trybuild/testprog>]
-- task details end --
Checking for header boost/filesystem/path.hpp  : not found 
header boost/filesystem/path.hpp cannot be found via compiler 
 (error raised in module Configure) 

I do have that however, and in the same location as the program_options.hpp:

$ find /usr/include/boost/ -name program_options.hpp -o -name path.hpp
/usr/include/boost/filesystem/path.hpp
/usr/include/boost/program_options.hpp
/usr/include/boost/iostreams/detail/path.hpp

Looks like it's in the linking, not the compiling that it's having trouble though anyway.

The only thing I could find that might be related was this page stating that "The boost libraries detection has a few open issues" though I'm not sure if it's the same issue or not: http://groups.google.com/group/waf-user … d03b3a6bee

$ ./waf --version
/data/aur/gx2osd/src/gx2osd/.waf-1.1.0-1300596208/wafadmin/Params.py:7: DeprecationWarning: the md5 module is deprecated; use hashlib instead
  import os, sys, types, inspect, md5, base64, stat
waf 1.1.0

I tried using the waf version from AUR (1.5.18) instead of the one provided too but they appear to not be compatible with the wscript.

Has anyone built this on Arch and if so, how?  If anyone could shed some light on this I would appreciate it as I don't really know much about C++, boost, waf or python tongue

The wscript file in the src directory seems ... reasonable (in that the program_options part seems the same as the filesystem/path part) though of course this is all guess work on my part:

    e = conf.create_header_configurator()
    e.mandatory = 1 
    e.name = "boost/program_options.hpp"
    e.run()

    libconf = conf.create_library_configurator()
    libconf.uselib = 'program_options'
    libconf.name = 'boost_program_options'
    ret = libconf.run()
    if not ret:
        libconf.mandatory = 1 
        libconf.name = 'boost_program_options-st'
        libconf.run()

    e.name = 'boost/filesystem/path.hpp'
    e.run()

    libconf.mandatory = 0 
    libconf.uselib = 'filesystem'
    libconf.name = 'boost_filesystem'
    ret = libconf.run()
    if not ret:
        libconf.mandatory = 1 
        libconf.name = 'boost_filesystem-st'
        libconf.run()

JABBER: krayon -A-T- chat.qdnx.org
E-MAIL: archlinuxforums -A-T- quadronyx.org
WEB: http://www.qdnx.org/krayon/
~o~

Offline

Board footer

Powered by FluxBB