Mark,
Thanks for reporting this. fresnel 0.10.x built correctly with qhull
2015.2 on arch. The version bump to 2019.1 removed the -fPIC:
https://git.archlinux.org/svntogit/packages.git/commit/trunk?h=packages/qhull&id=8e9850ad8332d316c7f705e392e1db6ccd6dea2c
There are several possible solutions:
1) Submit a bug to arch linux and request that they built qhull with
-fPIC so that libqhullcpp.a is is usable.
2) Submit a bug/PR to qhull so that it adds -fPIC to the libqhullcpp.a
library build.
3) Partially revert the changes in fresnel 0.10 and bundle libqhullcpp
directly in fresnel.
4) Or modify ConvexPolyhedronBuilder.cc to use only the qhull C API so
that libqhullcpp.a is not needed.
Any thoughts from the user community?
---
Joshua A. Anderson, Ph.D.
Research Area Specialist, Chemical Engineering, University of Michigan
http://www-personal.umich.edu/~joaander/
On 9/15/19 9:10 PM, Mark Turiansky wrote:
> Just to follow up: I see from your Dockerfile that you compile qhull
> manually and specify "-fPIC". You mention in the installation directions
> that the developers have had success on arch linux: did you have to
> install qhull manually there too or was the one provided by the arch
> linux repositories sufficient (my guess is it's not)?
>
> Thanks,
> Mark
>
> On Friday, September 13, 2019 at 10:00:45 PM UTC-7, Mark Turiansky wrote:
>
> Hello,
>
> I'm trying to compile fresnel on an Arch Linux system. I have the
> required dependencies installed, but the compilation fails with the
> following message:
>
> /usr/bin/ld: /usr/lib/libqhullcpp.a(Qhull.cpp.o): relocation
> R_X86_64_PC32 against symbol `_ZSt4cerr@@GLIBCXX_3.4' 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
> make[2]: *** [fresnel/CMakeFiles/_common.dir/build.make:101:
> fresnel/_
common.cpython-37m-x86_64-linux-gnu.so
> <
http://common.cpython-37m-x86_64-linux-gnu.so>] Error 1
> make[1]: *** [CMakeFiles/Makefile2:119:
> fresnel/CMakeFiles/_common.dir/all] Error 2
> make[1]: *** Waiting for unfinished jobs....
> [100%] Built target _cpu
> make: *** [Makefile:130: all] Error 2
>
> It seems that linking against the qhull library is failing. I think
> the trouble is that the qhull library is a static library
> (libqhullcpp.a) while it is compiling the dynamic library
> (fresnel/_
common.cpython-37m-x86_64-linux-gnu.so
> <
http://common.cpython-37m-x86_64-linux-gnu.so>). I don't see a
> --
> You received this message because you are subscribed to the Google
> Groups "fresnel-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
fresnel-user...@googlegroups.com
> <mailto:
fresnel-user...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/fresnel-users/a6b88500-f623-4928-a6b6-42e3a3d4a3f3%40googlegroups.com
> <
https://groups.google.com/d/msgid/fresnel-users/a6b88500-f623-4928-a6b6-42e3a3d4a3f3%40googlegroups.com?utm_medium=email&utm_source=footer>.