Monday, August 05, 2019

Building Python 3.7 on Solaris 11.4 using solaris-userland

As we know Python 3.7 is not out for Oracle Solaris 11.4 yet, but could be out soon, so if you can't wait or you want the latest version then use the official Solaris userland source code to build it

I have blogged about this before so if you want more details see Building FFmpeg on Solaris 11.4 using solaris-userland but will start from scratch anyway, but with a little less detail.

$ echo $PATH  
New Build$ mkdir /scratch  
New Build$ cd /scratch  
New Build$ git clone  
Update Build$ cd /scrach/solaris-userland  
Update Build$ git pull 

Need to change a couple of settings (Your LOCAL REPO and COMPILER being used) 
$ gsed -i 's/^CANONICAL_REPO.*$/CANONICAL_REPO \?= http:\/\/\/solaris\/release/' make-rules/     
$ gsed -i 's/^INTERNAL_ARCHIVE_MIRROR/#INTERNAL_ARCHIVE_MIRROR/; s/^SPRO_VROOT.*$/SPRO_VROOT \?= \$(SPRO_ROOT)\/developerstudio12.6/' make-rules/
$ gmake setup  
$ cd components/python/python37  
$ gmake download  
If you are happy with the download version then you can build Python. 
If you want a different version then edit Makefile (i.e. COMPONENT_VERSION)
$ gmake install 
....long wait.....  

$ gmake publish

$ pkg info -r -g file:/scratch/solaris-userland/i386/repo python-37
          Name: runtime/python-37
       Summary: The Python interpreter, libraries and utilities
      Category: Development/Python
         State: Not installed
     Publisher: nightly
       Version: 3.7.4
Packaging Date: August  5, 2019 at  1:27:43 PM
          Size: 51.69 MB
          FMRI: pkg://nightly/runtime/python-37@3.7.4-
   Project URL:
    Source URL:

$ pkg install -n -v -g file:/scratch/solaris-userland/i386/repo python-37
            Packages to update:         1
     Estimated space available: 233.73 GB
Estimated space to be consumed: 490.08 MB
       Create boot environment:        No
Create backup boot environment:       Yes
          Rebuild boot archive:        No

Changed packages:
    3.7.1- -> 3.7.4-

Formatting: I now use for code formatting.

1 comment:

A. Freeman said...

I found your blog from searching for info on joining Solaris to an AD domain, specifically this post:

I think comments are closed on the article, but I was wondering if you could help me? I'm on omnios-r151030-521a1fc4d1

I notice you do a lot of compiling from source. Do you ever use Joyent's fork of NetBSD pkgsrc?