From bug-octave-request at bevo dot che dot wisc dot edu Mon Dec 20 13:48:50 1999 Subject: Re: Compilation (gcc-2.95.2) From: Joao Cardoso To: Hagen Gilsing CC: bug-octave at bevo dot che dot wisc dot edu Date: Mon, 20 Dec 1999 19:48:31 +0000 Hagen Gilsing wrote: > Description: > ----------- > > I tried to compile Octave (2.1.13) with a new-built gcc-2.95.2. > 2. During the last compilation step: ... > > c++ -I. -I/root/MathsPlotting/Octave/src/octave-2.1.13.src-i686-2.95.2-make-bootstrap/src -I.. ...\ > -L.. -u MAIN__ -fPIC -g -o octave \ > octave.o builtins.oops.o ... svd.o syl.o time.o \ > -L../liboctave -L../libcruft -L../src -Xlinker -rpath -Xlinker ... -lm\ > > the following error occurs (see appendix A1 for more detailed description): > > ../liboctave/liboctave.so: undefined reference to `void subtract_vs, double, complex >(complex *, double const *, unsigned int, complex)' > ../liboctave/liboctave.so: undefined reference to `void multiply_sv, double, complex >(complex *, double, complex const *, unsigned int)' > ... > ... > > Finally, when saving and replacing the C++-driver cc1plus of gcc-2.95.2 > (/usr/local/lib/gcc-lib/i686-pc-linux-gnu/2.95.2/cc1plus) by a link to the > corresponding C++-driver of egcs-2.91.66, my current (well-working) native > compiler, the problem disappears. > > I could not decide, whether: > - this is a language problem > - this is a compiler working problem (gcc-2.95.2) > - this is a compiler building problem (misconfiguration on building gcc-2.95.2) > Do you have any idea, what the reason could be and what could be a workaround ? > > I had a similar (not equal) problem on sco-unix. I solved it using a patch to gcc. I retrived it from the egcs patches mailing lists, but now I don't know exactly which one :-(. It starts like this: This fixes a breakage on SCO and other strict SVR4 targets as described in the comment below. 1999-11-01 Jason Merrill <jason at yorick dot cygnus dot com> * decl2.c (maybe_make_one_only): Always make things comdat on ELF targets, too. Index: decl2.c =================================================================== RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v retrieving revision 1.274 diff -c -p -r1.274 decl2.c *** decl2.c 1999/10/06 06:18:18 1.274 --- decl2.c 1999/11/02 07:31:52 *************** void *** 2365,2373 **** maybe_make_one_only (decl) tree decl; { ! /* This is not necessary on targets that support weak symbols, because ! the implicit instantiations will defer to the explicit one. */ ... Joao -- Joao Cardoso | e-mail: jcardoso at inescn dot pt INESC, R. Jose Falcao 110 | tel: + 351 2 2094322 4050 Porto, Portugal | fax: + 351 2 2008487 ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------