Subject: pkg/20674: gtkglext link flags for GL libraries
To: None <gnats-bugs@gnats.netbsd.org>
From: None <apm@dna.fi>
List: netbsd-bugs
Date: 03/12/2003 12:45:37
>Number:         20674
>Category:       pkg
>Synopsis:       gtkglext link flags for GL libraries
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 12 12:46:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Antti P Miettinen
>Release:        NetBSD 1.5.4_ALPHA
>Organization:
Domestic Network Association
>Environment:
NetBSD brigitte 1.5.4_ALPHA NetBSD 1.5.4_ALPHA (BRIGITTE) #0: Tue Mar  4 15:37:31 EET 2003     root@brigitte:/usr/src/sys/arch/i386/compile/BRIGITTE i386

>Description:
In my NetBSD installation the pkg-config files
/usr/pkg/lib/pkgconfig/gdkglext-1.0.pc
/usr/pkg/lib/pkgconfig/gdkglext-x11-1.0.pc
for gtkglext end up with -lGL -lGLU but without -L/usr/X11R6/lib and
without -Wl,R/usr/X11R6/lib. I think the link paths should end up
into the above files as my GL and GLU libs are from XFree4 and
live in /usr/X11R6/lib.

>How-To-Repeat:
Install XFree4 from current xsrc, install gtkglext from current pkgsrc.
Try to link and run an application using gtkglext with link flags
generated with e.g. autoconf+pkg-config. Observe link failure.
After adding -L/usr/X11R6/lib observe link success but runtime
load failure. After adding also -Wl,R/usr/X11R6/lib runtime loading
succeeds too.

>Fix:
The configure for gtkglext should probably cause setting of GL_LDFLAGS
to inlude the -L and -Wl,-R flags with the appropriate path where GL and GLU libs are installed. The configure.in seems to be checking for --with
arguments but I suppose the proper fix would be in configure.in to detect
the location automatically.

>Release-Note:
>Audit-Trail:
>Unformatted: