After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 340377 - Compile error with LDFLAGS="-Wl,--as-needed"
Compile error with LDFLAGS="-Wl,--as-needed"
Status: RESOLVED FIXED
Product: vino
Classification: Applications
Component: Server
2.13.x
Other All
: Normal normal
: ---
Assigned To: Vino Maintainer(s)
Vino Maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-05-02 07:15 UTC by christopher taylor
Modified: 2006-10-05 13:11 UTC
See Also:
GNOME target: ---
GNOME version: 2.15/2.16


Attachments
vino-2.13.5-as-needed.patch (358 bytes, patch)
2006-05-07 14:44 UTC, John N. Laliberte
accepted-commit_now Details | Review

Description christopher taylor 2006-05-02 07:15:39 UTC
Please describe the problem:
There are undefined reference with the above mentioned LDFLAGS.
I took the binutils from the 2.17 branch. It compiles, if I manualy add -
lgnutls, so I guess it gets lost somewhere. I would appreciate, if somebody 
could point out how to fix errors like this. Thanks

make[4]: Entering directory `/tmp/spb-vino-1562/vino/server'
/bin/sh ../libtool --tag=CC --mode=link gcc  -I/usr/X11/include -march=athlon-
xp -O2 -mfpmath=sse -msse -mmmx -m3dnow -pipe -fomit-frame-pointer  -Wl,--as-
needed  -o vino-server  vino-cursor.o vino-enums.o vino-fb.o vino-input.o vino-
main.o vino-marshal.o vino-mdns.o vino-prefs.o vino-prompt.o vino-server.o vino-
shell.o vino-util.o  GNOME_RemoteDesktop-skels.o GNOME_RemoteDesktop-
common.o   -pthread -L/usr/local/lib -L/usr/X11R6/lib -lglade-2.0 -lgnomeui-2 -
lSM -lICE -lbonoboui-2 -lgnome-keyring -lxml2 -lz -lgnomecanvas-2 -lgnome-2 -
lpopt -lart_lgpl_2 -lpangoft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -
lgdk_pixbuf-2.0 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgnomevfs-2 -lbonobo-2 -
lgconf-2 -lgobject-2.0 -lbonobo-activation -lORBit-2 -lm -lgmodule-2.0 -ldl -
lgthread-2.0 -lglib-2.0    -L/usr/lib -lgnutls -L/usr/lib -ltasn1 -lgcrypt -
lgpg-error -lgcrypt -lgpg-error -lSM -lICE  -L/usr/X11R6/lib -lX11  -lXtst -
lXext -lXdamage -lXfixes ../server/libvncserver/libvncserver.la  -ljpeg -lz
gcc -I/usr/X11/include -march=athlon-xp -O2 -mfpmath=sse -msse -mmmx -m3dnow -
pipe -fomit-frame-pointer -Wl,--as-needed -o vino-server vino-cursor.o vino-
enums.o vino-fb.o vino-input.o vino-main.o vino-marshal.o vino-mdns.o vino-
prefs.o vino-prompt.o vino-server.o vino-shell.o vino-util.o 
GNOME_RemoteDesktop-skels.o GNOME_RemoteDesktop-common.o -pthread  -
L/usr/local/lib -L/usr/X11R6/lib /usr/lib/libglade-2.0.so -
L/usr/X11/lib /usr/local/lib/libgnomeui-2.so -
L/usr/lib /usr/local/lib/libbonoboui-2.so /usr/local/lib/libgnome-
keyring.so /usr/local/lib/libgnomecanvas-2.so /usr/local/lib/libgnome-
2.so /usr/lib/libesd.so /usr/lib/libasound.so /usr/lib/libaudiofile.so /usr/lib/
libart_lgpl_2.so /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-
2.0.so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-
2.0.so /usr/lib/libpangocairo-1.0.so /usr/lib/libpangoft2-
1.0.so /usr/lib/libpango-
1.0.so /usr/lib/libcairo.so /usr/X11/lib/libXrender.so /usr/lib/libpng12.so /usr
/X11/lib/libglitz.so /usr/lib/libfontconfig.so /usr/lib/libexpat.so /usr/lib/lib
freetype.so /usr/local/lib/libgnomevfs-2.so /usr/lib/libxml2.so -lssl -
lcrypto /usr/lib/libavahi-glib.so /usr/lib/libavahi-client.so /usr/lib/libdbus-
1.so /usr/lib/libavahi-common.so -lresolv -lutil -lrt /usr/local/lib/libbonobo-
2.so /usr/local/lib/libgconf-2.so /usr/local/lib/libbonobo-
activation.so /usr/lib/libORBitCosNaming-2.so /usr/lib/libORBit-
2.so /usr/lib/libpopt.so /usr/lib/libgobject-2.0.so -lm /usr/lib/libgmodule-
2.0.so /usr/lib/libgthread-2.0.so -lpthread /usr/lib/libglib-
2.0.so /usr/lib/libgnutls.so /usr/lib/libtasn1.so /usr/lib/libgcrypt.so -
lnsl /usr/lib/libgpg-
error.so /usr/X11/lib/libSM.so /usr/X11/lib/libICE.so /usr/X11/lib/libXtst.so /u
sr/X11/lib/libXext.so /usr/X11/lib/libXdamage.so /usr/X11/lib/libXfixes.so /usr/
X11/lib/libX11.so /usr/X11/lib/libXau.so /usr/X11/lib/libXdmcp.so -
ldl ../server/libvncserver/.libs/libvncserver.a /usr/lib/libjpeg.so -lz
../server/libvncserver/.libs/libvncserver.a(auth.o): In function 
`rfbAuthProcessTLSHandshake':
auth.c:(.text+0x449): undefined reference to `gnutls_handshake'
auth.c:(.text+0x457): undefined reference to `gnutls_error_is_fatal'
auth.c:(.text+0x49d): undefined reference to `gnutls_strerror'
auth.c:(.text+0x4b7): undefined reference to `gnutls_deinit'
../server/libvncserver/.libs/libvncserver.a(auth.o): In function 
`rfbAuthProcessSecurityTypeMessage':
auth.c:(.text+0x5e2): undefined reference to `gnutls_init'
auth.c:(.text+0x5ed): undefined reference to `gnutls_set_default_priority'
auth.c:(.text+0x602): undefined reference to `gnutls_kx_set_priority'
auth.c:(.text+0x621): undefined reference to `gnutls_credentials_set'
auth.c:(.text+0x633): undefined reference to `gnutls_transport_set_ptr'
auth.c:(.text+0x63e): undefined reference to `gnutls_handshake'
auth.c:(.text+0x64c): undefined reference to `gnutls_error_is_fatal'
auth.c:(.text+0x6be): undefined reference to `gnutls_strerror'
auth.c:(.text+0x6d8): undefined reference to `gnutls_deinit'
../server/libvncserver/.libs/libvncserver.a(auth.o): In function 
`rfbAuthCleanupClient':
auth.c:(.text+0x73c): undefined reference to `gnutls_deinit'
auth.c:(.text+0x75f): undefined reference to `gnutls_bye'
../server/libvncserver/.libs/libvncserver.a(auth.o): In function 
`rfbAuthCleanupScreen':
auth.c:(.text+0x964): undefined reference to `gnutls_dh_params_deinit'
auth.c:(.text+0x972): undefined reference to 
`gnutls_anon_free_server_credentials'
auth.c:(.text+0x977): undefined reference to `gnutls_global_deinit'
../server/libvncserver/.libs/libvncserver.a(auth.o): In function 
`rfbAuthInitScreen':
auth.c:(.text+0x9ab): undefined reference to `gnutls_global_init'
auth.c:(.text+0x9b9): undefined reference to 
`gnutls_anon_allocate_server_credentials'
auth.c:(.text+0x9c7): undefined reference to `gnutls_dh_params_init'
auth.c:(.text+0x9dd): undefined reference to `gnutls_dh_params_generate2'
auth.c:(.text+0x9f5): undefined reference to `gnutls_anon_set_server_dh_params'
../server/libvncserver/.libs/libvncserver.a(sockets.o): In function 
`WriteExact':
sockets.c:(.text+0x344): undefined reference to `gnutls_record_send'
../server/libvncserver/.libs/libvncserver.a(sockets.o): In function 
`ReadExactTimeout':
sockets.c:(.text+0x536): undefined reference to `gnutls_record_recv'
../server/libvncserver/.libs/libvncserver.a(vncauth.o): In function 
`vncRandomBytes':
vncauth.c:(.text+0xa7): undefined reference to `gcry_randomize'
collect2: ld returned 1 exit status
make[4]: *** [vino-server] Error 1
make[4]: Leaving directory `/tmp/spb-vino-1562/vino/server'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/tmp/spb-vino-1562/vino/server'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/spb-vino-1562/vino/server'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/spb-vino-1562/vino'
make: *** [all] Error 2

Steps to reproduce:
1. checkout vino from cvs
2. Set LDFLAGS="-Wl,--as-needed"
3. compile


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 John N. Laliberte 2006-05-07 14:44:30 UTC
Created attachment 64958 [details] [review]
vino-2.13.5-as-needed.patch

attached patch from TGL <degrenier@easyconnect.fr> to fix this.

see:
http://bugs.gentoo.org/show_bug.cgi?id=132558
for more information.

thanks!
Comment 2 Mark McLoughlin 2006-05-08 08:55:06 UTC
Looks good, thanks

Please commit to HEAD or let us know if you need someone to commit it
Comment 3 christopher taylor 2006-05-14 16:36:02 UTC
I can confirm too, could somebody commit please?

Thanks a lot!
Comment 4 christopher taylor 2006-06-27 09:53:52 UTC
Is there still a problem with the patch or does anybody not want to close this bug ???
Comment 5 Kjartan Maraas 2006-10-05 13:11:29 UTC
Commited. Thanks for your patience :-)