Public bug reported:

It started in this question 
https://answers.launchpad.net/ubuntu/+source/python2.7/+question/291321
A program linkedagainst libpython2.7 will still fail to find symbols defined 
there. It seems libpython2.7 is not compiled using enable-shared.

Very similar to the problem described here

https://bugs.kde.org/show_bug.cgi?id=330032

By adding LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 in
our environment before running the program solves the issue but this is
not a solution, just a workaround.

The thing is that in Debian this doesn't happen, but it also happens in Fedora
https://bitbucket.org/mtmiller/pytave/issues/3/dlopen-hack

> uname -a

Linux AsusK55VJ-ubuntu 4.2.0-35-generic #40-Ubuntu SMP Tue Mar 15
22:15:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

> lsb_release -crid

Distributor ID: Ubuntu
Description:    Ubuntu 15.10
Release:        15.10
Codename:       wily

> grep libpython2.7 /etc/ld.so.cache

Binary file /etc/ld.so.cache matches

> grep x86_64-linux-gnu /etc/ld.so.conf

nothing

> ls -l /usr/lib/x86_64-linux-gnu/libpython2.7*

lrwxrwxrwx 1 root root 51 Okt 14 2015 /usr/lib/x86_64-linux-gnu/libpython2.7.a 
-> ../python2.7/config-x86_64-linux-gnu/libpython2.7.a
lrwxrwxrwx 1 root root 19 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7_d.so -> libpython2.7_d.so.1
lrwxrwxrwx 1 root root 21 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7_d.so.1 -> libpython2.7_d.so.1.0
-rw-r--r-- 1 root root 6733568 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7_d.so.1.0
lrwxrwxrwx 1 root root 17 Okt 14 2015 /usr/lib/x86_64-linux-gnu/libpython2.7.so 
-> libpython2.7.so.1
lrwxrwxrwx 1 root root 19 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1 -> libpython2.7.so.1.0
-rw-r--r-- 1 root root 3574616 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0

And just to ratify that the library we build indeed is linked against
libpython

ldd pyeval.oct | grep python
 libboost_python-py27.so.1.58.0 => 
/usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0 (0x00007f907b7ce000)
 libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 
(0x00007f907b254000)

Thanks

** Affects: python2.7 (Ubuntu)
     Importance: Undecided
         Status: New

** Description changed:

  It started in this question 
https://answers.launchpad.net/ubuntu/+source/python2.7/+question/291321
  A program linkedagainst libpython2.7 will still fail to find symbols defined 
there. It seems libpython2.7 is not compiled using enable-shared.
  
  Very similar to the problem described here
  
  https://bugs.kde.org/show_bug.cgi?id=330032
  
  By adding LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 in
  our environment before running the program solves the issue but this is
  not a solution, just a workaround.
  
- The thing is that in Debian this doesn't happen (currently testing on Ubuntu 
vivid), but it also happens in Fedora
+ The thing is that in Debian this doesn't happen, but it also happens in Fedora
  https://bitbucket.org/mtmiller/pytave/issues/3/dlopen-hack
  
  > uname -a
  
  Linux AsusK55VJ-ubuntu 4.2.0-35-generic #40-Ubuntu SMP Tue Mar 15
  22:15:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  
  > lsb_release -crid
  
  Distributor ID:       Ubuntu
  Description:  Ubuntu 15.10
  Release:      15.10
  Codename:     wily
  
  > grep libpython2.7 /etc/ld.so.cache
  
  Binary file /etc/ld.so.cache matches
  
  > grep x86_64-linux-gnu /etc/ld.so.conf
  
  nothing
  
  > ls -l /usr/lib/x86_64-linux-gnu/libpython2.7*
  
  lrwxrwxrwx 1 root root 51 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7.a -> 
../python2.7/config-x86_64-linux-gnu/libpython2.7.a
  lrwxrwxrwx 1 root root 19 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7_d.so -> libpython2.7_d.so.1
  lrwxrwxrwx 1 root root 21 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7_d.so.1 -> libpython2.7_d.so.1.0
  -rw-r--r-- 1 root root 6733568 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7_d.so.1.0
  lrwxrwxrwx 1 root root 17 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7.so -> libpython2.7.so.1
  lrwxrwxrwx 1 root root 19 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1 -> libpython2.7.so.1.0
  -rw-r--r-- 1 root root 3574616 Okt 14 2015 
/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0
  
  And just to ratify that the library we build indeed is linked against
  libpython
  
  ldd pyeval.oct | grep python
-  libboost_python-py27.so.1.58.0 => 
/usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0 (0x00007f907b7ce000)
-  libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 
(0x00007f907b254000)
+  libboost_python-py27.so.1.58.0 => 
/usr/lib/x86_64-linux-gnu/libboost_python-py27.so.1.58.0 (0x00007f907b7ce000)
+  libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 
(0x00007f907b254000)
  
  Thanks

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1572328

Title:
  libpython2.7 linked but not loaded

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python2.7/+bug/1572328/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to