[csw-maintainers] Building tightvnc (was: Can't run Sun Studio in vncserver)

Sebastian Kayser skayser at opencsw.org
Wed Sep 9 11:05:46 CEST 2009


Maciej (Matchek) Blizinski wrote on 09.09.2009 10:39:
> I've spent some more time on tightvnc. There was a response from their
> mailing list, perhaps I'll get some help there. I'm currently trying
> to build it the simplest way possible, just to get it to build, and
> then gradually tidy it up. I'm using a short shell script. It
> currently fails with:
> 
> gmake[3]: Leaving directory
> `/home/maciej/src/vnc-nongar/vnc_unixsrc/Xvnc/programs/Xserver/hw/vnc'
> LD_RUN_PATH=/usr/openwin/lib /opt/studio/SOS12/SUNWspro/bin/cc -o Xvnc
> -xO3 -Xa    -L/opt/csw/lib -L../.././/exports/lib  dix/libdix.a
> os/libos.a ../.././/lib/Xau/libXau.a ../.././/lib/Xdmcp/libXdmcp.a
> ../.././/exports/lib/libfont.a  hw/vnc/libvnc.a
> ../.././/../libvncauth/libvncauth.a cfb/libcfb.a cfb16/libcfb.a
> cfb24/libcfb.a cfb32/libcfb.a mfb/libmfb.a dix/libxpstubs.a mi/libmi.a
> Xext/libext.a             -lsocket -lnsl  -lm   -L/usr/local/lib
> -ljpeg -lz -lcrypt
> Undefined			first referenced
>  symbol  			    in file
> ffsl                                os/libos.a(WaitFor.o)
> ld: fatal: Symbol referencing errors. No output written to Xvnc
> gmake[2]: *** [Xvnc] Error 1
> 
> The libos.a library in fact refers to the ffsl symbol:
> 
> maciej at netra ~/src/vnc-nongar/vnc_unixsrc/Xvnc/programs/Xserver $ nm
> os/libos.a  | grep ffsl
> [51]    |         0|       0|FUNC |GLOB |0    |UNDEF  |ffsl
> [91]    |         0|       0|FUNC |GLOB |0    |UNDEF  |ffsl
> [51]    |         0|       0|FUNC |GLOB |0    |UNDEF  |ffsl
> 
> ...and libdix.a contains it:
> 
> maciej at netra ~/src/vnc-nongar/vnc_unixsrc/Xvnc/programs/Xserver $ nm
> dix/libdix.a | grep ffsl
> dix/libdix.a[ffsl.o]:
> [9]     |        16|      72|FUNC |GLOB |0    |2      |ffsl
> [1]     |         0|       0|FILE |LOCL |0    |ABS    |ffsl.c
> 
> The script and its output:
> http://netra.chopin.edu.pl/~maciej/tightvnc/tightvnc-1.3.10-20090909-095450-build.sh.txt
> http://netra.chopin.edu.pl/~maciej/tightvnc/tightvnc-1.3.10-20090909-095450.log
> 
> I find it strange that it doesn't find this symbol, because
> dix/libdix.a is present in the cc invocation (see above). Do you have
> any ideas what might be the problem?

AFAIR symbol resolution during the link phase takes place _once_ from
left to right, where symbol references come first and symbol definitions
need to be placed on the right hand side.

>From ld(1):

         Archives  are
         traditionally  specified  at the end of the command line
         so that their symbol definitions resolve  any  preceding
         references.  However, specifying archives multiple times
         to satisfy their own interdependencies,  can  be  neces-
         sary.

Above, dix/libdix.a (symbol definition) comes before os/libos.a (symbol
reference). Does it make a difference when add another dix/libdix.a
_after_ os/libos.a?

Sebastian



More information about the maintainers mailing list