View Issue Details

IDProjectCategoryView StatusLast Update
0004449DarkRadiantDesign/Codingpublic07.07.2017 18:51
Reportermhoes Assigned Togreebo  
Status closedResolutionfixed 
PlatformPCOSArch Linux 
Product Version2.1.0 
Target Version2.2.0Fixed in Version2.2.0 
Summary0004449: Build failure on Arch Linux
DescriptionWhen building latest git of darkradiant on Arch Linux, i get the following build error :

./configure --enable-debug --enable-darkmod-plugins


make[3]: Entering directory '/home/maarten/src/darkradiant/plugins/script'
  CXX ScriptingSystem.lo
  CXX ScriptCommand.lo
  CXX ScriptModule.lo
  CXX ScriptMenu.lo
  CXX ScriptWindow.lo
  CXX SceneNodeBuffer.lo
  CXX interfaces/DialogInterface.lo
  CXX interfaces/EClassInterface.lo
  CXX interfaces/BrushInterface.lo
  CXX interfaces/RadiantInterface.lo
  CXX interfaces/PatchInterface.lo
  CXX interfaces/SelectionInterface.lo
  CXX interfaces/MapInterface.lo
  CXX interfaces/EntityInterface.lo
  CXX interfaces/MathInterface.lo
  CXX interfaces/ModelInterface.lo
  CXX interfaces/CommandSystemInterface.lo
  CXX interfaces/FileSystemInterface.lo
  CXX interfaces/GridInterface.lo
  CXX interfaces/ShaderSystemInterface.lo
  CXX interfaces/SkinInterface.lo
  CXX interfaces/SelectionSetInterface.lo
  CXX interfaces/SoundInterface.lo
  CXX interfaces/GameInterface.lo
.libs/ScriptingSystem.o: In function `boost::python::to_python_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
/usr/include/boost/python/converter/builtin_converters.hpp:158: undefined reference to `PyUnicode_FromStringAndSize'
.libs/ScriptingSystem.o: In function `boost::python::to_python_value<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&>::operator()(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
/usr/include/boost/python/converter/builtin_converters.hpp:158: undefined reference to `PyUnicode_FromStringAndSize'
.libs/ScriptingSystem.o: In function `boost::python::converter::arg_to_python<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >::arg_to_python(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/include/boost/python/converter/builtin_converters.hpp:158: undefined reference to `PyUnicode_FromStringAndSize'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:579:] Error 1
make[3]: Leaving directory '/home/maarten/src/darkradiant/plugins/script'
make[2]: *** [Makefile:446: all-recursive] Error 1
make[2]: Leaving directory '/home/maarten/src/darkradiant/plugins'
make[1]: *** [Makefile:752: all-recursive] Error 1
make[1]: Leaving directory '/home/maarten/src/darkradiant'
make: *** [Makefile:493: all] Error 2
Steps To Reproduce./
./configure --enable-debug --enable-darkmod-plugins
Additional InformationI ran

$ make SHELL="/bin/bash -x"

to show the exact make commandline that fails. Adding this "-lpython3.5m" at the end of that line makes this particular error go away, so the line now looks like this :

$ cd ./plugins/script

$ g++ -fPIC -DPIC -shared -nostdlib /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../lib/crti.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/crtbeginS.o .libs/ScriptingSystem.o .libs/ScriptCommand.o .libs/ScriptModule.o .libs/ScriptMenu.o .libs/ScriptWindow.o .libs/SceneNodeBuffer.o interfaces/.libs/DialogInterface.o interfaces/.libs/EClassInterface.o interfaces/.libs/BrushInterface.o interfaces/.libs/RadiantInterface.o interfaces/.libs/PatchInterface.o interfaces/.libs/SelectionInterface.o interfaces/.libs/MapInterface.o interfaces/.libs/EntityInterface.o interfaces/.libs/MathInterface.o interfaces/.libs/ModelInterface.o interfaces/.libs/CommandSystemInterface.o interfaces/.libs/FileSystemInterface.o interfaces/.libs/GridInterface.o interfaces/.libs/ShaderSystemInterface.o interfaces/.libs/SkinInterface.o interfaces/.libs/SelectionSetInterface.o interfaces/.libs/SoundInterface.o interfaces/.libs/GameInterface.o -Wl,-rpath -Wl,/home/maarten/src/darkradiant/libs/math/.libs -Wl,-rpath -Wl,/home/maarten/src/darkradiant/libs/wxutil/.libs -Wl,-rpath -Wl,/home/maarten/src/darkradiant/libs/xmlutil/.libs -Wl,-rpath -Wl,/home/maarten/src/darkradiant/libs/scene/.libs -Wl,-rpath -Wl,/usr/local/lib/darkradiant -L/home/maarten/src/darkradiant/libs/math/.libs -L/home/maarten/src/darkradiant/libs/xmlutil/.libs -L/home/maarten/src/darkradiant/libs/scene/.libs -lboost_python3 -lpython2.7 -lpthread -ldl -lutil ../../libs/math/.libs/ ../../libs/wxutil/.libs/ -lGLEW -lwx_gtk2u_gl-3.0 -lwx_gtk2u_stc-3.0 -lwx_gtk2u_xrc-3.0 -lwx_gtk2u_webview-3.0 -lwx_gtk2u_html-3.0 -lwx_gtk2u_qa-3.0 -lwx_gtk2u_adv-3.0 -lwx_gtk2u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0 -lGL -lboost_filesystem -lboost_system -lGLU -lftgl /home/maarten/src/darkradiant/libs/xmlutil/.libs/ -lxml2 /home/maarten/src/darkradiant/libs/scene/.libs/ /home/maarten/src/darkradiant/libs/math/.libs/ -lsigc-2.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1 -L/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../lib -L/lib/../lib -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../.. -lstdc++ -lm -lc -lgcc_s /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/crtendS.o /usr/lib/gcc/x86_64-pc-linux-gnu/6.2.1/../../../../lib/crtn.o -g -O0 -pthread -Wl,-z -Wl,defs -pthread -Wl,-soname -Wl, -o .libs/ -lpython3.5m

I added the 'config.log' file created by configure as an attachment, perhaps that helps.
TagsNo tags attached.




27.12.2016 11:13


config.log.arch-linux.gz (16,710 bytes)


27.12.2016 16:23

administrator   ~0008648

The linker error indeed refers to a missing Python symbol which is defined in the corresponding import library, which you've been adding by "-lpython3.5m".

Though I'm not sure what I can do at this point to resolve this. Am I supposed to update the makefiles such that they work in both Debian-based distros and Arch? Is that something that can be done at all?


27.12.2016 16:29

reporter   ~0008651

i honestly wouldn't know. perhaps './configure' doesn't get it exactly right, in all cases ? feel free to close again. sorry.


27.12.2016 17:27

administrator   ~0008652

I'm not an automake expert by all standards, so I'd be grateful if someone with actual knowledge about this problem could give me some advice.

I'm also not sure how to even try compilation in Arch, there doesn't seem to be a fully configured live ISO to start or even install it. Do they seriously require all of their users to start from scratch?


27.12.2016 17:55

administrator   ~0008653

Can you show me the output of this command on your system?

python2-config --libs


27.12.2016 18:00

administrator   ~0008654

Ah, nevermind, it's in the config.log you attached. It shows that your python linker command line is

"-lpython2.7 -lpthread -ldl -lutil -lm",

which is Python 2.7. But the boost python library seems to refer to Python 3:


Can you check which boost python package you have installed?


27.12.2016 18:20

reporter   ~0008655

yes, arch linux expects you to start from scratch; its sort of the point of arch linux. having said that, there currently is an .iso booted text/console based installer available here :

$ python2-config --libs
-lpython2.7 -lpthread -ldl -lutil -lm
$ python3-config --libs
-lpython3.5m -lpthread -ldl -lutil -lm
$ python-config --libs
-lpython3.5m -lpthread -ldl -lutil -lm

not sure about the 'boost python' package you requested; there doesn't seem to be a specific 'boost python' package (although I may have gotten the command wrong).

$ pacman -Ss boost
extra/boost 1.62.0-4 [installed]
    Free peer-reviewed portable C++ source libraries - development headers
extra/boost-libs 1.62.0-4 [installed]
    Free peer-reviewed portable C++ source libraries - runtime libraries

python3 does seem to be the default, though, with python2 installed as an extra:

$ python --version
Python 3.5.2
$ python2 --version
Python 2.7.13

or perhaps it's part of the 'python' package ?

which states :

python (optional) - for python bindings
python2 (optional) - for python2 bindings


27.12.2016 18:36

reporter   ~0008656

Last edited: 27.12.2016 18:37

it looks like all the 'boost_python' libs are part of the 'boost' or 'boost-libs' package:

$ find / -name \*boost_python\* -exec pacman -Qo {} \; 2>/dev/null
/usr/lib/ is owned by boost-libs 1.62.0-4
/usr/lib/libboost_python.a is owned by boost 1.62.0-4
/usr/lib/ is owned by boost-libs 1.62.0-4
/usr/lib/ is owned by boost-libs 1.62.0-4
/usr/lib/ is owned by boost-libs 1.62.0-4
/usr/lib/libboost_python3.a is owned by boost 1.62.0-4



27.12.2016 18:41

administrator   ~0008657

Yes, ok, I see the boost-libs package is the only one you need on your system. It contains both the libboost-python and liboost-python3 libraries. DarkRadiant's file refers to "python2-config" (hardcoded), which is a problem, since the boost.m4 macro seems to pick libboost-python3. I guess it just picks the more recent Python version when in doubt, using the generic "python-config" command.

Can you try to change the line 139 in to use python-config instead of python2-config? This should make it work on your system again.

I'm not sure though what to do about other distros. I'm mainly focused on getting it to compile in Ubuntu. (What I definitely don't have time to do is to build linux systems from the command line, I mean, come on, it's almost 2017 now?)


27.12.2016 18:52

administrator   ~0008659

I checked the history of DR's file, and it appears that it was set up to use python-config in the past. In 2014 I applied a patch to by the user ezze, which changed it to python2-config (incidentally, the user was running Arch too).

I'll run a quick check in Ubuntu, but I'm inclined now to change it back, since the boost.m4 macro also uses python-config and using something different is just bound to produce problems.


27.12.2016 18:56

reporter   ~0008660

thanks ! yes, changing "python2-config" into "python-config" at line 139 in '' (and running git pull, ./, ./configure, of course) solves the issue. And yes, 'stuff' is still done from the command line, even in almost-2017. remember: 'in the beginning... was the command line' ;) but if you dont like the 'arch linux' approach, you are going to be horrified by 'linux from scratch' ( ;)


27.12.2016 19:07

administrator   ~0008662

Glad it's working for you, I'll change it back after testing it in Ubuntu 14.04.

I found the thread from 2014:

The problems arose when the boost.m4 macro (which was also modified in that same patch) was replaced with a newer version. The change to python2-config is not a good idea, after all.

And yes, I've heard of Linux from Scratch. Not that I'm uncapable of doing stuff in the command line. I've compiled Linux from source code that came on 20 floppy disks back in 1993 or something, but over the years I've lost interest in doing so much groundwork just because I can, even if I had the time for that these days.


27.12.2016 19:22

reporter   ~0008663

thanks ! good to verify it works out in other linux distro's, too.

and sorry this has gone so far off topic, but: to me personally, things like 'linux from scratch' are a good way to learn what goes on 'under the hood', but once you've done it (unless of course you are the maintaining a linux distro yourself), take the knowledge so you can effectively troubleshoot when things go wrong, but on a day-to-day-basis automate the heck out of it as much as you possibly can, so it all can run reproducibly on auto-pilot. ;)


27.12.2016 19:36

administrator   ~0008664

Fixed in 794104b4ff13cdc2186ab57285983113ed3ba340

Thanks for the assistance, mhoes

Issue History

Date Modified Username Field Change
27.12.2016 11:13 mhoes New Issue
27.12.2016 11:13 mhoes File Added: config.log.arch-linux.gz
27.12.2016 16:23 greebo Note Added: 0008648
27.12.2016 16:29 mhoes Note Added: 0008651
27.12.2016 17:27 greebo Note Added: 0008652
27.12.2016 17:55 greebo Note Added: 0008653
27.12.2016 17:56 greebo Status new => feedback
27.12.2016 18:00 greebo Note Added: 0008654
27.12.2016 18:20 mhoes Note Added: 0008655
27.12.2016 18:20 mhoes Status feedback => new
27.12.2016 18:36 mhoes Note Added: 0008656
27.12.2016 18:37 mhoes Note Edited: 0008656
27.12.2016 18:41 greebo Note Added: 0008657
27.12.2016 18:52 greebo Note Added: 0008659
27.12.2016 18:56 mhoes Note Added: 0008660
27.12.2016 19:07 greebo Note Added: 0008662
27.12.2016 19:10 greebo Assigned To => greebo
27.12.2016 19:10 greebo Status new => assigned
27.12.2016 19:10 greebo Target Version => 2.2.0
27.12.2016 19:22 mhoes Note Added: 0008663
27.12.2016 19:36 greebo Note Added: 0008664
27.12.2016 19:36 greebo Status assigned => resolved
27.12.2016 19:36 greebo Fixed in Version => 2.2.0
27.12.2016 19:36 greebo Resolution open => fixed
07.07.2017 18:51 greebo Status resolved => closed