I discovered today on amd64 architectures that make sharedlib for Irrlicht won't work without "-fPIC". See here for note: https://wiki.gentoo.org/wiki/Project:AM ... rors_Guide
To fix the problem: in the Makefile in "source/Irrlicht" I added "-fPIC" to line 100 (with the args for "sharedlib:"). However, the instructions for compiling change to:
$ make clean
$ make sharedlib
$ sudo make install
If you don't make clean, it'll give you an error.
For reference, the error is:
/usr/bin/ld: libpng/pngerror.o: relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
making a sharedlib on amd64
-
- Competition winner
- Posts: 688
- Joined: Mon Sep 10, 2012 8:51 am
Re: making a sharedlib on amd64
Thanks. I've changed that (and a few more things) in svn trunk r6207.
Can't avoid the make clean whenever options are changed as we re-use the same .o files always. Should move them to different subfolders some day based on options.
Can't avoid the make clean whenever options are changed as we re-use the same .o files always. Should move them to different subfolders some day based on options.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm