Tetgen_plugin compilation error, 64bit

Discussion about building and installing Elmer
Post Reply
wing
Posts: 10
Joined: 14 Oct 2009, 11:49

Tetgen_plugin compilation error, 64bit

Post by wing » 29 Oct 2009, 18:40

Hi forum,
I compiled Elmer (64bit) successfully and it runs well. But when I tried to compile tetgen plugin for ElmrGUI I got the error below.

Code: Select all

/usr/bin/ld: predicates.o: relocation R_X86_64_32 against `__gxx_personality_v0' can not be used when making a shared object; recompile with -fPIC
predicates.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[1]: *** [libtetplugin.so.1.0.0] Error 1
make[1]: Leaving directory `/home/wing/software/elmer-svn/trunk/misc/tetgen_plugin/plugin'
make: *** [sub-plugin-make_default] Error 2
Seems that it's a AMD64-related issue? Google quite a while but no solution yet.
Any input will be appreciated.

Thanks and regards,
wing

mal
Site Admin
Posts: 54
Joined: 21 Aug 2009, 14:21

Re: Tetgen_plugin compilation error, 64bit

Post by mal » 29 Oct 2009, 22:07

Please do "svn update" and recompile the plugin.

wing
Posts: 10
Joined: 14 Oct 2009, 11:49

Re: Tetgen_plugin compilation error, 64bit

Post by wing » 30 Oct 2009, 18:17

mal wrote:Please do "svn update" and recompile the plugin.
Thanks mal. compiled after svn-update and the same error occurred. Finally it is solved after some modification of plugin/Makefile file.
wing@liuyj-n:~/software/elmer-svn/trunk/misc/tetgen_plugin/plugin$ diff Makefile Makefile.bak
14,15c14,15
< CFLAGS = -fPIC -pipe -O2 -w -D_REENTRANT $(DEFINES)
< CXXFLAGS = -fPIC -pipe -DTETLIBRARY -O2 -w -D_REENTRANT $(DEFINES)
---
> CFLAGS = -pipe -O2 -w -D_REENTRANT -fPIC $(DEFINES)
> CXXFLAGS = -pipe -DTETLIBRARY -O2 -w -D_REENTRANT -fPIC $(DEFINES)
By the way, this tip is from google and I tried that before but failed. So I think your update of the plugin.pro file helps. Thanks again.

Now another problem:
It seems that ElmerGUI cannot find the tetplugin library even the lib is already in $ELMER_HOME/lib directory and I have to export LD_LIBRARY_PATH=$ELMER_HOME/lib before launch ElmerGUI. It isn't a real problem bu I just wonder how this happen. Should I compile tetgen plugin before ElmerGUI?

Post Reply