Re: 2.6.0 versus 2.5.92 on Solaris build problems (2)



On Tue, 2004-04-20 at 00:37, Ivan Noris wrote:
> The problem I references is:
> 
> gcc-3.3 -G -z defs -h libogg.so.0 -o .libs/libogg.so.0.5.0  framing.lo
> bitwise.lo  -L/opt/BGSgnome-2.6.0/lib -L/usr/X11R6/lib -L/usr/local/lib
> -L/opt/sfw/cups/lib -L/usr/openwin/lib -lc
> Undefined                       first referenced
>  symbol                             in file
> main                               
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.9/3.3.2/crt1.o
> ld: fatal: Symbol referencing errors. No output written to
> .libs/libogg.so.0.5.0
> collect2: ld returned 1 exit status
> 
> This was libogg (my addon for Solaris), but perfectly the same error was
> dispalyed while building esound and librsvg+libcroco.
> 
> I've searched Google, but the results are confusing. IT MUST somehow be
> related with Solaris linker, which is not GNU.

ld doesn't understand that it is supposed to build a shared library. 
According to the solaris ld man page, -G is the flag to build a shared
library.  Also, according to the gcc ( version 3.3.3 ) man page,

       Options for System V
                                                                                                                                       
       These additional options are available on System V Release
       4 for compatibility with other compilers on those systems:
                                                                                                                                       
       -G  Create a shared object.  It is recommended that -sym-
           bolic or -shared be used instead.


A bug in gcc perhaps??  -G is on the command line but ld is still
linking against crt1.o.

I suggest hacking the Makefile by hand and changing this -G option to
-shared.  Does this fix it?

Mike


> 
> Anybody can help?
> 
> Regards,
> Ivan
> -- 
>   Ing. Ivan Noris
>   System engineer, Business Global Systems, a.s.
>   info & public key: http://www.bgs.sk/people/noris
>   __________________________________________________________________
>   "Semper cautus - semper paratus - semper idem Vix."



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]