From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Radke Subject: glapi/libdricore linking trouble with make install targets Date: Sun, 9 Sep 2012 09:48:54 +0200 Message-ID: <20120909094854.0005c45c@workstation64.home> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-in-13.arcor-online.net (mail-in-13.arcor-online.net [151.189.21.53]) by gabe.freedesktop.org (Postfix) with ESMTP id D063B9EEF7 for ; Sun, 9 Sep 2012 00:49:06 -0700 (PDT) Received: from mail-in-01-z2.arcor-online.net (mail-in-01-z2.arcor-online.net [151.189.8.13]) by mx.arcor.de (Postfix) with ESMTP id 6D23B2126EF for ; Sun, 9 Sep 2012 09:49:05 +0200 (CEST) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by mail-in-01-z2.arcor-online.net (Postfix) with ESMTP id 6835C7D8217 for ; Sun, 9 Sep 2012 09:49:05 +0200 (CEST) Received: from workstation64.home (g231212136.adsl.alicedsl.de [92.231.212.136]) (Authenticated sender: a.radke@arcor.de) by mail-in-02.arcor-online.net (Postfix) with ESMTPSA id 2ABF23024D for ; Sun, 9 Sep 2012 09:49:05 +0200 (CEST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org When building packages in ArchLinux we try to avoid the old bin/minstall to move each and every file by hand. So we try to move to make install targets. Here we run into several linking issues: make -C src/glx DESTDIR="${pkgdir}" install fails with: make[2]: Entering directory `/build/src/mesa-41d14eaf193c6b1eb87fe1998808a887f1c6c698/src/glx' make[2]: Nothing to be done for `install-data-am'. /usr/bin/mkdir -p '/build/pkg/libgl/usr/lib' /bin/sh ../../libtool --mode=install /usr/bin/install -c libGL.la '/build/pkg/libgl/usr/lib' libtool: install: warning: relinking `libGL.la' libtool: install: (cd /build/src/mesa-41d14eaf193c6b1eb87fe1998808a887f1c6c698/src/glx; /bin/sh /build/src/mesa-41d14eaf193c6b1eb87fe1998808a887f1c6c698/libtool --silent --tag CC --mode=relink gcc -I../../include -I../../include/GL/internal -I../../src/mapi -I../../src/mapi/glapi -I../../src/mapi -I../../src/mapi/glapi -DGLX_SHARED_GLAPI -DXF86VIDMODE -D_REENTRANT -DDEFAULT_DRIVER_DIR=\"/usr/lib/xorg/modules/dri\" -D_GNU_SOURCE -DPTHREADS -DTEXTURE_FLOAT_ENABLED -DUSE_X86_64_ASM -DHAVE_DLOPEN -DHAVE_POSIX_MEMALIGN -DIN_DRI_DRIVER -DUSE_XCB -DGLX_INDIRECT_RENDERING -DGLX_DIRECT_RENDERING -DGLX_USE_TLS -DPTHREADS -DUSE_EXTERNAL_DXTN_LIB=1 -DIN_DRI_DRIVER -DHAVE_ALIAS -DHAVE_MINCORE -DHAVE_LIBUDEV -DHAVE_LLVM=0x0301 -I/usr/include/libdrm -march=x86-64 -mtune=generic -O2 -pipe -fstack-protect or --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -std=c99 -Werror=implicit-function-declaration -Werror=missing-prototypes -fno-strict-aliasing -fno-builtin-memcmp -Wl,-Bsymbolic -vers ion-number 1:2 -no-undefined -Wl,-O1,--sort-common,--as-needed,-z,relro -o libGL.la -rpath /usr/lib libglx.la ../../src/mapi/shared-glapi/libglapi.la ../../src/mapi/glapi/libglapi.la -lXext -lXdamage -lXfixes -lX11-xcb -lX11 -lxcb-glx -lxcb -lXxf86vm -ldrm -lm -lpthread -ldl -inst-prefix-dir /build/pkg/libgl) /usr/bin/ld: cannot find -lglapi collect2: error: ld returned 1 exit status libtool: install: error: relink `libGL.la' with the above command before installing it make[2]: *** [install-libLTLIBRARIES] Error 1 Similar errors happen with other targets. Our community found a workaround by running this: # fix linking because of splitted package make -C src/mapi/shared-glapi DESTDIR="${pkgdir}" install # libGL & libdricore make -C src/glx DESTDIR="${pkgdir}" install make -C src/mesa/libdricore DESTDIR="${pkgdir}" install # fix linking because of splitted package - cleanup make -C src/mapi/shared-glapi DESTDIR="${pkgdir}" uninstall Such step seems to be needed for these other target directories: * make -C src/egl DESTDIR="${pkgdir}" install * make -C src/gbm DESTDIR="${pkgdir}" install Similar issues seem to be there when trying to install the driver targets (intel, ati and nouveau), the workaround seems to be then: # fix linking because of splitted package make -C src/mesa/libdricore DESTDIR="${pkgdir}" install make -C src/mesa/drivers/dri/i915 DESTDIR="${pkgdir}" install make -C src/mesa/drivers/dri/i965 DESTDIR="${pkgdir}" install # fix linking because of splitted package - cleanup make -C src/mesa/libdricore DESTDIR="${pkgdir}" uninstall Can't these targets do proper linking on their own? -Andy ArchLinux