Jump to content
The Dark Mod Forums

Compilation error on Linux Mint


Recommended Posts

I'm trying to follow the DR compilation instructions, using a Linux Mint system (apparently Mint is different enough from its near relatives to be unable to resolve dependencies for the Debian and Ubuntu .deb files). I installed packages based on the list given for Ubuntu 19.xx / 18.xx / 17.xx, except that apparently libwxgtk3.0-dev is now called libwxgtk3.0-gtk3-dev. I get the following errors during `make`:

Making all in script
make[3]: Entering directory '/media/rfjs/DATA/code/DarkRadiant/plugins/script'
  CXXLD    script.la
/bin/bash: --exec-prefix: command not found
/bin/bash: --includes: command not found
/bin/bash: --libs: command not found
/bin/bash: --cflags: command not found
/bin/bash: --ldflags: command not found
/bin/bash: --extension-suffix: command not found
/bin/bash: --help: command not found
/bin/bash: --configdir: command not found
make[3]: *** [Makefile:617: script.la] Error 127
make[3]: Leaving directory '/media/rfjs/DATA/code/DarkRadiant/plugins/script'
make[2]: *** [Makefile:446: all-recursive] Error 1
make[2]: Leaving directory '/media/rfjs/DATA/code/DarkRadiant/plugins'
make[1]: *** [Makefile:755: all-recursive] Error 1
make[1]: Leaving directory '/media/rfjs/DATA/code/DarkRadiant'
make: *** [Makefile:496: all] Error 2

A bit of Googling suggests those -- strings are options for python-config, so why they're being treated as shell commands has me mystified.

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Making all in script
make[3]: Entering directory '/media/rfjs/DATA/code/DarkRadiant/plugins/script'
/bin/bash ../../libtool  --tag=CXX   --mode=link g++ -std=c++11 -std=c++17  -g -O2 -DNDEBUG  -Wall -Wno-unused-variable -Werror=return-type  -module -avoid-version -lstdc++fs Usage: /usr/bin/python-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir -L/usr/lib/x86_64-linux-gnu -pthread   -lwx_gtk3u_gl-3.0 -lwx_gtk3u_stc-3.0 -lwx_gtk3u_xrc-3.0 -lwx_gtk3u_html-3.0 -lwx_gtk3u_qa-3.0 -lwx_gtk3u_adv-3.0 -lwx_gtk3u_core-3.0 -lwx_baseu_xml-3.0 -lwx_baseu_net-3.0 -lwx_baseu-3.0  -lsigc-2.0  -o script.la -rpath /usr/local/lib/darkradiant/modules ScriptingSystem.lo ScriptCommand.lo ScriptModule.lo ScriptMenu.lo ScriptWindow.lo SceneNodeBuffer.lo PythonModule.lo interfaces/DialogInterface.lo interfaces/EClassInterface.lo interfaces/BrushInterface.lo interfaces/RadiantInterface.lo interfaces/PatchInterface.lo interfaces/SelectionInterface.lo interfaces/MapInterface.lo interfaces/EntityInterface.lo interfaces/MathInterface.lo interfaces/ModelInterface.lo interfaces/CommandSystemInterface.lo interfaces/FileSystemInterface.lo interfaces/GridInterface.lo interfaces/SceneGraphInterface.lo interfaces/ShaderSystemInterface.lo interfaces/SkinInterface.lo interfaces/SelectionSetInterface.lo interfaces/SelectionGroupInterface.lo interfaces/SoundInterface.lo interfaces/GameInterface.lo ../../libs/math/libmath.la ../../libs/wxutil/libwxutil.la 
/bin/bash: --exec-prefix: command not found
/bin/bash: --includes: command not found
/bin/bash: --libs: command not found
/bin/bash: --cflags: command not found
/bin/bash: --ldflags: command not found
/bin/bash: --extension-suffix: command not found
/bin/bash: --help: command not found
/bin/bash: --configdir: command not found
make[3]: *** [Makefile:617: script.la] Error 127
make[3]: Leaving directory '/media/rfjs/DATA/code/DarkRadiant/plugins/script'
make[2]: *** [Makefile:446: all-recursive] Error 1
make[2]: Leaving directory '/media/rfjs/DATA/code/DarkRadiant/plugins'
make[1]: *** [Makefile:755: all-recursive] Error 1
make[1]: Leaving directory '/media/rfjs/DATA/code/DarkRadiant'
make: *** [Makefile:496: all] Error 2

 

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Oh, I see the problem. DarkRadiant's configure script is obviously calling a system-wide python-config to get the link parameters for Python, but something is wrong with the arguments which means that the script just returns a usage message rather than compiler flags. The build script is not handling this and just injecting the usage message directly into the linker command line which fails because the usage message is not a set of valid compiler options.

I'm not sure what the root cause is, but you might be able to work around it by providing the relevant configure option to disable building the Python module.

  • Thanks 1
Link to comment
Share on other sites

Could this line in config.log be related?

PYTHON_LIBS='Usage: /usr/bin/python-config --prefix|--exec-prefix|--includes|--libs|--cflags|--ldflags|--extension-suffix|--help|--configdir'

Digging around a bit I found this:

# Python 3.8 requires the --embed switch to produce working linker flags
        PC_PYTHON_VERIFY_VERSION([>=], [3.8.0],
            [PYTHON_LIBS=`$PYTHON_CONFIG --libs --embed`],
            [PYTHON_LIBS=`$PYTHON_CONFIG --libs`])

I have Python 3.8.2 on my system but --embed doesn't appear in the options list for python-config.

Edit: Further investigation suggests my python-config may be the python2 version. From output of `aptitude search python-dev`:

i  python-dev-is-python2 - symlinks /usr/bin/python-config to the DEPRECATED python2-config

Edit: yes, that seems to be it. From https://launchpad.net/ubuntu/+source/what-is-python/3

Quote

In Ubuntu, all python packages use explicit python3 or python2  interpreter and do not use unversioned /usr/bin/python-config at all. Some
 third-party code may still be python2 based, yet may use  /usr/bin/python-config.
 .
 This is a convenience package which ships a symlink to point  the /usr/bin/python-config script at the current default python2.
 It may improve compatibility with obsolete 3rd-party software,  whilst breaking some modern software.

 

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

Okay, installing python-is-python3/python-dev-is-python3 let me finish compilation. Although I don't have a script tab or script dropdown, despite not having deliberately disabled script support.

Edit: possibly related lines from darkradiant.log:

 (140103598541440) ModuleLoader: Loading module '/usr/local/lib/darkradiant/modules/script.so'
 (140103598541440) WARNING: Failed to load module /usr/local/lib/darkradiant/modules/script.so:
 (140103598541440) /usr/local/lib/darkradiant/modules/script.so: undefined symbol: _Py_ZeroStruct

 

Edited by VanishedOne

Some things I'm repeatedly thinking about...

 

- louder scream when you're dying

Link to comment
Share on other sites

  • 3 months later...

Having just upgraded to Ubuntu 20.04, I can now reproduce this problem.

As of Git 6a093c45fad6bb69ed4ccd8e76df121313917cfc, I am now explicitly requesting python3-config instead of the unversioned and deprecated python-config, which fixes the compilation error but does not fix the loading of the script module due to the missing _Py_ZeroStruct symbol.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recent Status Updates

    • Nort

      Spent most of the day learning and writing about AI navigation. It's stuff I already know, but the magic about writing something down as clearly formulated as possible, is that you then see things that much more clearly. You also find what's unclear to you, and then you figure out exactly how things work. I was hoping to get through it all within just a day, but it looks like this will take tomorrow as well, at this rate. There's also plenty of other nonsense I have to get through as well. Everything's a chore.
      · 0 replies
    • Nort

      I want to be a fish, but I'm not a fish. My mom wants to be a fish too, and so she's killing herself eating plankton and sh***ng blood, and tells me to stop nagging her about taking her medication. I spent several hours today, just lying in bed, having anxiety over just existing, and not being a fish. You fish, you don't know how lucky you are. You can eat all the plankton you want. I tried eating plankton again yesterday, and I just got sick. I hate being a shark.
      · 0 replies
    • Nort

      I just gave myself vertigo. A pleasant kind of vertigo, like the world has been lifted off my shoulders. I'll explain:
      Yesterday I saw to my dismay, that I had made my entire map two - two - units too short on every level - that every set01 piece was sticking 2 units into the ceiling. That's basically 402 brushes that needs to be realigned (minus the ground floor brushes).
      I knew enough about selections to do all of that in a very tense five minutes, and it compiled without leaks. (Thank you so much, Dark Radiant devs, for making an editor with such care for precision that you can align hundreds of brushes perfectly at once (which is not something I can say for Valve's Hammer editor, which has some serious issues on that front, which actually made me just quit it in disgust).) However, the result is that the entire level has now been stretched a barely noticable 2 units, and it will take some getting used to psychologically.
      · 0 replies
    • Nort

      My workflow is basically running from a chain of disasters, eventually trying to seek shelter in former disasters. It's not ideal - it's just my life.
      When I abandoned my first map, it was out of a typical mental breakdown, and so I returned to find a skybox void where the kitchen door should have been (due to a misplaced visportal) and two overlapping brushes Z-fighting on the kitchen floor.
      I've now cleaned up the last bit of mess, by cleanly separating every floor into its own layer. Now I can finally work on each floor in peace.
      ...not that I really needed to. Once you get skilled enough, the orthographic messes, well, I'll let this video speak for itself:
       
      · 1 reply
    • Nort

      Beams, beams, beams...
      Support beams, and cross beams, and then beams to fixate the support beams to the cross beams. The more beams you have in a map, the better. There's walls, floors and ceilings, but the rest of the map is pretty much just beams. Beams makes a thief happy.
      · 0 replies
×
×
  • Create New...