From owner-freebsd-ports@freebsd.org Tue Jul 28 21:34:51 2015 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7878B9AD7CE for ; Tue, 28 Jul 2015 21:34:51 +0000 (UTC) (envelope-from r@robakdesign.com) Received: from mail-vn0-f50.google.com (mail-vn0-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 34ACBCBD for ; Tue, 28 Jul 2015 21:34:50 +0000 (UTC) (envelope-from r@robakdesign.com) Received: by vnaa140 with SMTP id a140so48076263vna.2 for ; Tue, 28 Jul 2015 14:34:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=8FYO0Vumz7p0gUk3uITmTmwTlH/siVYEMUu5NiFgToI=; b=X71WSqjAVBgzIUS/LMkf0kZYiJ+Ed1hlfPts/mb458xtjRlXQMRq9/tgOh3RfEn2iE UYMOnf8GLdiFtpA/AeajT8h9nIMsRYj3/seL1so0pPBr77VEjy7nAMTwfVSVbGGTeOJw Lk0foBkvG2uG/qoeDYTKEq55ANBkpFFJGoXg8z5cSMcIQEHKTwf7MiSIH7ZtV7lVxGxb zhsDAQfemtbTMqSTlBseT7L3PwW+C57eVK+ytzAVrh/8SfIZnBZON3JUIwbTx8ScVv5h kaag3O9SdYrR5xF7dBalto3b9OqCX18s/Ko+ENLuqAlNCftENLajQzFIq8ok6Nq9Xk65 WU5w== X-Gm-Message-State: ALoCoQmvVgiZf4MX7i3ypMTwPEEBUkrv+jCpF7je2DlrogyCRWWlgjdMOF2OWKDFGlvLARpfsCE0 X-Received: by 10.52.179.40 with SMTP id dd8mr20280777vdc.60.1438117574737; Tue, 28 Jul 2015 14:06:14 -0700 (PDT) Received: from mail-vn0-f50.google.com (mail-vn0-f50.google.com. [209.85.216.50]) by smtp.gmail.com with ESMTPSA id do5sm5864351vdb.25.2015.07.28.14.06.14 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 14:06:14 -0700 (PDT) Received: by vnav141 with SMTP id v141so47730067vna.0 for ; Tue, 28 Jul 2015 14:06:14 -0700 (PDT) X-Received: by 10.52.89.240 with SMTP id br16mr39173597vdb.58.1438117574249; Tue, 28 Jul 2015 14:06:14 -0700 (PDT) MIME-Version: 1.0 Received: by 10.31.237.134 with HTTP; Tue, 28 Jul 2015 14:05:54 -0700 (PDT) In-Reply-To: <2883201.vcG9JJBxrl@dragon.local> References: <2883201.vcG9JJBxrl@dragon.local> From: =?UTF-8?Q?Bart=C5=82omiej_Rutkowski?= Date: Tue, 28 Jul 2015 22:05:54 +0100 Message-ID: Subject: Re: The mystery of the missing library. To: David Naylor Cc: FreeBSD Mailing List , freebsd-python@freebsd.org Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jul 2015 21:34:51 -0000 I've checked how linux does it and it seems they're (at least Debian) doing static linking - that would fix the issue, whatever it is. Can you adjust the port to do the static instead of dynamic linking binary? Kind regards, Bartek Rutkowski On Tue, Jul 28, 2015 at 7:46 PM, David Naylor wrote: > Hi Hackers, > > > > I am busy simplifying the lang/pypy port (see > https://reviews.freebsd.org/D3209) however I have uncovered a rather > strange problem: > > > > ## BACKGROUND ## > > PyPy has it's own directory layout so we install it into $PREFIX/pypy-2.6. > In there is everything pypy needs including bin/pypy (the binary) and > bin/libpypy-c.so (the shared library). > > > > For convenience we create a symlink to the pypy binary: > > ``` > > # ln -s ../pypy-2.6/bin/pypy $PREFIX/bin/pypy > > ``` > > > > ## PROBLEM ## > > For some reason FreeBSD cannot find the library when executing the pypy > command - except under some situations: > > ``` > > # uname -a > > FreeBSD dragon.local 10.1-RELEASE-p10 FreeBSD 10.1-RELEASE-p10 #0: Wed May > 13 06:54:13 UTC 2015 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC > amd64 > > > > # cd / > > > > # pypy > > Shared object "libpypy-c.so" not found, required by "pypy" > > > > # `which pypy` > > Shared object "libpypy-c.so" not found, required by "pypy" > > > > # .`which pypy` > > Python 2.7.9 (295ee98b69288471b0fcf2e0ede82ce5209eb90b, Jul 26 2015, > 18:38:23) > > [PyPy 2.6.0 with GCC 4.2.1 Compatible FreeBSD Clang 3.4.1 > (tags/RELEASE_34/dot1-final 208032)] on freebsd10 > > Type "help", "copyright", "credits" or "license" for more information. > > >>>> > > > > # ldd `which pypy` > > /usr/local/bin/pypy: > > libpypy-c.so => not found (0) > > libthr.so.3 => /lib/libthr.so.3 (0x80081d000) > > libc.so.7 => /lib/libc.so.7 (0x800a42000) > > > > # ldd .`which pypy` > > ./usr/local/bin/pypy: > > libpypy-c.so => /usr/local/pypy-2.6/bin//libpypy-c.so (0x80081d000) > > libthr.so.3 => /lib/libthr.so.3 (0x804337000) > > libc.so.7 => /lib/libc.so.7 (0x80455c000) > > libbz2.so.4 => /usr/lib/libbz2.so.4 (0x804906000) > > libm.so.5 => /lib/libm.so.5 (0x804b18000) > > libintl.so.8 => /usr/local/lib/libintl.so.8 (0x804d40000) > > libexpat.so.1 => /usr/local/lib/libexpat.so.1 (0x804f4a000) > > libz.so.6 => /lib/libz.so.6 (0x805170000) > > libssl.so.7 => /usr/lib/libssl.so.7 (0x805386000) > > libcrypto.so.7 => /lib/libcrypto.so.7 (0x8055f1000) > > libffi.so.6 => /usr/local/lib/libffi.so.6 (0x8059e5000) > > libcrypt.so.5 => /lib/libcrypt.so.5 (0x805bec000) > > librt.so.1 => /usr/lib/librt.so.1 (0x805e0c000) > > libutil.so.9 => /lib/libutil.so.9 (0x806012000) > > libncurses.so.8 => /lib/libncurses.so.8 (0x806224000) > > ``` > > > > Why would the shared library be found when using a relative path but not > when using an absolute path? Is this a bug in FreeBSD? > > > > Regards > > > > David >