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.