From: Brian P. Hinz Date: Tue, 1 Mar 2016 01:57:06 +0000 (-0500) Subject: Link libX11 dynamically X-Git-Tag: v1.6.90~53 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=57b11d4601b95da3fc086cc0ed4b3b8eee11333c;p=tigervnc.git Link libX11 dynamically Building libX11 statically causes problems with libpthread, however the version of libX11 that ships with el5 is too old to build libXext. So we have to build a dynamic version of libX11 and link against that while building. The resulting binary will actually be linked against the system libX11, which should be ABI compatible as far as Xvnc is concerned. --- diff --git a/contrib/packages/rpm/el5/SPECS/tigervnc.spec b/contrib/packages/rpm/el5/SPECS/tigervnc.spec index 2fc033e0..1889f613 100644 --- a/contrib/packages/rpm/el5/SPECS/tigervnc.spec +++ b/contrib/packages/rpm/el5/SPECS/tigervnc.spec @@ -709,7 +709,6 @@ for module in ${modules}; do fi if [ "${module}" = "libX11" ]; then autoreconf -fiv - sed -i -e 's|^\(#pragma weak pthread_equal.*\)$||' src/UIThrStubs.c extraoptions="${extraoptions} --disable-specs" fi if [ "${module}" = "libSM" ]; then @@ -733,7 +732,7 @@ for module in ${modules}; do elif [ "${module}" = "libXt" ]; then LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" CFLAGS="$CFLAGS -fno-strict-aliasing" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic --with-xfile-search-path="%{_sysconfdir}/X11/%%L/%%T/%%N%%C%%S:%{_sysconfdir}/X11/%%l/%%T/\%%N%%C%%S:%{_sysconfdir}/X11/%%T/%%N%%C%%S:%{_sysconfdir}/X11/%%L/%%T/%%N%%S:%{_sysconfdir}/X\11/%%l/%%T/%%N%%S:%{_sysconfdir}/X11/%%T/%%N%%S:%{_datadir}/X11/%%L/%%T/%%N%%C%%S:%{_datadir}/X1\1/%%l/%%T/%%N%%C%%S:%{_datadir}/X11/%%T/%%N%%C%%S:%{_datadir}/X11/%%L/%%T/%%N%%S:%{_datadir}/X11/%%\l/%%T/%%N%%S:%{_datadir}/X11/%%T/%%N%%S" elif [ "${module}" = "libX11" ]; then - LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic + LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --disable-static --enable-shared --with-pic elif [ "${module}" = "libXtst" ]; then LDFLAGS="$LDFLAGS -static" PKG_CONFIG="pkg-config --static" ./configure --host=%{_host} --build=%{_build} --prefix=%{_prefix} --libdir=%{_libdir} ${extraoptions} --enable-static --disable-shared --with-pic elif [ "${module}" = "libXpm" ]; then @@ -786,7 +785,7 @@ autoreconf -fiv %endif # link libGL statically against any xorg libraries built above -LDFLAGS="$LDFLAGS -Wl,-Bstatic -lxcb -lX11 -lXdmcp -lXau -lXext -lXxf86vm -ldrm -Wl,-Bdynamic -Wl,-rpath,"'\$$'"ORIGIN/../..%{_libdir}/tigervnc:%{_libdir}/tigervnc:%{_libdir}" \ +LDFLAGS="$LDFLAGS -Wl,-Bstatic -lxcb -lXdmcp -lXau -lXext -lXxf86vm -ldrm -Wl,-Bdynamic -lX11 -lpthread -Wl,-rpath,"'\$$'"ORIGIN/../..%{_libdir}/tigervnc:%{_libdir}/tigervnc:%{_libdir}" \ PKG_CONFIG="pkg-config --static" ./configure %{common_flags} \ --host=%{_host} \ --build=%{_build} \