NetBSD Problem Report #10560

Received: (qmail 7295 invoked from network); 10 Jul 2000 16:13:13 -0000
Message-Id: <200007101613.SAA00345@apollo.home.net>
Date: Mon, 10 Jul 2000 18:13:26 +0200 (CEST)
From: mac@apollo.home.net
Reply-To: moehl@akaflieg.extern.tu-berlin.de
To: gnats-bugs@gnats.netbsd.org
Subject: lyx-1.1.2 pkg does not run on hp425t (maybe any m68k)
X-Send-Pr-Version: 3.95

>Number:         10560
>Category:       pkg
>Synopsis:       lyx-1.1.2 pkg does not run on hp425t (maybe any m68k)
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    fredb
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 10 16:14:00 +0000 2000
>Closed-Date:    Fri Sep 29 20:26:01 +0000 2000
>Last-Modified:  Fri Sep 29 20:26:01 +0000 2000
>Originator:     PM4400
>Release:        1.4.2.final
>Organization:
Private user	
>Environment:

System: NetBSD apollo.home.net 1.4.2 NetBSD 1.4.2 (GENERIC) #0: Wed Mar 15 09:20:57 PST 2000 oster@zoot:/u1/NetBSD-1.4.2/usr/src/sys/arch/hp300/compile/GENERIC hp300

special: Xserver is a Macintosh running MI/X

	lyx, xforms, xpm were installed from source (sup from 07/08/2000)
	all other required packages were precompiled binaries

>Description:
	lyx terminates with:

	/usr/libexec/ld.so: Undefined symbol "_glXMakeCurrent" in lyx:/usr/X11R6
	/lib/libforms.so.0.88

>How-To-Repeat:
	type lyx at the prompt
>Fix:
	none
	Maybe something else has to be linked.

>Release-Note:
>Audit-Trail:

From: Torsten Sadowski <moehl@akaflieg.extern.tu-berlin.de>
To: gnats-bugs@netbsd.org
Cc:  
Subject: Re: pkg/10560: lyx-1.1.2 pkg does not run on hp425t (maybe any m68k)
Date: Tue, 18 Jul 2000 11:15:47 +0200 (CEST)

 I got it.
 When I had a closer look at the xforms distfiles downloaded by pkgsrc I   
 found that the file libforms.so.0.88 is larger than the output from
 pkgsrc(566353bytes to 528121bytes). Pkgsrc removes something from the
 library which is definitely needed by my system. Now everything is
 perfect.
 The solution makes everything less urgent

 -Torsten




From: Torsten Sadowski <moehl@akaflieg.extern.tu-berlin.de>
To: mcmahill@mtl.mit.edu
Cc: gnats-bugs@netbsd.org
Subject: Re: pkg/10560
Date: Fri, 28 Jul 2000 18:30:17 +0200 (CEST)

 Oops sorry,

 Here is what I did:
 1. I installed lyx from precompiled binaries and when I started lyx I got:
         /usr/libexec/ld.so: Undefined symbol "_glXMakeCurrent" in
         lyx:/usr/X11R6/lib/libforms.so.0.88

 2. I removed lyx and all pkgs it required and reinstalled via 
 	cd /usr/pkgsrc/print/lyx
 	make install
 which installs lyx and xforms and some other pkgs but again I got the
 above mentioned error.

 Then I asked in a netbsd newsgroup and someone said it might need Mesa
 (because of the _gl) so I installed Mesa but it didn't help.
 Next I had a closer look at the xforms pkg and saw that libforms.so is
 bigger in the distribution file than in /usr/X11R6/lib where it was put by
 pkgsrc. Then I simply copied the libforms.so.0.88 from the distfile into
 /usr/X11R6/lib and suddenly everything worked fine.

 Bye

 -Torsten


 On Fri, 28 Jul 2000 mcmahill@mtl.mit.edu wrote:

 > 
 > I don't know if anyone is or not.  Could you send a more explicit
 > description of what didn't work and what did work to the PR?
 > 
 > ie, something like:
 > 
 > pkg_add ftp://ftp.netbsd.org/pub/NetBSD/packages/1.4.2/m68k/All/lyx
 > 
 > lyx
 > 
 > [error message]
 > 
 > so then
 > cd /usr/pkgsrc/x11/xforms
 > make install
 > 
 > ... or whatever you did.  
 > 
 > It wasn't totally clear to me the exact things you did.
 > 
 > Thanks
 > 
 > -Dan
 > 
 > On Fri, 28 Jul 2000, Torsten Sadowski wrote:
 > 
 > > Hi,
 > > I'm sorry for the interuption but do you know if someone is going after my
 > > lyx problem? I did find a solution and appended it to my problem report.
 > > Now I'm just curious for a reason.
 > > 
 > > -Torsten
 > > 
 > > 
 > 


From: Frederick Bruckman <fb@enteract.com>
To: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>,
   "Johnny C. Lam" <lamj@stat.cmu.edu>, Todd Vierling <tv@wasabisystems.com>
Cc: gnats-bugs@gnats.NetBSD.ORG
Subject: Re: pkg/10560
Date: Mon, 25 Sep 2000 09:57:55 -0500 (CDT)

 "file" thinks the objects resulting from "ar x" are PIC, so that's not
 the problem:

 fredb@corwin-> file gl.o gl.lo 
 gl.o:  NetBSD/m68k position independent object file not stripped
 gl.lo: NetBSD/m68k position independent object file not stripped

 It does look like the m68k run-time link editor wants to resolve all
 symbols in the linked-in shared library, whether they're referenced in
 the executable or not. It's kind of interesting that (according to the
 note in xforms/Makefile), the shared library is not installed on ELF
 platforms, for the same break that evidently occurs on a.out, too.

 The choices are: 1) make xforms depend on Mesa-*, and maybe link -lGL
 into the shared library. 2) No shared xforms at all.

 I favor '1' as being more technically correct. We can't verify that
 every particular package doesn't want to call to an accelerated
 graphics function, after all. For the future, we're supposed to have a
 USE_MESA, which is satisfied by "libGL.so.*" supplied by XFree-4.x, so
 the pain will only be short-lived.

 FWIW, "xchiplogo" provides a much simple test case than "lyx":

 fredb@corwin-> uname -rm
 1.4.3 mac68k
 fredb@corwin-> xchiplogo
 /usr/libexec/ld.so: Undefined symbol "_glXMakeCurrent" in xchiplogo:/usr/X11R6/lib/libforms.so.0.88



 Frederick



From: Todd Vierling <tv@wasabisystems.com>
To: Frederick Bruckman <fb@enteract.com>
Cc: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>,
   "Johnny C. Lam" <lamj@stat.cmu.edu>, gnats-bugs@gnats.NetBSD.ORG
Subject: Re: pkg/10560
Date: Mon, 25 Sep 2000 11:36:35 -0400 (EDT)

 On Mon, 25 Sep 2000, Frederick Bruckman wrote:

 : gl.o:  NetBSD/m68k position independent object file not stripped
 : gl.lo: NetBSD/m68k position independent object file not stripped
 : 
 : It does look like the m68k run-time link editor wants to resolve all
 : symbols in the linked-in shared library, whether they're referenced in
 : the executable or not.

 : It's kind of interesting that (according to the note in
 : xforms/Makefile), the shared library is not installed on ELF platforms,
 : for the same break that evidently occurs on a.out, too.

 The fact that the old a.out ld.so complained is a very important point:  It
 doesn't complain until a function is _referenced_, which means that there is
 indeed code in the m68k version that is actively trying to call GL
 functions.  The ELF linker and ld.so aren't so forgiving, and you'd have a
 link-time error in that case, unless the library is using inter-library
 dependencies.

 : fredb@corwin-> xchiplogo
 : /usr/libexec/ld.so: Undefined symbol "_glXMakeCurrent" in xchiplogo:/usr/X11R6/lib/libforms.so.0.88

 This sounds like there may be an autoconfiguration problem... perhaps Mesa
 is twiddling with the imake config files?

 -- 
 -- Todd Vierling <tv@wasabisystems.com>  *  http://www.wasabisystems.com/
 -- Speed, stability, security, and support.  Wasabi NetBSD:  Run with it.


From: Frederick Bruckman <fb@enteract.com>
To: Todd Vierling <tv@wasabisystems.com>
Cc: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>,
   "Johnny C. Lam" <lamj@stat.cmu.edu>, gnats-bugs@gnats.NetBSD.ORG
Subject: Re: pkg/10560
Date: Mon, 25 Sep 2000 11:10:10 -0500 (CDT)

 On Mon, 25 Sep 2000, Todd Vierling wrote:

 > The fact that the old a.out ld.so complained is a very important point:  It
 > doesn't complain until a function is _referenced_, which means that there is
 > indeed code in the m68k version that is actively trying to call GL
 > functions.  The ELF linker and ld.so aren't so forgiving, and you'd have a
 > link-time error in that case, unless the library is using inter-library
 > dependencies.

 OK, then. Note that xchiplogo runs on ELF, linked against a static
 libforms.a. In this case, xchiplogo is still a dynamic executable, and
 presumably, the references to _glX* are still in there. Should we
 expect the i386 binary to choke, at some point, without libGL*?

 I should point out, I've run "lyx" on i386 a bit, and it never seems
 to have problems in this department.

 > : fredb@corwin-> xchiplogo
 > : /usr/libexec/ld.so: Undefined symbol "_glXMakeCurrent" in xchiplogo:/usr/X11R6/lib/libforms.so.0.88
 > 
 > This sounds like there may be an autoconfiguration problem... perhaps Mesa
 > is twiddling with the imake config files?

 No doubt, but it's not a NetBSD problem. "xforms" is a binary package.
 Mostly. The NetBSD package takes apart libforms.a and re-assembles a
 shared version. For that, it looks like we should probably also add a
 run-time dependency on -lGL.



 Frederick


From: Todd Vierling <tv@wasabisystems.com>
To: Frederick Bruckman <fb@enteract.com>
Cc: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>,
   "Johnny C. Lam" <lamj@stat.cmu.edu>, gnats-bugs@gnats.NetBSD.ORG
Subject: Re: pkg/10560
Date: Mon, 25 Sep 2000 13:17:36 -0400 (EDT)

 On Mon, 25 Sep 2000, Frederick Bruckman wrote:

 : OK, then. Note that xchiplogo runs on ELF, linked against a static
 : libforms.a. In this case, xchiplogo is still a dynamic executable, and
 : presumably, the references to _glX* are still in there.

 Presumably?  `nm' the object, or even use `strings', to be sure.  I have a
 feeling the references aren't there--and possibly, the code using GL was
 never compiled in.

 The ELF linker barfs at *link time* if a symbol in the executable or any
 library is unresolved.

 -- 
 -- Todd Vierling <tv@wasabisystems.com>  *  http://www.wasabisystems.com/
 -- Speed, stability, security, and support.  Wasabi NetBSD:  Run with it.


From: Frederick Bruckman <fb@enteract.com>
To: Todd Vierling <tv@wasabisystems.com>
Cc: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>,
   "Johnny C. Lam" <lamj@stat.cmu.edu>, gnats-bugs@gnats.NetBSD.ORG
Subject: Re: pkg/10560
Date: Mon, 25 Sep 2000 15:04:01 -0500 (CDT)

 On Mon, 25 Sep 2000, Todd Vierling wrote:

 > On Mon, 25 Sep 2000, Frederick Bruckman wrote:
 > 
 > : OK, then. Note that xchiplogo runs on ELF, linked against a static
 > : libforms.a. In this case, xchiplogo is still a dynamic executable, and
 > : presumably, the references to _glX* are still in there.
 > 
 > Presumably?  `nm' the object, or even use `strings', to be sure.  I have a
 > feeling the references aren't there--and possibly, the code using GL was
 > never compiled in.

 Neither "nm" or "strings" turns up a reference to "gl"-anything in
 either the i386 binary or the m68k binary. Go figure.

 > The ELF linker barfs at *link time* if a symbol in the executable or any
 > library is unresolved.

 Shared library, but not archive? The "gl.o" stub is clearly visible
 when you run "nm" over libforms.a. All the undefined references to gl
 functions are in that object. It's not simply a build goof, BTW: the
 forms.h interface has some functions that clearly require OpenGL.

 Guys, that still leaves two choices: xforms pulls in -lGL; or xforms
 is static, as distributed. We need to pick one, fast, before the 1.4.3
 tag goes on pkgsrc.



 Frederick


From: Todd Vierling <tv@wasabisystems.com>
To: Frederick Bruckman <fb@enteract.com>
Cc: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>,
   "Johnny C. Lam" <lamj@stat.cmu.edu>, gnats-bugs@gnats.NetBSD.ORG
Subject: Re: pkg/10560
Date: Mon, 25 Sep 2000 16:18:35 -0400 (EDT)

 On Mon, 25 Sep 2000, Frederick Bruckman wrote:

 : > : OK, then. Note that xchiplogo runs on ELF, linked against a static
 : > : libforms.a. In this case, xchiplogo is still a dynamic executable, and
 : > : presumably, the references to _glX* are still in there.
 : > 
 : > Presumably?  `nm' the object, or even use `strings', to be sure.  I have a
 : > feeling the references aren't there--and possibly, the code using GL was
 : > never compiled in.
 : 
 : Neither "nm" or "strings" turns up a reference to "gl"-anything in
 : either the i386 binary or the m68k binary. Go figure.

 The m68k binary is getting it indirectly through a shlib, remember?  You
 won't find it in the binary there.

 : > The ELF linker barfs at *link time* if a symbol in the executable or any
 : > library is unresolved.
 : 
 : Shared library, but not archive? The "gl.o" stub is clearly visible
 : when you run "nm" over libforms.a. All the undefined references to gl
 : functions are in that object. It's not simply a build goof, BTW: the
 : forms.h interface has some functions that clearly require OpenGL.

 Ah, there is a special difference here.  When taking a .a and turning it
 into a chared object, it will be bound with all object files.  When linking
 directly against a .a file (using -lxforms), it will only pull in the
 *needed* object files, leaving out those that are not needed.

 : Guys, that still leaves two choices: xforms pulls in -lGL; or xforms
 : is static, as distributed.

 The latter, from what you've told me here.  (You did say that it's static
 for ELF already, right?)

 -- 
 -- Todd Vierling <tv@wasabisystems.com>  *  http://www.wasabisystems.com/
 -- Speed, stability, security, and support.  Wasabi NetBSD:  Run with it.


From: Frederick Bruckman <fb@enteract.com>
To: Todd Vierling <tv@wasabisystems.com>
Cc: Hubert Feyrer <hubert.feyrer@informatik.fh-regensburg.de>,
   "Johnny C. Lam" <jlam@netbsd.org>, gnats-bugs@gnats.NetBSD.ORG
Subject: Re: pkg/10560
Date: Mon, 25 Sep 2000 16:40:40 -0500 (CDT)

 On Mon, 25 Sep 2000, Todd Vierling wrote:

 > On Mon, 25 Sep 2000, Frederick Bruckman wrote:
 > 
 > : Neither "nm" or "strings" turns up a reference to "gl"-anything in
 > : either the i386 binary or the m68k binary. Go figure.
 > 
 > The m68k binary is getting it indirectly through a shlib, remember?  You
 > won't find it in the binary there.

 Ah, yes. Of course.

 Another discovery. "nm -u" over a shared library never turns up
 anything on a.out. I suppose that's related to why the a.out linker
 can't resolve symbols until run-time?

 > Ah, there is a special difference here.  When taking a .a and turning it
 > into a chared object, it will be bound with all object files.  When linking
 > directly against a .a file (using -lxforms), it will only pull in the
 > *needed* object files, leaving out those that are not needed.
 > 
 > : Guys, that still leaves two choices: xforms pulls in -lGL; or xforms
 > : is static, as distributed.
 > 
 > The latter, from what you've told me here.  (You did say that it's static
 > for ELF already, right?)

 Yes.



 Frederick

State-Changed-From-To: open->analyzed 
State-Changed-By: fredb 
State-Changed-When: Tue Sep 26 21:07:34 CDT 2000 
State-Changed-Why:  
I've disabled the shared lib on all platforms. Though I don't like it, 
the package still reconstructs the shared library, then deletes it 
after installing it. It sounds screwy, but this is what the package does 
for ELF ports already. 


Responsible-Changed-From-To: pkg-manager->fredb 
Responsible-Changed-By: fredb 
Responsible-Changed-When: Tue Sep 26 21:07:34 CDT 2000 
Responsible-Changed-Why:  
It should be fixed now, but I'll build teTeX and lyx on m68k, just 
to be absolutely sure before closing this. 

From: Bill Studenmund <wrstuden@zembu.com>
To: gnats-bugs@netbsd.org
Cc: William Studenmund <wrstuden@zembu.com>
Subject: Re: pkg/10560
Date: Wed, 27 Sep 2000 10:51:58 -0700 (PDT)

 I just started looking at this due to the comments on netbsd-developers.

 Can someone please explain to me WHY we are making a shared library out of
 a .a file when on nine of the ten xforms packages we have, we already HAVE
 a shared library, and that the one w/o can be considered a bug?

 I gathered from the logs this business is to try and impose our own sort
 of shared library numbering. But that can be achieved other ways I
 thought. And for now, we can just live with version 0.88 as we have never
 had a library bump, thus the difference in major numbers doesn't matter..

 Take care,

 Bill

State-Changed-From-To: analyzed->closed 
State-Changed-By: fredb 
State-Changed-When: Fri Sep 29 15:24:43 CDT 2000 
State-Changed-Why:  
The original problem is fixed, by making xforms static. We'll have to 
make sure it works on all ports before reenabling the shared library. 
>Unformatted:


 hubertf, Wed Sep 13 05:04:37 MEST 2000:
 	the xforms pkg currently puts the libxforms.a file apart
 	(ar x), and puts it back together as a shared lib (.so)
 	using libtool. AFAIK this can only work if the code in the
 	.a file was actually compiled with -fpic/-fPIC, and I
 	guess that's also the reason of the mentioned size change
 	and the resulting breakage of the lib.

 	Just mailed jlam (who did that to xforms) about that.

NetBSD Home
NetBSD PR Database Search

(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.