Bug 221947

Summary: math/p5-Math-Pari linker error TLS definition mismatches non-TLS reference
Product: Ports & Packages Reporter: Marcin Gryszkalis <mg>
Component: Individual Port(s)Assignee: freebsd-perl (Nobody) <perl>
Status: New ---    
Severity: Affects Only Me CC: citrin+pr, freebsd, pi
Priority: --- Flags: bugzilla: maintainer-feedback? (perl)
Version: Latest   
Hardware: Any   
OS: Any   
Description Flags
p5-Math-Pari build log
Fix build when pari is installed none

Description Marcin Gryszkalis 2017-08-30 19:32:11 UTC
Created attachment 185934 [details]
p5-Math-Pari build log

(full log attached)

--- blib/arch/auto/Math/Pari/Pari.so ---
rm -f blib/arch/auto/Math/Pari/Pari.so

LD_RUN_PATH="/usr/local/lib" cc  -shared  -L/usr/local/lib/perl5/5.24/mach/CORE -lperl -L/usr/local/lib -fstack-protector Pari.o  -o blib/arch/auto/Math/Pari/Pari.so    -lm -L/usr/ports/math/p5-Math-Pari/work/pari-2.3.5/build -Wl,-rpath=/usr/local/lib/perl5/site_perl/mach/5.24/auto/Math/Pari -lpari

/usr/bin/ld: bernzone: TLS definition in /usr/local/lib/libpari.so section .tbss mismatches non-TLS reference in Pari.o

/usr/local/lib/libpari.so: could not read symbols: Bad value

cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** [blib/arch/auto/Math/Pari/Pari.so] Error code 1

I have math/pari installed (2.9.3,2) and /usr/local/lib/libpari.so belongs to it.

Installing Math::Pari with cpan works.
Comment 1 Anton Yuzhaninov 2017-09-09 02:28:48 UTC
Created attachment 186187 [details]
Fix build when pari is installed

Try attached patch. It is not perfect, but Makefile.PL is already messy anyway.
Comment 2 Marcin Gryszkalis 2018-01-20 23:45:37 UTC
Anton, the patch fixes the problem, thanks.
Comment 3 Thomas von Dein 2019-05-08 10:30:12 UTC
The patch works for me as well. Please apply it to the actual port. Thanks!