ptitSeb / ctp2

Civ: CTP2 (Call to Power 2) port to Linux, Pandora and Pyra. Status: Working
30 stars 2 forks source link

build fails #2

Open ghost opened 6 years ago

ghost commented 6 years ago

Using Ubuntu 18.04 build fails with follows:

/usr/bin/x86_64-linux-gnu-ld: os/nowin32/.libs/libosnowin32.a(nowin32.o): undefined reference to symbol 'g_type_check_instance_cast' /usr/lib/gcc/x86_64-linux-gnu/7/../../../x86_64-linux-gnu/libgobject-2.0.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:2756: recipe for target 'ctp2' failed make[2]: [ctp2] Error 1 make[2]: Leaving directory '../ctp2-master/ctp2_code' Makefile:3333: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '../ctp2-master/ctp2_code' GNUmakefile:467: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

that can be fixed by adding $(GTK_LIBS) to line:

libosnowin32.la: $(libosnowin32_la_OBJECTS) $(libosnowin32_la_DEPENDENCIES) $(EXTRA_libosnowin32_la_DEPENDENCIES) $(AM_V_CXXLD)$(libosnowin32_la_LINK) $(libosnowin32_la_OBJECTS) $(libosnowin32_la_LIBADD) $(LIBS)

in ctp2_code/os/nowin32/Makefile

performing make clean && make we ended up with:

gfx/gfx_utils/.libs/libgfxgfx_utils.a(tiffutils.o): In function tiffutils_LoadTIF': ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:41: undefined reference toTIFFOpen' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:45: undefined reference to TIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:46: undefined reference toTIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:49: undefined reference to _TIFFmalloc' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:52: undefined reference toTIFFReadRGBAImage' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:56: undefined reference to _TIFFfree' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:57: undefined reference toTIFFClose' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:64: undefined reference to _TIFFfree' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:65: undefined reference toTIFFClose' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:73: undefined reference to TIFFClose' gfx/gfx_utils/.libs/libgfxgfx_utils.a(tiffutils.o): In functionTIF2mem': ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:87: undefined reference to TIFFOpen' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:90: undefined reference toTIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:91: undefined reference to TIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:97: undefined reference toTIFFClose' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:104: undefined reference to _TIFFmalloc' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:107: undefined reference toTIFFReadRGBAImage' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:117: undefined reference to _TIFFfree' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:120: undefined reference toTIFFClose' gfx/gfx_utils/.libs/libgfxgfx_utils.a(tiffutils.o): In function TIFGetMetrics': ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:135: undefined reference toTIFFOpen' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:142: undefined reference to TIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:143: undefined reference toTIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:145: undefined reference to TIFFClose' gfx/gfx_utils/.libs/libgfxgfx_utils.a(tiffutils.o): In functionTIFLoadIntoBuffer16': ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:159: undefined reference to TIFFOpen' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:163: undefined reference toTIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:164: undefined reference to TIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:168: undefined reference to_TIFFmalloc' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:172: undefined reference to TIFFReadRGBAImage' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:216: undefined reference to_TIFFfree' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:219: undefined reference to TIFFClose' gfx/gfx_utils/.libs/libgfxgfx_utils.a(tiffutils.o): In functionStripTIF2Mem': ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:235: undefined reference to TIFFOpen' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:249: undefined reference toTIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:250: undefined reference to TIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:251: undefined reference toTIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:252: undefined reference to TIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:253: undefined reference toTIFFGetField' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:255: undefined reference to TIFFScanlineSize' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:256: undefined reference toTIFFStripSize' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:266: undefined reference to TIFFComputeStrip' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:266: undefined reference toTIFFReadEncodedStrip' ../ctp2-master/ctp2_code/gfx/gfx_utils/tiffutils.cpp:282: undefined reference to TIFFClose' sound/.libs/libsound.a(soundmanager.o): In functionSoundManager::InitSoundDriver()': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:168: undefined reference to Mix_OpenAudio' sound/.libs/libsound.a(soundmanager.o): In functionSoundManager::CleanupSoundDriver()': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:202: undefined reference to Mix_CloseAudio' sound/.libs/libsound.a(soundmanager.o): In functionSoundManager::CleanupRedbook()': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:272: undefined reference to Mix_FreeMusic' sound/.libs/libsound.a(soundmanager.o): In functionSoundManager::ProcessRedbook()': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:298: undefined reference to Mix_PlayingMusic' sound/.libs/libsound.a(soundmanager.o): In functionSoundManager::Process(unsigned int const&, unsigned int&)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:375: undefined reference to Mix_Playing' ../ctp2-master/ctp2_code/sound/soundmanager.cpp:400: undefined reference toMix_Playing' sound/.libs/libsound.a(soundmanager.o): In function SoundManager::AddSound(SOUNDTYPE const&, unsigned int const&, int const&, int, int)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:492: undefined reference toMix_PlayChannelTimed' sound/.libs/libsound.a(soundmanager.o): In function SoundManager::AddLoopingSound(SOUNDTYPE const&, unsigned int const&, int const&, int, int)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:538: undefined reference toMix_PlayChannelTimed' sound/.libs/libsound.a(soundmanager.o): In function SoundManager::TerminateLoopingSound(SOUNDTYPE const&, unsigned int const&)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:559: undefined reference toMix_HaltChannel' sound/.libs/libsound.a(soundmanager.o): In function SoundManager::TerminateAllLoopingSounds(SOUNDTYPE const&)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:589: undefined reference toMix_HaltChannel' sound/.libs/libsound.a(soundmanager.o): In function SoundManager::TerminateSounds(SOUNDTYPE const&)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:622: undefined reference toMix_HaltChannel' sound/.libs/libsound.a(soundmanager.o): In function SoundManager::SetVolume(SOUNDTYPE const&, unsigned int const&)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:678: undefined reference toMix_VolumeMusic' ../ctp2-master/ctp2_code/sound/soundmanager.cpp:680: undefined reference to Mix_VolumeMusic' sound/.libs/libsound.a(soundmanager.o): In functionSoundManager::StartMusic(int const&)': ../ctp2-master/ctp2_code/sound/soundmanager.cpp:932: undefined reference to Mix_FreeMusic' ../ctp2-master/ctp2_code/sound/soundmanager.cpp:935: undefined reference toMix_LoadMUS' ../ctp2-master/ctp2_code/sound/soundmanager.cpp:937: undefined reference to Mix_PlayMusic' sound/.libs/libsound.a(civsound.o): In functionCivSound::CivSound(unsigned int const&, int const&)': ../ctp2-master/ctp2_code/sound/civsound.cpp:90: undefined reference to Mix_LoadWAV_RW' sound/.libs/libsound.a(civsound.o): In functionCivSound::~CivSound()': ../ctp2-master/ctp2_code/sound/civsound.cpp:103: undefined reference to Mix_FreeChunk' sound/.libs/libsound.a(civsound.o): In functionCivSound::SetVolume(int const&)': ../ctp2-master/ctp2_code/sound/civsound.cpp:205: undefined reference to Mix_VolumeChunk' ../ctp2-master/ctp2_code/sound/civsound.cpp:207: undefined reference toMix_VolumeChunk' collect2: error: ld returned 1 exit status Makefile:2756: recipe for target 'ctp2' failed make[2]: [ctp2] Error 1 make[2]: Leaving directory '../ctp2-master/ctp2_code' Makefile:3333: recipe for target 'all-recursive' failed make[1]: [all-recursive] Error 1 make[1]: Leaving directory '../ctp2-master/ctp2_code' GNUmakefile:467: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1

Look's like the build system is broken.

ptitSeb commented 6 years ago

I'll check that. Looks like the build system missed some gtk dependancies, that's strange.

ghost commented 6 years ago

Thank you, I'll try to build on another machine with Ubuntu 16.04.

ghost commented 5 years ago

Ubuntu 16.04 failed in similar way, compiled by hand dependencies improves the sitation