paths/(module)linking errors while installing python2 and python3 on solaris 2.11

30 views
Skip to first unread message

Dima Pasechnik

unread,
Jan 26, 2018, 5:51:18 AM1/26/18
to sage-devel
It appears that libpython is not correctly linked to the python3 executable:
...
make[2]: Leaving directory '/var/export/home/dima/Sage/sagetrac-mirror/local/var/tmp/sage/build/python3-3.6.1.p1/src'
Testing importing of various modules...
ld.so.1: python: fatal: libpython3.6m.so.1.0: open failed: No such file or directory
./spkg-build: line 155: 22938 Killed                  $PYTHON -c "import $module"
...

--------------------------------------------------------------------------------------------

More weirdly, building of python2 ends  with local/var/tmp/sage/build/python2-2.7.14.p2/src/python
being (almost) a copy of systemwide (sic!) python2:

$ ./local/var/tmp/sage/build/python2-2.7.14.p2/src/python
Python 2.7.9 (default, Apr 27 2017, 13:49:37) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> 

vs

$ /usr/bin/python
Python 2.7.9 (default, Apr 27 2017, 13:50:01) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> 

(note 13:49:37 vs 13:50:01 discrepancy in time!)

And, needless to say, the final steps fail: attempts to import various built modules fail:
Testing importing of various modules...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/ctypes/__init__.py", line 10, in <module>
    from _ctypes import Union, Structure, Array
ImportError: No module named _ctypes
(of course, it tries to use __init__.py from wrong location!)


-------------------

Any idea - I doubt it's hard to fix, it's just weird...

Thanks,
Dima

PS. We now have access to relatively modern SPARC T4 running solaris2.11, and it looks pretty feasible to resurrect the corresponding port. 

Dima Pasechnik

unread,
Jan 26, 2018, 6:10:56 AM1/26/18
to sage-devel


On Friday, January 26, 2018 at 10:51:18 AM UTC, Dima Pasechnik wrote:
It appears that libpython is not correctly linked to the python3 executable:
...
make[2]: Leaving directory '/var/export/home/dima/Sage/sagetrac-mirror/local/var/tmp/sage/build/python3-3.6.1.p1/src'
Testing importing of various modules...
ld.so.1: python: fatal: libpython3.6m.so.1.0: open failed: No such file or directory
./spkg-build: line 155: 22938 Killed                  $PYTHON -c "import $module"
...

--------------------------------------------------------------------------------------------

More weirdly, building of python2 ends  with local/var/tmp/sage/build/python2-2.7.14.p2/src/python
being (almost) a copy of systemwide (sic!) python2:

$ ./local/var/tmp/sage/build/python2-2.7.14.p2/src/python
Python 2.7.9 (default, Apr 27 2017, 13:49:37) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> 

vs

$ /usr/bin/python
Python 2.7.9 (default, Apr 27 2017, 13:50:01) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> 

(note 13:49:37 vs 13:50:01 discrepancy in time!)

Apparently what's copied is
$ /usr/bin/sparcv9/python
Python 2.7.9 (default, Apr 27 2017, 13:49:37) [C] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>> 

(a different arch, it seems)

Jeroen Demeyer

unread,
Jan 26, 2018, 9:00:08 AM1/26/18
to sage-...@googlegroups.com
On 2018-01-26 12:10, Dima Pasechnik wrote:
> PS. We now have access

Who is "we"?

I'm certainly willing to have a look if "I" have access.

Erik Bray

unread,
Jan 26, 2018, 10:59:28 AM1/26/18
to sage-devel
On Fri, Jan 26, 2018 at 11:51 AM, Dima Pasechnik <dim...@gmail.com> wrote:
> It appears that libpython is not correctly linked to the python3 executable:
> ...
>
> make[2]: Leaving directory
> '/var/export/home/dima/Sage/sagetrac-mirror/local/var/tmp/sage/build/python3-3.6.1.p1/src'
> Testing importing of various modules...
> ld.so.1: python: fatal: libpython3.6m.so.1.0: open failed: No such file or
> directory
> ./spkg-build: line 155: 22938 Killed $PYTHON -c "import
> $module"
>
> ...
> see http://users.ox.ac.uk/~coml0531/tmp/python3-3.6.1.p1.log
> and http://users.ox.ac.uk/~coml0531/tmp/config3.log
>
> --------------------------------------------------------------------------------------------
>
> More weirdly, building of python2 ends with
> local/var/tmp/sage/build/python2-2.7.14.p2/src/python
> being (almost) a copy of systemwide (sic!) python2:

You probably need to put in something like this:

https://git.sagemath.org/sage.git/tree/build/pkgs/python3/spkg-build?h=develop#n98

but for SunOS. I think at the time I wrote that I had assumed we were
no longer supporting SunOS. But assuming that LD_LIBRARY_PATH works
the same as on Linux then maybe that "$UNAME = "Linux" clause should
just be the default (with DYLD_LIBRARY_PATH on OSX, and on Cygwin no
variables need to be set).

Best,
Erik

Dima Pasechnik

unread,
Jan 26, 2018, 11:14:36 AM1/26/18
to sage-devel
Good catch, yes, this fixes the weirdness on python2!

Dima Pasechnik

unread,
Jan 26, 2018, 11:22:58 AM1/26/18
to sage-devel


On Friday, January 26, 2018 at 3:59:28 PM UTC, Erik Bray wrote:
Reply all
Reply to author
Forward
0 new messages