Hi,

I have the following compiler configurations on Solaris 7:
1) egcs 1.1.2 + GNU binutils 2.10 (as + ld) + GNU make 3.79.1
2) gcc 2.95.2 + GNU binutils 2.10 (as + ld) + GNU make 3.79.1

XForms 0.88 and XPM 3.4k were built with the Sun C compiler and
installed in /usr/local/xforms-0.88 and /usr/local/xpm-3.4k.
They work perfectly with other programs compiled with the GNU
or Sun compiler.

In both cases LyX won't link:

$ ./configure --prefix=/usr/local/lyx-1.1.6
--with-extra-inc=/usr/local/xforms-0.88/FORMS:/usr/local/xpm/include
--with-extra-lib=/usr/local/xforms-0.88/FORMS:/usr/local/xpm/lib
$ gmake
[...]
gmake[3]: Entering directory `/tmp/lyx-1.1.6/src'
/bin/sh ../libtool --mode=link g++  -g -O2 [...]
g++ -g -O2 [...] -o lyx [...]
collect2: ld returned 1 exit status
[...]

Does anyone know why collect2 would fail here? I have successfully
built large C++ programs with this configuration (including VTK,
previous releases of LyX, Qt, Doxygen, DCMTK, DOC++, FLTK) and it's
the first time I see such a message. Any clue?

I tried to add -Wl,--verbose and -Wl,-t to the linking command line.
This is what I get:
$ cd src
$ g++ -g -O2 [...] -o lyx [...] -Wl,-t
/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/ld: mode 
elf32_sparc
/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crt1.o
/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crti.o
/usr/ccs/lib/values-Xa.o
/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crtbegin.o
BufferView.o
[...]
(/usr/local/xforms-0.88/FORMS/libforms.a)interpol.o
-lXpm (/usr/local/xpm/lib/libXpm.so)
-lpthread (/usr/lib/libpthread.so)
-lSM (/usr/openwin/lib/libSM.so)
-lICE (/usr/openwin/lib/libICE.so)
-lX11 (/usr/openwin/lib/libX11.so)
-lsocket (/usr/lib/libsocket.so)
-lnsl (/usr/lib/libnsl.so)
-lstdc++ (/usr/local/egcs-1.1.2/lib/libstdc++.so)
-lm (/usr/lib/libm.so)
-lc (/usr/lib/libc.so)
(/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/libgcc.a)_e
printf.o
(/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/libgcc.a)_p
ure.o
-lc (/usr/lib/libc.so)
/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crtend.o
/usr/local/egcs-1.1.2/lib/gcc-lib/sparc-sun-solaris2.7/egcs-2.91.66/crtn.o
collect2: ld returned 1 exit status
$ 

I wonder why I don't get any error message? Could this have anything
to do with the threading library? Any clue on how to further debug?

Thanks,
Dimitri

Reply via email to