Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails at 100% #580

Closed
ssriram opened this issue Feb 24, 2017 · 8 comments
Closed

Compilation fails at 100% #580

ssriram opened this issue Feb 24, 2017 · 8 comments

Comments

@ssriram
Copy link

ssriram commented Feb 24, 2017

Compiling openspades [v0.1.0] on my laptop [elementary OS 0.4 Loki (64-bit)] [Dual-Core Intel® Core™2 Duo CPU P8800 @ 2.66GHz] [Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)]

Compilation fails at 100%

[100%] Linking CXX executable ../bin/openspades
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to TIFFReadRGBAImage@LIBTIFF_4.0' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to TIFFGetField@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to TIFFSetErrorHandler@LIBTIFF_4.0' /usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to TIFFClose@LIBTIFF_4.0'
/usr/lib/gcc/x86_64-linux-gnu/5/../../../x86_64-linux-gnu/libSDL2_image.so: undefined reference to `TIFFClientOpen@LIBTIFF_4.0'
collect2: error: ld returned 1 exit status
Sources/CMakeFiles/OpenSpades.dir/build.make:5748: recipe for target 'bin/openspades' failed
make[2]: *** [bin/openspades] Error 1
CMakeFiles/Makefile2:224: recipe for target 'Sources/CMakeFiles/OpenSpades.dir/all' failed
make[1]: *** [Sources/CMakeFiles/OpenSpades.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2

I see its an issue with linking. Is there a way to overcome this?

@yvt
Copy link
Owner

yvt commented Feb 24, 2017

Installing libtiff4 by using a command like sudo apt-get install libtiff4-dev might fix this (according to this).

@roadapathy
Copy link

That should fix it OR if you didn't compile SDL2_Image with the right options like I did, you'll get this error. SDL2_image holds a lot of the JPEG, PNG, TIFF sort of features that Openspades seems to depend on.

OR, if you compiled it yourself but cmake isn't finding it for whatever reason, same error.

@ssriram
Copy link
Author

ssriram commented Feb 24, 2017

Looks like both SDL and libtiff are installed by default. May be a different version is required?

$ sudo apt list --installed | egrep "sdl|tiff"

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libsdl-image1.2/xenial,now 1.2.12-5build2 amd64 [installed,automatic]
libsdl1.2debian/xenial,now 1.2.15+dfsg1-3 amd64 [installed,automatic]
libsdl2-2.0-0/xenial,now 2.0.4+dfsg1-2ubuntu2 amd64 [installed,automatic]
libsdl2-dev/xenial,now 2.0.4+dfsg1-2ubuntu2 amd64 [installed]
libsdl2-image-2.0-0/xenial,now 2.0.1+dfsg-2 amd64 [installed,automatic]
libsdl2-image-dev/xenial,now 2.0.1+dfsg-2 amd64 [installed]
libtiff5/xenial,now 4.0.6-1 amd64 [installed]
libtiff5-dev/xenial,now 4.0.6-1 amd64 [installed]
libtiffxx5/xenial,now 4.0.6-1 amd64 [installed,automatic]

@feikname
Copy link
Collaborator

feikname commented Feb 24, 2017

I remember successfully compiling OpenSpades on elementary OS 0.4 some time ago without any need for external downloads, so perhaps it's a missing apt dependency.

Please try to run this command and rebuild OpenSpades:

sudo apt-get install pkg-config libglew-dev libcurl3-openssl-dev libsdl2-dev libsdl2-image-dev libalut-dev xdg-utils libfreetype6-dev libopus-dev libopusfile-dev libjpeg-dev libxinerama-dev libxft-dev

Don't forget to sudo rm -rf /usr/local/share/games/openspades before doing the sudo make install step.

If that still doesn't solve your problem, read the text below:

Ubuntu completely dropped libtiff4 support 3 years ago in favor of libtiff5 and is now only available using this .deb package, as mentioned here. Please try to install this package (using dpkg,gdebi or any similar tool) and rebuild OpenSpades (again).

@roadapathy
Copy link

You need the .dev files of SDL2, I believe. If you're compiling Openspades, you need .dev of almost everything- SDL2-2xxxx.dev, SDL2_Image.dev.

@roadapathy
Copy link

libsdl2-dev libsdl2-image-dev

@yvt
Copy link
Owner

yvt commented Mar 22, 2017

Any update on this?

@feikname
Copy link
Collaborator

feikname commented Aug 21, 2017

There have been no updates on this issue for 5 months, so I will close it.

@ssriram if the issue still persists, please re-open this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants