Hello, Makefiles were explicitly looking for a libraries suffixed with the full libtool versioning, such as "libglapi.so.0.0.0". However, on some systems (at least FreeBSD and OpenBSD), libtool only uses a shorter name, such as "libglapi.so.0".
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63269 -- Jean-Sébastien Pédron
From 72a4a551010634956daf6c9df528b4ec1aa26445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= <[email protected]> Date: Wed, 5 Jun 2013 13:30:06 +0200 Subject: [PATCH 2/9] Fix symlinking of libraries in /lib on non-Linux systems Makefiles were explicitly looking for a libraries suffixed with the full libtool versioning, such as "libglapi.so.0.0.0". However, on some systems, libtool only uses a shorter name, such as "libglapi.so.0". Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63269 --- src/egl/main/Makefile.am | 10 ++++++++-- src/glx/Makefile.am | 10 ++++++++-- src/mapi/shared-glapi/Makefile.am | 11 ++++++++--- src/mesa/libdricore/Makefile.am | 10 ++++++++-- 4 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am index ca5257a..c636071 100644 --- a/src/egl/main/Makefile.am +++ b/src/egl/main/Makefile.am @@ -120,8 +120,14 @@ endif # a while by putting a link to the driver into /lib of the build tree. all-local: libEGL.la $(MKDIR_P) $(top_builddir)/$(LIB_DIR); - ln -f .libs/libEGL.so.1.0.0 $(top_builddir)/$(LIB_DIR)/libEGL.so.1 - ln -sf libEGL.so.1 $(top_builddir)/$(LIB_DIR)/libEGL.so + base=$(basename $<); \ + dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \ + ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \ + ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \ + if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \ + ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \ + fi; \ + ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so pkgconfigdir = $(libdir)/pkgconfig diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am index f01709b..fc5863f 100644 --- a/src/glx/Makefile.am +++ b/src/glx/Makefile.am @@ -112,5 +112,11 @@ lib@GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS) # a while by putting a link to the driver into /lib of the build tree. all-local: lib@[email protected] $(MKDIR_P) $(top_builddir)/$(LIB_DIR); - ln -f .libs/lib@[email protected] $(top_builddir)/$(LIB_DIR)/lib@[email protected] - ln -sf lib@[email protected] $(top_builddir)/$(LIB_DIR)/lib@[email protected] + base=$(basename $<); \ + dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \ + ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \ + ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \ + if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \ + ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \ + fi; \ + ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so diff --git a/src/mapi/shared-glapi/Makefile.am b/src/mapi/shared-glapi/Makefile.am index 2021a73..a9c7314 100644 --- a/src/mapi/shared-glapi/Makefile.am +++ b/src/mapi/shared-glapi/Makefile.am @@ -27,6 +27,11 @@ AM_CPPFLAGS = \ all-local: libglapi.la $(MKDIR_P) $(top_builddir)/$(LIB_DIR) - ln -f .libs/libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0.0.0 - ln -sf libglapi.so.0.0.0 $(top_builddir)/$(LIB_DIR)/libglapi.so.0 - ln -sf libglapi.so.0 $(top_builddir)/$(LIB_DIR)/libglapi.so + base=$(basename $<); \ + dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \ + ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \ + ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \ + if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \ + ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \ + fi; \ + ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so diff --git a/src/mesa/libdricore/Makefile.am b/src/mesa/libdricore/Makefile.am index 56ceeb7..44c0882 100644 --- a/src/mesa/libdricore/Makefile.am +++ b/src/mesa/libdricore/Makefile.am @@ -71,8 +71,14 @@ lib_LTLIBRARIES = libdricore@[email protected] # a while by putting a link to the driver into /lib of the build tree. all-local: libdricore@[email protected] $(MKDIR_P) $(top_builddir)/$(LIB_DIR); - ln -f .libs/libdricore@[email protected] $(top_builddir)/$(LIB_DIR)/libdricore@[email protected]; - ln -sf libdricore@[email protected] $(top_builddir)/$(LIB_DIR)/libdricore@[email protected] + base=$(basename $<); \ + dlname=$$(grep dlname= .libs/$< | cut -d "'" -f 2); \ + ver=$$(grep current= .libs/$< | cut -d "=" -f 2); \ + ln -f .libs/$$dlname $(top_builddir)/$(LIB_DIR)/$$dlname; \ + if [ ! -f $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver ]; then \ + ln -sf $$dlname $(top_builddir)/$(LIB_DIR)/$$base.so.$$ver; \ + fi; \ + ln -sf $$base.so.$$ver $(top_builddir)/$(LIB_DIR)/$$base.so endif CLEANFILES = \ -- 1.8.3.1
signature.asc
Description: OpenPGP digital signature
_______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
