The mystery of the missing library.

David Naylor dbn at
Tue Jul 28 18:46:11 UTC 2015

Hi Hackers,

I am busy simplifying the lang/pypy port (see however I have uncovered a rather 
strange problem:

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/ (the shared library).  

For convenience we create a symlink to the pypy binary:
# ln -s ../pypy-2.6/bin/pypy $PREFIX/bin/pypy

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 at amd64-  amd64

# cd /

# pypy
Shared object "" not found, required by "pypy"

# `which pypy`
Shared object "" 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: => not found (0) => /lib/ (0x80081d000) => /lib/ (0x800a42000)

# ldd .`which pypy`
./usr/local/bin/pypy: => /usr/local/pypy-2.6/bin// (0x80081d000) => /lib/ (0x804337000) => /lib/ (0x80455c000) => /usr/lib/ (0x804906000) => /lib/ (0x804b18000) => /usr/local/lib/ (0x804d40000) => /usr/local/lib/ (0x804f4a000) => /lib/ (0x805170000) => /usr/lib/ (0x805386000) => /lib/ (0x8055f1000) => /usr/local/lib/ (0x8059e5000) => /lib/ (0x805bec000) => /usr/lib/ (0x805e0c000) => /lib/ (0x806012000) => /lib/ (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? 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 949 bytes
Desc: This is a digitally signed message part.
URL: <>

More information about the freebsd-ports mailing list