[Bug 273706] math/qhull: use -fPIC with the static library

From: <bugzilla-noreply_at_freebsd.org>
Date: Sun, 10 Sep 2023 16:51:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=273706

            Bug ID: 273706
           Summary: math/qhull: use -fPIC with the static library
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: stephen@FreeBSD.org
          Reporter: thierry@FreeBSD.org
             Flags: maintainer-feedback?(stephen@FreeBSD.org)
          Assignee: stephen@FreeBSD.org

Created attachment 244753
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=244753&action=edit
Adding -fPIC

ATM "Use shared library for linking apps" is set to OFF.

qhullstatic_r is added by /usr/local/lib/cmake/Qhull/QhullTargets.cmake, and it
causes a failure because it does not contain relocatable code:

/usr/local/bin/ld: /usr/local/lib/libqhullstatic_r.a(global_r.c.o): relocation
R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared
object; recompile with -fPIC
/usr/local/bin/ld: failed to set dynamic section sizes: bad value
c++: error: linker command failed with exit code 1 (use -v to see invocation)

The attached patch defines -fPIC (and remove an old CONFLICTS). Another
interesting possibility could be to define LINK_APPS_SHARED (IDK why it is not
enabled).

I got this one with the Python module of GDL.

-- 
You are receiving this mail because:
You are the assignee for the bug.