Reputation: 308
I am trying to compile admesh found here
https://github.com/admesh/admesh
I am following thier install instructions which basically is configure and make. But when i run the make command in my mac, its giving the following error,
MacBook-Pro:admesh mk$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-am
CC connect.lo
CC normals.lo
CC shared.lo
CC stlinit.lo
CC stl_io.lo
CC util.lo
CCLD libadmesh.la
ld: unknown option: --gc-sections
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libadmesh.la] Error 1
make: *** [all] Error 2
MacBook-Pro:admesh mk$ clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix
Can anyone help me to fix this error.
Upvotes: 10
Views: 10222
Reputation: 308
I got this fixed with help of hroncok of admesh.
You need to after configure command, in Makefile.in replace line number 351,352 from
-Wl,--gc-sections \
-Wl,--as-needed \
to
-Wl,-dead_strip \
-Wl,-dead_strip \
and fixed the error as per your hroncok suggestion. Look here for more details https://github.com/admesh/admesh/issues/7
Upvotes: 7