Many many thanks to the net! As usual, I got a solution in less than 24
hours. During that time, I might add, Sun was still scratching it's
technical support head. Here's my original query:
> This is a surprise and I hope it's not a permanent condition.
> We have many people here (students, for a class, and faculty) using Sun
> GKS 4.1. They compile programs like this:
> cc -I/usr/openwin/include prog.c -o prog -lgks -lxgl -lxview -lolgx -lX11 -lm
> With 4.1.1, this worked like a charm. Now that we have upgraded to
> 4.1.2, we get the following link errors:
> ld: Undefined symbol
> There is no mention of a problem in the docs with either the XGL library
> or the SunGKS libraries (which we had to install when we installed
> SunGKS). Oh...We use Sun C 1.1.
The reason for this error: There is FORTRAN support built into the Sun
GKS libs -- yes, even for C. A bug in the 4.1.1 version of "ld" caused
compiles under 4.1.1 not to show the fact that these routines were never
resolved. A fixed 4.1.2 "ld" caused these unresolved references to show
Solution/Workaround: There are two possible solutions:
(1) Compile the GKS programs separately, then link with the "f77"
command. As in
cc -I/usr/openwin/include -c prog.c
f77 -o prog prog.o -lgks -lxgl -lxview -lolgx -lX11 -lm
I can't verify that this works. We do not have the "f77" compiler.
But Doug Neuhauser (email@example.com) suggested this fix and
says it works for him.
(2) Compile your code with the "-assert nodefinitions" argument to "ld"
(you can pass it through the "cc" command). This works for us
fine, but has the undesired side effect of not warning you about
REAL routines that are unresolved.
(3) Compile your code using the "-Bstatic" option, which will avoid
using the shared GKS libraries. This results in a much longer
compile time and a much bigger object module.
So, choose your poison. I've griped very loudly at Sun -- for whatever
good it'll do.
Thanks to the following folks:
Doug Neuhauser (firstname.lastname@example.org)
Matt Crawford (email@example.com)
Russ Poffenberger (firstname.lastname@example.org)
Dieter Muller (email@example.com)
Mark Wiederspahn (firstname.lastname@example.org)
Mike Raffety (email@example.com)
Mario Migrovic (firstname.lastname@example.org)
Michael Meystel (email@example.com)
Hope College Department of Computer Science
firstname.lastname@example.org (BITNET: JIPPING@HOPE)
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:39 CDT