From mboxrd@z Thu Jan 1 00:00:00 1970 From: Roel Janssen Subject: bug#25072: Missing LD_LIBRARY_PATH in (container) environment Date: Wed, 30 Nov 2016 13:58:15 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43756) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC4TZ-0000r2-VV for bug-guix@gnu.org; Wed, 30 Nov 2016 07:59:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC4TW-0006fE-Tz for bug-guix@gnu.org; Wed, 30 Nov 2016 07:59:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:59891) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cC4TW-0006ey-Pw for bug-guix@gnu.org; Wed, 30 Nov 2016 07:59:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cC4TW-0005kH-JY for bug-guix@gnu.org; Wed, 30 Nov 2016 07:59:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC4Sw-0000hB-C4 for bug-guix@gnu.org; Wed, 30 Nov 2016 07:58:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cC4St-0006Db-C8 for bug-guix@gnu.org; Wed, 30 Nov 2016 07:58:26 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:53713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cC4St-0006DV-8L for bug-guix@gnu.org; Wed, 30 Nov 2016 07:58:23 -0500 Received: from [143.121.198.129] (port=37510 helo=cog147) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1cC4Ss-0005V8-NB for bug-guix@gnu.org; Wed, 30 Nov 2016 07:58:23 -0500 List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: 25072@debbugs.gnu.org Dear Guix, When I create a separate environment using: $ guix environment --container --pure --ad-hoc --network autoconf \ automake make libtool pkg-config postgresql valgrind sed coreutils \ binutils gcc glibc grep sed glib gawk findutils bash Then compile my program: $ make ... CCLD myprogram Then try to run it: $ ./myprogram It fails with: ./myprogram: error while loading shared libraries: libglib-2.0.so.0: \ cannot open shared object file: No such file or directory So, it cannot find glib while I had included it in the list of packages to make available in the container. When I set LD_LIBRARY_PATH as: export LD_LIBRARY_PATH=$LIBRARY_PATH The program runs fine. Therefore, I believe we should set LD_LIBRARY_PATH as well in the container. Thanks. Kind regards, Roel Janssen