From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Cppunit undefined reference Date: Sat, 2 May 2015 23:00:26 +0200 Message-ID: <20150502210026.GA9796@debian> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44935) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoeWb-0003cP-Bk for guix-devel@gnu.org; Sat, 02 May 2015 17:00:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoeWW-0002rA-Bs for guix-devel@gnu.org; Sat, 02 May 2015 17:00:37 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:61567) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoeWV-0002r2-MS for guix-devel@gnu.org; Sat, 02 May 2015 17:00:31 -0400 Content-Disposition: inline List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org Hello, trying to create a package for librevenge (input of libreoffice), during "make check" the following happens: CXXLD test /gnu/store/6zd4cq3qsxlvcla5wpysf8sadmnq5l5w-cppunit-1.12.1/lib/libcppunit.so: undefined reference to `dlsym' /gnu/store/6zd4cq3qsxlvcla5wpysf8sadmnq5l5w-cppunit-1.12.1/lib/libcppunit.so: undefined reference to `dlopen' /gnu/store/6zd4cq3qsxlvcla5wpysf8sadmnq5l5w-cppunit-1.12.1/lib/libcppunit.so: undefined reference to `dlclose' collect2: error: ld returned 1 exit status John passed "LDFLAGS=-ldl", and the tests pass. Is this the good approach, or do we have a problem with cppunit? $ ldd /gnu/store/6zd4cq3qsxlvcla5wpysf8sadmnq5l5w-cppunit-1.12.1/lib/libcppunit.so linux-vdso.so.1 (0x00007fffbe81b000) libstdc++.so.6 => /gnu/store/rsw0dkmv1x2krv9pl1ciai1h235r9nb7-gcc-4.8.4-lib/lib/libstdc++.so.6 (0x00007f098eb8c000) libm.so.6 => /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libm.so.6 (0x00007f098e889000) libc.so.6 => /gnu/store/hy2hi0zj5hrqkmkhpdxf04c9bcnlnsf9-glibc-2.21/lib/libc.so.6 (0x00007f098e4e9000) libgcc_s.so.1 => /gnu/store/rsw0dkmv1x2krv9pl1ciai1h235r9nb7-gcc-4.8.4-lib/lib/libgcc_s.so.1 (0x00007f098e2d3000) /gnu/store/wiqbxcvzj3r35hd55yxzz919b1dv1hnv-glibc-2.21/lib/ld-linux-x86-64.so.2 (0x00007f098f0ce000) Running "strings" on libcppunit.so indeed returns instances of "dlopen". And adding LDFLAGS=-ldl to cppunit instead of librevenge works as well; I suppose that this is the good approach finally? Andreas