On 02/22/2011 02:24 PM, Alan Coopersmith wrote:
On 02/22/11 09:39 AM, Antoine Martin wrote:
/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /lib/libdl.so.2
so try adding it to the linker command line
/lib/libdl.so.2: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[3]: *** [Xvnc] Error 1
make[3]: Leaving directory
`/usr/src/tigervnc-1.0.90-r4305/xorg/xserver/hw/vnc'
The xserver upstream configure.ac sets up a DLOPEN_LIBS variable to add
to the LIBS each Xserver using dlopen needs to link with.
If libtool is working correctly, I think that should get passed automatically
via the os/libos.la file, since it has DLOPEN_LIBS in its libos_la_LIBADD.
This landed right after the Xorg 1.7 branch/release though, so you may be
missing it if you're building with Xorg 1.7.x or older:
http://cgit.freedesktop.org/xorg/xserver/commit/?id=d30637339963950910e5f5fb755b8465ac7dddb
The patch didn't apply cleanly to tigervnc's xserver 7.4.
I tried to apply it anyway (see result attached), but I just don't
understand this linker stuff well enough and now I get this one:
/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO
//lib/libdl.so.2 so try adding it to the linker command line
//lib/libdl.so.2: could not read symbols: Invalid operation
Antoine
diff -urN xserver.b/configure.ac xserver.a/configure.ac
--- xserver.b/configure.ac 2011-02-25 01:22:49.945271480 +0000
+++ xserver.a/configure.ac 2011-02-25 01:29:35.755272663 +0000
@@ -177,6 +177,7 @@
dnl has it in libc), or if libdl is needed to get it.
AC_CHECK_FUNC([dlopen], [],
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
+AC_SUBST(DLOPEN_LIBS)
case $host_os in
linux*)
@@ -830,7 +831,7 @@
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
GLX_LIBS='$(top_builddir)/glx/libglx.la'
- GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS"
+ GLX_SYS_LIBS="$GLX_SYS_LIBS"
else
GLX=no
fi
@@ -1340,7 +1341,7 @@
AC_CHECK_FUNCS([pci_device_enable])
LIBS=$SAVE_LIBS
CFLAGS=$SAVE_CFLAGS
- XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS
$GLX_SYS_LIBS"
+ XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS"
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
case $host_os in
diff -urN xserver.b/configure.ac xserver.a/configure.ac
--- xserver.b/configure.ac 2011-02-25 01:19:04.645270008 +0000
+++ xserver.a/configure.ac 2011-02-25 01:22:49.945271480 +0000
@@ -177,7 +177,6 @@
dnl has it in libc), or if libdl is needed to get it.
AC_CHECK_FUNC([dlopen], [],
AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
-AC_SUBST(DLOPEN_LIBS)
case $host_os in
linux*)
@@ -831,7 +830,7 @@
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
GLX_LIBS='$(top_builddir)/glx/libglx.la'
- GLX_SYS_LIBS="$GLX_SYS_LIBS"
+ GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS"
else
GLX=no
fi
diff -urN xserver.b/glx/Makefile.am xserver.a/glx/Makefile.am
--- xserver.b/glx/Makefile.am 2011-02-25 01:22:49.945271480 +0000
+++ xserver.a/glx/Makefile.am 2011-02-25 01:24:11.905270010 +0000
@@ -56,6 +56,8 @@
extension_string.c \
extension_string.h
+libglxdri_la_LIBADD = $(DLOPEN_LIBS)
+
libglx_la_SOURCES = \
$(indirect_sources) \
$(glapi_sources) \
@@ -93,3 +95,5 @@
swap_interval.c \
unpack.h \
xfont.c
+
+libglx_la_LIBADD = $(DLOPEN_LIBS)
diff -urN xserver.b/glx/Makefile.am xserver.a/glx/Makefile.am
--- xserver.b/glx/Makefile.am 2011-02-25 01:19:04.645270008 +0000
+++ xserver.a/glx/Makefile.am 2011-02-25 01:22:49.945271480 +0000
@@ -56,8 +56,6 @@
extension_string.c \
extension_string.h
-libglxdri_la_LIBADD = $(DLOPEN_LIBS)
-
libglx_la_SOURCES = \
$(indirect_sources) \
$(glapi_sources) \
@@ -95,5 +93,3 @@
swap_interval.c \
unpack.h \
xfont.c
-
-libglx_la_LIBADD = $(DLOPEN_LIBS)
diff -urN xserver.b/hw/xfree86/loader/Makefile.am
xserver.a/hw/xfree86/loader/Makefile.am
--- xserver.b/hw/xfree86/loader/Makefile.am 2011-02-25 01:18:52.635270143
+0000
+++ xserver.a/hw/xfree86/loader/Makefile.am 2011-02-25 01:27:20.675271037
+0000
@@ -33,3 +33,4 @@
xf86sym.c \
sym.h \
$(SPARC_SOURCES)
+libloader_la_LIBADD = $(DLOPEN_LIBS)
diff -urN xserver.b/os/Makefile.am xserver.a/os/Makefile.am
--- xserver.b/os/Makefile.am 2011-02-25 01:18:52.695270015 +0000
+++ xserver.a/os/Makefile.am 2011-02-25 01:28:41.665269975 +0000
@@ -24,6 +24,7 @@
xstrans.c \
xprintf.c \
$(XORG_SRCS)
+libos_la_LIBADD = $(DLOPEN_LIBS)
if SECURE_RPC
libos_la_SOURCES += $(SECURERPC_SRCS)
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in
Real-Time with Splunk. Collect, index and harness all the fast moving IT data
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business
insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel