NetBSD Problem Report #34563
From www@NetBSD.org Tue Sep 19 22:28:59 2006
Return-Path: <www@NetBSD.org>
Received: by narn.NetBSD.org (Postfix, from userid 31301)
id BBE5163B9FB; Tue, 19 Sep 2006 22:28:59 +0000 (UTC)
Message-Id: <20060919222859.BBE5163B9FB@narn.NetBSD.org>
Date: Tue, 19 Sep 2006 22:28:59 +0000 (UTC)
From: lminder@gmx.net
Reply-To: lminder@gmx.net
To: gnats-bugs@NetBSD.org
Subject: math/pari misbuilt on FreeBSD 6
X-Send-Pr-Version: www-1.0
>Number: 34563
>Category: pkg
>Synopsis: math/pari misbuilt on FreeBSD 6
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Sep 19 22:30:00 +0000 2006
>Closed-Date: Tue Sep 19 22:58:47 +0000 2006
>Last-Modified: Wed Sep 20 01:45:01 +0000 2006
>Originator: Lorenz Minder
>Release: FreeBSD 6.0-STABLE
>Organization:
>Environment:
FreeBSD lorenzdesktop 6.0-STABLE FreeBSD 6.0-STABLE #2: Tue Jan 17 22:36:27 CET 2006 lorinder@lorenzdesktop:/usr/obj/usr/src/sys/MYKERNEL i386
>Description:
math/pari is misbuilt on my FreeBSD box; I'm not exactly sure what
exactly triggers the bug though. After building and installing, if
you try to run "gp", it complains about missing libX11.so.6. The
problem is that the rpath for the xorg library is not being added to
the linker. (I'm using pkgsrc xorg, btw, but I also do so on my
NetBSD box, where I did not see the bug.)
Here's the last lines from the build stage:
libtool --mode=link cc -o gp -O3 -DGCC_INLINE -Wall -Wno-implicit -fomit-frame-pointer -O2 -march=athlon-xp -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 gp.lo gp_init.lo gp_rl.lo highlvl.lo whatnow.lo plot.lo plotport.lo -Wl,-R -L -lX11 -lm libpari.la
cc -o .libs/gp -O3 -DGCC_INLINE -Wall -Wno-implicit -fomit-frame-pointer -O2 -march=athlon-xp -I/usr/pkgsrc/math/pari/work/.buildlink/include -I/usr/pkgsrc/math/pari/work/.buildlink/include/freetype2 .libs/gp.o .libs/gp_init.o .libs/gp_rl.o .libs/highlvl.o .libs/whatnow.o .libs/plot.o .libs/plotport.o -lX11 -lm ./.libs/libpari.so -L/usr/pkgsrc/math/pari/work/.buildlink/lib -Wl,--rpath -Wl,/usr/pkg/lib
creating gp
=> Unwrapping files-to-be-installed.
Note the "-Wl,-R -L -lX11" part, which should read "-Wl,-R/usr/pkg/xorg/lib -L/usr/pkg/xorg/lib -lX11" instead.
The problem is that the ${X11} variable is not set in config/Makefile.SH.
I see this empty $X11 even on my NetBSD box, but there the rpath
for libX11 is pulled in elsewhere on the linker line for some reason,
and this hides the problem. I don't know the reason for this
difference though.
>How-To-Repeat:
On FreeBSD, do "make && make install && gp". (However, I'm not exactly
sure, what conditions trigger the bug; there might be a bit more to it.)
>Fix:
In config/Makefile.SH, use ${X11BASE} instead of ${X11}. The following
patch fixes this for me.
--- config/Makefile.SH.orig Tue Sep 19 00:19:35 2006
+++ config/Makefile.SH Tue Sep 19 00:19:42 2006
@@ -88,7 +88,7 @@
X11)
PLOTFILE=plotX.c
PLOTCFLAGS=-I$Xincroot
- PLOTLIBS="-Wl,-R$X11 -L$X11 -lX11 $extralib"
+ PLOTLIBS="-Wl,-R${X11BASE}/lib -L${X11BASE}/lib -lX11 $extralib"
if test "$osname" = concentrix; then PLOTLIBS="-lX11"; fi
plotrunpath=$X11
;;
>Release-Note:
>Audit-Trail:
From: Joerg Sonnenberger <joerg@britannica.bec.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/34563: math/pari misbuilt on FreeBSD 6
Date: Wed, 20 Sep 2006 00:32:38 +0200
On Tue, Sep 19, 2006 at 10:30:00PM +0000, lminder@gmx.net wrote:
> math/pari is misbuilt on my FreeBSD box; I'm not exactly sure what
> exactly triggers the bug though. After building and installing, if
> you try to run "gp", it complains about missing libX11.so.6. The
> problem is that the rpath for the xorg library is not being added to
> the linker. (I'm using pkgsrc xorg, btw, but I also do so on my
> NetBSD box, where I did not see the bug.)
I had the same fix in my tree already, but hadn't had time to commit it
yet. Will do in a bit.
Joerg
State-Changed-From-To: open->closed
State-Changed-By: joerg@netbsd.org
State-Changed-When: Tue, 19 Sep 2006 22:58:47 +0000
State-Changed-Why:
Applied. Thanks for the reminder :-)
From: Joerg Sonnenberger <joerg@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: PR/34563 CVS commit: pkgsrc/math/pari
Date: Tue, 19 Sep 2006 22:57:18 +0000 (UTC)
Module Name: pkgsrc
Committed By: joerg
Date: Tue Sep 19 22:57:18 UTC 2006
Modified Files:
pkgsrc/math/pari: Makefile distinfo
pkgsrc/math/pari/patches: patch-ab
Log Message:
Fix X11 linkage. Bump revision. From PR 34563.
To generate a diff of this commit:
cvs rdiff -r1.37 -r1.38 pkgsrc/math/pari/Makefile
cvs rdiff -r1.14 -r1.15 pkgsrc/math/pari/distinfo
cvs rdiff -r1.5 -r1.6 pkgsrc/math/pari/patches/patch-ab
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Lorenz Minder <lminder@gmx.net>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org,
pkgsrc-bugs@netbsd.org
Subject: Re: pkg/34563: math/pari misbuilt on FreeBSD 6
Date: Wed, 20 Sep 2006 00:58:49 +0200
Joerg Sonnenberger wrote:
> On Tue, Sep 19, 2006 at 10:30:00PM +0000, lminder@gmx.net wrote:
> > math/pari is misbuilt on my FreeBSD box; I'm not exactly sure what
> > exactly triggers the bug though. After building and installing, if
> > you try to run "gp", it complains about missing libX11.so.6. The
> > problem is that the rpath for the xorg library is not being added to
> > the linker. (I'm using pkgsrc xorg, btw, but I also do so on my
> > NetBSD box, where I did not see the bug.)
>
> I had the same fix in my tree already, but hadn't had time to commit it
> yet. Will do in a bit.
Great, thanks! (Wow, that was real quick.)
--Lorenz
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.