pkgsrc 2020Q3 on PPC64 MacPro G5

Text only friendly version @

  - The following entry is dedicated to a Linux PPC64 (Big Endian) platform 
  - All was done on a legendary PowerMac G5  

 Binary pkgsrc PPC64 (64bit ABI) selected packages for Linux PPC64 (glibc based distros) 

 pkgsrc 2020Q3 packages were compiled using native build GCC 10.2.0 and are 64bit 
 all are linked against the older legacy  (Ubuntu GLIBC 2.23-0ubuntu11.2) 2.23  
 so it should work fine on ppc64 distros using this version of glibc and above 

 I have tested the builds on -current OpenSUSE Tumbleweed (September 2020) PPC64 
 and it works just fine. 

 On the Ubuntu 16.04 PPC64 make sure you have 64bit libc installed =>  (0x00003fff86ed0000) => /lib64/ (0x00003fff86ca6000)
	/lib64/ (0x00003fff86ea5000)

root@ubuntu-ppc64:/home/user/SRC# dpkg -l | grep libc6 
ii  libc6:powerpc                          2.23-0ubuntu11.2                           powerpc      GNU C Library: Shared libraries
ii  libc6-dbg:powerpc                      2.23-0ubuntu11.2                           powerpc      GNU C Library: detached debugging symbols
ii  libc6-dev:powerpc                      2.23-0ubuntu11.2                           powerpc      GNU C Library: Development Libraries and Header Files
ii  libc6-dev-powerpc-cross                2.23-0ubuntu3cross1                        all          GNU C Library: Development Libraries and Header Files (for cross-compiling)
ii  libc6-dev-ppc64                        2.23-0ubuntu11.2                           powerpc      GNU C Library: 64bit Development Libraries for PowerPC64
ii  libc6-dev-ppc64-powerpc-cross          2.23-0ubuntu3cross1                        all          GNU C Library: 64bit Development Libraries for PowerPC64 (for cross-compiling)
ii  libc6-powerpc-cross                    2.23-0ubuntu3cross1                        all          GNU C Library: Shared libraries (for cross-compiling)
ii  libc6-ppc64                            2.23-0ubuntu11.2                           powerpc      GNU C Library: 64bit Shared libraries for PowerPC64
ii  libc6-ppc64-powerpc-cross              2.23-0ubuntu3cross1                        all          GNU C Library: 64bit Shared libraries for PowerPC64 (for cross-compiling)


 I have uploaded the compiled GCC 10.2.0 and compiled/bootstraped pkgsrc-2020Q3 to my repo so if you do not want to compile 
 the packages yourself, you can use the pre-build tarballs 

SPECIFIC STEPS FOR Ubuntu 16.04 PPC64 on the G5 
  - on other pure glibc based PPC64 systems omit the 1.1 step 

1.1) Steps to prepare: 
     sudo su - 
     apt-get install libc6-ppc64 libc6-dev-ppc64 libc6-dev-ppc64-powerpc-cross libc6-ppc64-powerpc-cross 

1.2) Get pkgsrc binary tarball 
     pkgsrc documentation - 
     sudo su -  
     cd /usr 
     apt-get install wget    (or curl or whatever to download the tarballs) 
     gunzip pkg.tar.gz
     tar -xvf pkg.tar
1.3) Get GCC 10.2.0 and binutils for PPC64 
     sudo su - 
     cd /usr/local 
     gunzip gcc-10.2.0.tar.gz
     tar -xvf gcc-10.2.0.tar 
     cd /opt
     gunzip opt.tar.gz
     tar -xvf opt.tar 

     // Setup LDCONF and paths so that we can use the GCC in the future 
     // Make sure to add the following new patsh to /etc/ and gcc64 (create the files)  

     root@ubuntu-ppc64:/etc/ cat gcc.conf 
     root@ubuntu-ppc64:/etc/ cat gcc64.conf 

     Adjust paths to add  /usr/local/gcc-10.2.0/bin if you wish to use GCC 10.2.0 for your projects   
1.4) Start using pkgin 
     // Full official documentation for pkgin is available here 
     // So now that we have binary /usr/pkg installed we can setup some packages 
     // by adding the remote repository to the /usr/pkg/etc/pkgin/repositories.conf 
     # Remote http repository
     // Once we have this in place we can update the pkgin cache and sync it with online repo 

     /usr/pkg/bin/pkgin update 

     // Search and install some packages 

     /usr/pkg/bin/pkgin install dunelegacy    

     // Please note the /usr/pkg paths - this is where the new packages get installed 
     // So if needed adjust the paths or just remember to use /usr/pkg/bin   prefix 
     // All packages are 64bit PPC64 binaries !!! 

1.5) Some notable packages you can try 

     // Packages here are just an experiment to learn how to build pkgsrc packages 
     // on non Intel platforms 

     > Development Languages 
     > Browsers 

     > Games 
       devilutionx (Diablo 1 - needs datafiles )  
       scummvm (Play good old DOS games)  
       iortcw  (Return to Castle Wolfenstein - needs datafiles )  
       rott (Rise of Triad - needs datafiles) 
       tyrquake (Quake 1 - needs datafiles) 
       chocolate-doom (Doom,Hexen,Heretic) 
       prboom (Doom1/2)  
       prboom-plus (Doom1/2)
       dhewm3 (Doom3 - needs data files - issues on BigEndian systems - no menu text) 
       dunelegacy (Dune II - needs datafiles) 

      > Security 
        OpenSSH 8.3.1 
      ...and many more ....  
Some notes on the PowerMac G5 Ubuntu 16.04 Linux 
To get audio working make sure you load the following modules 


Unmute the powermac specific sound device in alsamixer 

To get SDL2 working properly from pkgsrc make sure to install libudev-243 !!! 

/usr/pkg/bin/pkgadd libudev-243  

The G5 I use comes with  Advanced Micro Devices, Inc. [AMD/ATI] RV350 [Radeon 9550/9600/X1050 Series]  
and some games do not seem to work with this hardware or are buggy 
 - Yquake2 
 - Cube 2: Sauerbraten 
But other games perform really well - especially 
 - iortcw (Return to Caslte Wolfenstein) 
 - tyr-quake 
 - SDL1.2 based games 
 - SDL2 based games (sometimes there are sound issues)  
 - Pentagram (Ultima VIII) 
 - RoTT (Rise of the Triad) 
 - Prboom/Prboom-pro/Chocolate-Doo/Hexen/Heretic
 - UFO  
   (you need to fix the /usr/pkg/bin/ufo script after installation) 
    // cd /usr/pkg/share/ufoai; ./ufo $*; exit $?
 - DevillutionX (Diablo1) 
 - DuneLegacy (Dune II) 

P.S the package list is still Work in Progress so I will add some more over time 
Hope somebody will enjoy this as much as I did :) 

About astr0baby

Please run Adblock or similar... we have been told to do so since Carl Sagan wrote the Contact .
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.