Jump to content

cmake failure and other weirdness


eriksiers

Recommended Posts

I seem to be having problems with the cmake build process. I'm not entirely sure what to do, or if I even *can* fix this. (I've never used cmake before and know nothing about it; I'm also not much of a C programmer so I can't really help there.)

 

Here's the error text:

Scanning dependencies of target GUIScript

[ 80%] Building CXX object gemrb/plugins/GUIScript/CMakeFiles/GUIScript.dir/GUIScript.o

[ 80%] Building CXX object gemrb/plugins/GUIScript/CMakeFiles/GUIScript.dir/PythonHelpers.o

Linking CXX shared module ../GUIScript.so

/usr/lib/python2.5/config/libpython2.5.a(dynload_shlib.o): In function `_PyImport_GetDynLoadFunc':

dynload_shlib.c:(.text+0x12c): undefined reference to `dlsym'

dynload_shlib.c:(.text+0x193): undefined reference to `dlopen'

dynload_shlib.c:(.text+0x1c1): undefined reference to `dlsym'

dynload_shlib.c:(.text+0x230): undefined reference to `dlerror'

/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function `posix_forkpty':

posixmodule.c:(.text+0x3a49): undefined reference to `forkpty'

/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function `posix_openpty':

posixmodule.c:(.text+0x3ad8): undefined reference to `openpty'

collect2: ld returned 1 exit status

make[2]: *** [gemrb/plugins/GUIScript.so] Error 1

make[1]: *** [gemrb/plugins/GUIScript/CMakeFiles/GUIScript.dir/all] Error 2

make: *** [all] Error 2

 

The sources were checked out from git a few hours ago; I got similar errors (or maybe identical; didn't write them down) from the 0.6.2 source archive.

 

Some possibly-important numbers (let me know if you need any other info):

  • Slackware 12.2 (kernel 2.6.35.4) running on a Pentium III
  • cmake version 2.6-patch 2
  • Python 2.5.2

 

Interestingly enough, autogen.sh was able to create a makefile (which gave me an apparently-working binary).

 

Possibly unrelated to the build problems are several... not-so-good things, ranging from "that's weird" to "WTF?" A sampling:

  • no sound, even though I have both OpenAL and SDL installed (tried both in gemrb.cfg)
  • TOB saves shown in the SOA load screen
  • many keys not working
  • character arbitration button visible in single-player game
  • while futzing around in various screens (inventory, character, etc.) somehow my character got into a fight in the Adventurer's Mart, when he should've been standing like a lump
  • another random attack while I was in Mira's store (Waukeen's Promenade)
  • resting in Waukeen's Promenade gave me first the "camping outdoors" movie, then the "resting in an inn" movie, back-to-back

 

That's just a short list; there were several other errors. (The engine says that an "unregistered attack" happened with both unexpected attacks. The first attack ended in my death, and that at least worked. :blush: ) Sorry if any of these are known bugs (or whatever), but I've been installing crap for hours trying to get to the point where I could install GemRB and my brain's turned off for the night.

 

I'm guessing that something went wrong during the compile, but there were no obvious errors, and 'make check' reported no failures.

Link to comment

The no sound problem is most likely fixable if you disable or delay (recommended) the nullsound plugin.

Add this to your gemrb.cfg

 

DelayPlugin=NullSound.dll

 

The hotkeys are not implemented yet (there is just a quick hack to enable the most used ones).

The character arbitration button will most likely stay and will enable party adjustments even in single player games. (It is easy to disable by guiscript for purists).

 

random attacks: now, that is weird, never heard about this before.

If you can investigate this a bit more, that would be very helpful.

 

It is lucky that you managed to compile with autogen.sh, because our makefile specialists don't support autotools anymore (i'm the only one who still compiles it with autotools, and i'm far from expert regarding the build process).

Link to comment
The no sound problem is most likely fixable if you disable or delay (recommended) the nullsound plugin.

Add this to your gemrb.cfg

 

DelayPlugin=NullSound.dll

Added it immediately after the 'AudioDriver = openal' line; no dice. It's possibly (or even likely) that the problem is a configuration issue with the sound libs on my end -- I'm not that great with such things.

 

If the game works "good enough", I can handle no sounds.

 

The hotkeys are not implemented yet (there is just a quick hack to enable the most used ones).

That's... weird. It seems like hotkeys would be one of the easiest things to do. Shrug.

 

The character arbitration button will most likely stay and will enable party adjustments even in single player games. (It is easy to disable by guiscript for purists).

It does nothing for me in single-player games. (Character arbitration doesn't open.)

 

random attacks: now, that is weird, never heard about this before.

If you can investigate this a bit more, that would be very helpful.

Next time I notice it happening, I'll try to capture the console output for you. Of course, having said that, it'll probably never happen again. :blush:

 

It is lucky that you managed to compile with autogen.sh, because our makefile specialists don't support autotools anymore (i'm the only one who still compiles it with autotools, and i'm far from expert regarding the build process).

And I know nothing about auto-anything so I can't help there either.

 

It's trying to link to static python libraries. You do have also their dynamic versions (libpython2.5.so)?

Yes, in /usr/lib. In fact, only dynamic Python libs there; no static Python libs.

 

And what does this print: python-config --libs

sh-3.1$ python-config --libs

-lpthread -ldl -lutil -lm -lpython2.5

 

Anyway, the problems I listed were just some of the things I noticed. There were many, many other weird things (for example: the shadows in the circus tent are all using ghoul animations; the size of the cloudkill is maybe twice the diameter it should be; TOB saves don't show up in the TOB load screen, but can be loaded from the SOA load screen). I could try to get some sort of usable list put together, but I'm not exactly known for being motivated at such things, and it might be ready tomorrow... or next year.

 

For now, I've put up a console dump of a game I just ran (briefly), which includes both an SOA game, and a TOB game. Look here: http://68.228.233.233:21676/gemrb.html. (This is my home machine, behind DHCP. The address should be good for at least a week.)

Link to comment
Huh, that's fine, but then why is it looking at /usr/lib/python2.5/config/libpython2.5.a ? :s

Let me clarify: no static Python libs in /usr/lib -- the above-mentioned libpython2.5.a is where the build error says it is.

 

You shouldn't need DelayPlugin. Did any of the audio drivers actually get built?

OpenAL says it built and installed itself correctly; whatever make tests there were completed correctly successfully or I wouldn't have done 'make install'. SDL was installed with the OS (which was just installed last week, even though it's not the current version of Slackware) and is working fine with other "stuff".

 

(Or do you mean something in the GemRB build? In which case, :blush:)

Link to comment
He meant the two audio plugins of GemRB.

Um. Ok. How do I know if they got built? What do I look for?

 

Try this: http://pastebin.ca/1934295

 

I'm not sure why I don't need the extra specifier, but after some research it appears this is a common problem.

Well, that patch removed the errors in function _PyImport_GetDynLoadFunc, but the build still failed in the same place:

Scanning dependencies of target GUIScript

[ 80%] Building CXX object gemrb/plugins/GUIScript/CMakeFiles/GUIScript.dir/GUIScript.o

[ 80%] Building CXX object gemrb/plugins/GUIScript/CMakeFiles/GUIScript.dir/PythonHelpers.o

Linking CXX shared module ../GUIScript.so

/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function `posix_forkpty':

posixmodule.c:(.text+0x3a49): undefined reference to `forkpty'

/usr/lib/python2.5/config/libpython2.5.a(posixmodule.o): In function `posix_openpty':

posixmodule.c:(.text+0x3ad8): undefined reference to `openpty'

collect2: ld returned 1 exit status

make[2]: *** [gemrb/plugins/GUIScript.so] Error 1

make[1]: *** [gemrb/plugins/GUIScript/CMakeFiles/GUIScript.dir/all] Error 2

make: *** [all] Error 2

I'm guessing that perhaps my libpython2.5.a was built without something necessary ("forkpty" and "openpty" or something).

 

Maybe if I grabbed the latest Python 2 and recompiled it might help. (But, just like I'm not much of a C programmer, I'm not a Python programmer at all; that's just a guess.)

Link to comment
He meant the two audio plugins of GemRB.

Um. Ok. How do I know if they got built? What do I look for?

 

You know if they got build, if the compiled .so modules are in the plugin dir. (OpenALAudio and SDLAudio)

Alternatively, you look at the console output of gemrb startup.

It prints which plugin was loaded, or if it was not loaded, it may give hints why not.

If it prints that NullSound was loaded and later prints that OpenAlAudio cannot be loaded, you need to delay the nullsound. If it prints first that it cannot load openalaudio, then something went wrong at compilation.

Link to comment
Add also -lutil in the same manner the previous patch did -ldl.

[blank look] Add it where? I'm getting roughly a billion results from grep. (I don't know anything about build processes either, did I mention that? :blush: )

 

You know if they got build, if the compiled .so modules are in the plugin dir. (OpenALAudio and SDLAudio)

Alternatively, you look at the console output of gemrb startup.

It prints which plugin was loaded, or if it was not loaded, it may give hints why not.

If it prints that NullSound was loaded and later prints that OpenAlAudio cannot be loaded, you need to delay the nullsound. If it prints first that it cannot load openalaudio, then something went wrong at compilation.

Ok, OpenALAudio got built; SDLAudio did not. At startup, it reports NullSound before OpenALAudio, so I'll try that delay again tonight. (Can't exactly test it now; have to leave for work in about 2 seconds.)

 

I'll grab the latest sources from git tonight and recompile. Is there a way to force it to build SDLAudio?

Link to comment

gemrb/plugins/GUIScript/CMakeLists.txt - look at the previous patch.

 

Why force the build of SDLAudio? It clearly didn't think your system is good enough (missing sdl_mixer would be my guess). The OpenAL plugin is much better anyway.

Link to comment

Sorry for not replying sooner; this past week has been... difficult.

 

gemrb/plugins/GUIScript/CMakeLists.txt - look at the previous patch.

 

Why force the build of SDLAudio? It clearly didn't think your system is good enough (missing sdl_mixer would be my guess). The OpenAL plugin is much better anyway.

My thinking was that maybe something was going on that made cmake think that SDLAudio was a bad idea, when it might really be a good idea. (sdl_mixer is present, and I assume working.)

 

Anyway, for all intents and purposes I've given up. The problem is almost certainly with my system, not anything in the project, and I have no idea how to solve it (or even where to begin). Perhaps in the future the build process will be to the point that things are... a little more "clueless user"-friendly.

 

Thanks for the attempts at helping.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...