didbs-0.1.X - GCC Compiler testing releases

hammy

Member
Jun 1, 2019
65
32
18
UK
First issue noticed - due the way I installed gcc, there's broken .la files referencing a lib32 directory.

You may or may not hit this, depends if you are using pkgconfig and PKG_CONFIG_PATH.

Issue created here with a bit more info:


Work around is to hand edit the relevant .la files. Longer term n32 stuff should go into lib32 to be correct anyway.
 

hammy

Member
Jun 1, 2019
65
32
18
UK
Gijoe spotted that there's a difference between the didbs supplied "fixed" includes of gcc - these are headers that gcc patches to remove C99 or C++ compatibility problems.

The patched headers included are the ones from the didbs build host - that is Irix 6.5.30 + patches.

If you're on Irix < 6.5.23, at the very least there are differences in some of the system headers that may cause issues (the pthread.h was one the sparked the discussion).

One possible resolution for this:

Post didbs install - run the mkheaders binary found in the $ROOT/libexec/gcc/mips-sgi-irix-6.5/X.X.X/install-tools directory.

This does highlight the problems we may have generating binaries on a 6.5.30 host that are incompatible with older 6.X releases.

To be looked into further.
 

hammy

Member
Jun 1, 2019
65
32
18
UK
Edit: retiring of 0.1.1.

didbs-0.1.1 update.

Fixed the lib dirs (now lib32) - and included a build of gcc9.2.

There will be a mips4 and mips3 release - with the mips3 coming soon (in the process of building).
 
Last edited:
  • Like
Reactions: Elf

hammy

Member
Jun 1, 2019
65
32
18
UK
Edit: Retiring of 0.1.1.

And the mips3 version of said tools.

These were built on a mips4 host 6.5.30 - so your mileage may vary - any feedback welcomed.
 
Last edited:

hammy

Member
Jun 1, 2019
65
32
18
UK
GCC bugs found in didbs-0.1.1 release so far:

  1. Thread local declarations in C11/C++11 onwards cause illegal instruction
    GCC detects that the binutils supports mips thread local storage, but IRIX ELF itself doesn't.
    Needs a new didbs release to fix.

  2. The default output ISA (mips3/mips4) isn't working correctly - have seen compilation failures with instruction not supported.
    The mips4 gccs should output and assemble with a default ISA of mips4. I must be missing some default setup somewhere.
    Can be worked around (where possible) by explicitly adding -mips4 in CFLAGS/LDFLAGS.
 

hammy

Member
Jun 1, 2019
65
32
18
UK
Edit: retiring of 0.1.2.

Didbs version 0.1.2 release - bug fixes for the above thread_local and default output isa.

Note 1: With this release, it is no longer possible to build mips3 executables with the mips4 gcc releases. Due the way in which little c-runtime fragments are built by GCC, this means using the mips4 GCC compilers will always result in the executable being promoted to mips4.

Note 2: These GCC compilers are not yet fully optimised - this will come once we are happy we are getting somewhere stable (it's a loooong slow build when the GCC itself must be built with optimisation).

Mips3/Mips4 release below - care to get the correct one (mips4 cannot create mips3 executables)
 
Last edited:
  • Like
Reactions: Elf

hammy

Member
Jun 1, 2019
65
32
18
UK
Didbs version 0.1.3 release - the optimised GCC release.

Edit: Retiring of 0.1.3.

Changes from 0.1.2:
  • Reduced the number of included packages (size still grew a little thanks to LTO and GOMP below)
  • Another attempt to fix the default ISA (0.1.2 mips3 release gcc9 could generate mips4 code if you didn't pass -mips3)
  • All gcc and binutils releases now built with -O2
  • All gcc releases have link time optimisation available
  • All gcc releases have GNU Open MP enabled (gomp)
What's not included / things that someone may find interesting to look into:
  • The D language front end builds fine, but the D standard library needs porting (gcc9.2)
  • There is a GO front end that we might be able to activate (gcc9.2)
  • The libsanitizer parts in gcc build OK, but libsanitizer itself will need porting (gcc9.2)
 
Last edited:

hammy

Member
Jun 1, 2019
65
32
18
UK
Quick and dirty timings from pre and post -O2 of the compiler - this shows time to compile for a little C++ program.

140
 
Last edited:

hammy

Member
Jun 1, 2019
65
32
18
UK
Currently outstanding bugs as follows:

* All gcc versions > 4.8.2 - math conformance problems

The breaking commit is here:


Looks like tweaks to include soft/hard floating point configurability have broken something.
Didbs bug is here:

* All gcc versions due to binutils - issues linking with historical "nekoware" libraries causing ld crashes

No deeper info for the moment, I'll ensure next didbs release includes -g debug versions of binutils.
 
Last edited:

hammy

Member
Jun 1, 2019
65
32
18
UK
Note: Older didbs0.1.X torrents now retired.

Didbs version 0.1.4 release.

Changes from 0.1.3:

  • Bug fix of math conformance issues for gcc >4.8.2 (I hope...)
  • All binutils builds are made with -g now in the hope to get better data for crash diagnosis
  • A little patch to all binutils2.32 so that a missing .rld_map inside the .data section is logged rather than a hard crash
 
Last edited:

hammy

Member
Jun 1, 2019
65
32
18
UK
Edit note: Older didbs0.1.X torrents now retired.

Didbs version 0.1.5 release.

Changes from 0.1.4:
  • All binutils should now handle ELF libraries where a section with misalignment has no section data (legacy MIPSPro C++ libraries and some nekoware libraries)
  • All binutils no longer -g (space saving)
Mips3/Mips4 release below - care to get the correct one (mips4 cannot create mips3 executables)

Note1: If you are on Irix <6.5.30 and you want to use the included GCC compilers - you'll need to execute the "header fixer" for each individual GCC.
These can found here for mips4, adjust paths for mips3 (and should be run as the user that you performed the didbs extraction with):

Code:
/usr/didbs/0_1_5_n32_mips4_mp/gbs4_2/libexec/gcc/mips-sgi-irix6.5/4.8.2/install-tools/mkheaders
/usr/didbs/0_1_5_n32_mips4_mp/gbs5_0/libexec/gcc/mips-sgi-irix6.5/5.4.0/install-tools/mkheaders
/usr/didbs/0_1_5_n32_mips4_mp/gbs8_1/libexec/gcc/mips-sgi-irix6.5/8.2.0/install-tools/mkheaders
/usr/didbs/0_1_5_n32_mips4_mp/gbs9_1/libexec/gcc/mips-sgi-irix6.5/9.2.0/install-tools/mkheaders
Note2: Toyed with the idea of including rpm, but punted to a later release.
 
Last edited:

hammy

Member
Jun 1, 2019
65
32
18
UK
Didbs technical release 0.1.6 - The "GCC platform And GCC Only Packages" release.

For those just interested in the base "mipspro" release - this is probably not very interesting - this release is more about being able (on my side) to provide new and interesting tools that can only be built by gcc. In this release we get to play with "rpm".

What this release does change for 0.1.5 mipspro users - it should now be possible to build only one package without having to build the entire didbs tree.

So - if you are OK with 0.1.5, stick with that.

Changes from 0.1.5:

  • It is now possible to build an entire "didbs" tree using gcc
  • Package "state" computed by hash
  • Hash usage should mean you can checkout github "didbs" and build a single package (may be bugs, alpha quality)
  • gccs are now "-O3"
  • Didbs doesn't need a stage0 any more, uses existing didbs version
  • python2, libpopt + rpm in the "gcc" release
If you want to stick with mipspro - or are not interested in the rpm/python2 in the gcc bundle - there is no big benefit to any upgrade!

How to use:
  • Create /usr/didbs
  • chown it to your user
  • Extract the download under there as your user
Note1: For this technical release, I am only providing mips3 versions - please see if the mips3 works for you and if you really want a mips4 version, I'll try and accommodate.

Note2: If you are on Irix <6.5.30 and you want to use the included GCC compilers - you'll need to execute the "header fixer" for each individual GCC.

Code:
/usr/didbs/0_1_6_n32_mips3_mp/gbs4_2/libexec/gcc/mips-sgi-irix6.5/4.8.2/install-tools/mkheaders
/usr/didbs/0_1_6_n32_mips3_mp/gbs5_0/libexec/gcc/mips-sgi-irix6.5/5.4.0/install-tools/mkheaders
/usr/didbs/0_1_6_n32_mips3_mp/gbs8_1/libexec/gcc/mips-sgi-irix6.5/8.2.0/install-tools/mkheaders
/usr/didbs/0_1_6_n32_mips3_mp/gbs9_1/libexec/gcc/mips-sgi-irix6.5/9.2.0/install-tools/mkheaders
And here is an example of setting paths to use the extracted gcc9 (assuming you've "symlinked" /usr/didbs/current to your extracted release):

Code:
PATH=/usr/didbs/current/gbs9_1/bin:/usr/didbs/current/bin:$PATH
LD_LIBRARYN32_PATH=/usr/didbs/current/gbs9_1/lib32:/usr/didbs/current/lib32:$LD_LIBRARYN32_PATH
PKG_CONFIG_PATH=/usr/didbs/current/gbs9_1/lib32/pkgconfig:/usr/didbs/current/lib32/pkgconfig:$PKG_CONFIG_PATH
export PATH LD_LIBRARYN32_PATH PKG_CONFIG_PATH
 

Attachments

Last edited:
  • Like
Reactions: Elf

Unxmaal

Administrator
Feb 8, 2019
44
16
8
Here's a modular bash_profile that seems to work for me:

Bash:
echo setup sgidev network build env
echo ----------------------------
hostname
# Vars
##  default irix path
IRIX_PATH=/usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bsd:/sbin:/usr/bin:/etc:/usr/etc:/usr/bin/X11
IRIX_LDPATH=/usr/lib32:/usr/lib32/internal:/lib32
#------ didbs --------
# didbs gcc version
DGCC=gbs9_1
DIDBSC="/usr/didbs/current"
DIDBSPATH="$DIDBSC/$DGCC/bin:DIDBSC/bin"
#----- ixp -----
IXPPATH=/usr/ixp/bin:/usr/ixp/sbin
#---- irixports ----
IPATH=/usr/people/$USER/.local/bin
#---- optlocal ----
OPTLOCALPATH=/opt/local/bin:/opt/local/sbin:/opt/local/binutils/bin:/opt/local/binutils-dev/bin:/opt/local/python35/bin:/opt/local/gcc-8.2.0/bin
OPTLOCALPYTHONPATH=/opt/local/python35/bin
#---- nekoware ----
NEKOPATH=/usr/nekoware/bin:/usr/nekoware/sbin
#---------------
stty intr '^C' echoe
export TERM=xterm
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\\[\033[00m\] $ "
# LDs
# for irixportks mksh to work:
#export LD_LIBRARY_PATH="$DIDBSC/lib"
export LD_LIBRARYN32_PATH="$DIDBSC/lib32:$DIDBSC/$DGCC/lib32::$IRIX_LDPATH"
export PKG_CONFIG_PATH="$DIDBSC/$DGCC/lib32/pkgconfig:$DIDBSC/lib32/pkgconfig:$PKG_CONFIG_PATH"
export CC="$DIDBSC/$DGCC/bin/gcc"
export CXX="$DIDBSC/$DGCC/bin/g++"
export XAUTHORITY=~/.Xauthority
unset PATH
export PATH="$IPATH:$DIDBSPATH:$OPTLOCALPYTHONPATH:$NEKOPATH:$IRIX_PATH"
export PYTHONPATH=/opt/local/python35/lib/python3.5/site-packages
echo " "
echo " "
 
Last edited:
  • Like
Reactions: Elf

hammy

Member
Jun 1, 2019
65
32
18
UK
Thanks Unxy! I kinda assume a lot that someone else might not immediately "click" with :)

So I made a boo-boo - and there is a show-stopper issue in 0.1.6 gcc release above that means "rpm" is installed in the wrong place....

Assuming you would like to use rpm (and get a bug fix so that --usage and --help work) - here's a little guide to hot-patching using didbs itself:


If you follow those steps, that should get rpm and the libs installed in the right directories (so they can be run from '/usr/didbs/current/bin/rpm`).

Result:

Code:
[dan@leafy didbs.git]$ rpm --usage
Usage: rpm [-afgplsiv?] [-a|--all] [-f|--file] [-g|--group] [-p|--package]
        [--pkgid] [--hdrid] [--triggeredby] [--whatconflicts]
        [--whatrequires] [--whatobsoletes] [--whatprovides]
        [--whatrecommends] [--whatsuggests] [--whatsupplements]
        [--whatenhances] [--nomanifest] [-c|--configfiles] [-d|--docfiles]
        [-L|--licensefiles] [-A|--artifactfiles] [--noghost] [--noconfig]
        [--noartifact] [--dump] [-l|--list] [--queryformat=QUERYFORMAT]
        [-s|--state] [--nofiledigest] [--nofiles] [--nodeps] [--noscript]
        [--allfiles] [--allmatches] [--badreloc] [-e|--erase=<package>+]
        [--excludedocs] [--excludepath=<path>] [--force]
        [-F|--freshen=<packagefile>+] [-h|--hash] [--ignorearch]
        [--ignoreos] [--ignoresize] [--noverify] [-i|--install] [--justdb]
        [--nodeps] [--nofiledigest] [--nocontexts] [--nocaps] [--noorder]
        [--noscripts] [--notriggers] [--oldpackage] [--percent]
        [--prefix=<dir>] [--relocate=<old>=<new>] [--replacefiles]
        [--replacepkgs] [--test] [-U|--upgrade=<packagefile>+]
        [--reinstall=<packagefile>+] [-D|--define='MACRO EXPR']
        [--undefine=MACRO] [-E|--eval='EXPR'] [--target=CPU-VENDOR-OS]
        [--macros=<FILE:...>] [--load=<FILE>] [--noplugins] [--nodigest]
        [--nosignature] [--rcfile=<FILE:...>] [-r|--root=ROOT]
        [--dbpath=DIRECTORY] [--querytags] [--showrc] [--quiet]
        [-v|--verbose] [--version] [-?|--help] [--usage]
[dan@leafy didbs.git]$ which rpm
/usr/didbs/current/bin/rpm
 

Unxmaal

Administrator
Feb 8, 2019
44
16
8
This could be me, but with a newly-compiled git from didbs gcc 9.1, I get this:
C:
$ git status
530715:git: rld: Fatal Error: attempted access to unresolvable symbol in git: setenv

 $ ldd $(which git)
        libz.so  =>      /usr/didbs/current/lib32/libz.so
        libm.so  =>      /usr/lib32/libm.so
        libc.so.1  =>    /usr/lib32/libc.so.1
        libgcc_s.so.1  =>        /usr/didbs/current/gbs9_1/lib32/libgcc_s.so.1
 

hammy

Member
Jun 1, 2019
65
32
18
UK
Is this the 'git' from inside the didbs release - or you are building git in Irixports?

I ask as I see a bunch more things linked into the git inside didbs:

From the "gcc" release git:
Code:
[dan@leafy ~]$ which git
/usr/didbs/current/bin/git
[dan@leafy ~]$ ldd `which git`
    libz.so.1.2.11  =>     /usr/didbs/current/lib32/libz.so.1.2.11    
    libiconv.so.2  =>     /usr/didbs/current/lib32/libiconv.so.2    
    libgen.so  =>     /usr/lib32/libgen.so    
    libintl.so.8  =>     /usr/didbs/current/lib32/libintl.so.8    
    libcharset.so.1  =>     /usr/didbs/0_1_6_n32_mips3_gcc/lib32/libcharset.so.1    
    libm.so  =>     /usr/lib32/libm.so    
    libpthread.so  =>     /usr/lib32/libpthread.so    
    libc.so.1  =>     /usr/lib32/libc.so.1    
    libgcc_s.so.1  =>     /usr/didbs/current/gbs9_1/lib32/libgcc_s.so.1
From the "mipspro" release git:
Code:
[dan@leafy didbs]$ ldd `which git`
    libpthread.so  =>     /usr/lib32/libpthread.so    
    libz.so.1  =>     /usr/didbs/0_1_6_n32_mips3_mp/lib32/libz.so.1    
    libiconv.so.3  =>     /usr/didbs/0_1_6_n32_mips3_mp/lib32/libiconv.so.3    
    libgen.so  =>     /usr/lib32/libgen.so    
    libintl.so.9  =>     /usr/didbs/0_1_6_n32_mips3_mp/lib32/libintl.so.9    
    libc.so.1  =>     /usr/lib32/libc.so.1
 

Unxmaal

Administrator
Feb 8, 2019
44
16
8
Is this the 'git' from inside the didbs release - or you are building git in Irixports?

I ask as I see a bunch more things linked into the git inside didbs:

From the "gcc" release git:
Code:
[dan@leafy ~]$ which git
/usr/didbs/current/bin/git
[dan@leafy ~]$ ldd `which git`
    libz.so.1.2.11  =>     /usr/didbs/current/lib32/libz.so.1.2.11   
    libiconv.so.2  =>     /usr/didbs/current/lib32/libiconv.so.2   
    libgen.so  =>     /usr/lib32/libgen.so   
    libintl.so.8  =>     /usr/didbs/current/lib32/libintl.so.8   
    libcharset.so.1  =>     /usr/didbs/0_1_6_n32_mips3_gcc/lib32/libcharset.so.1   
    libm.so  =>     /usr/lib32/libm.so   
    libpthread.so  =>     /usr/lib32/libpthread.so   
    libc.so.1  =>     /usr/lib32/libc.so.1   
    libgcc_s.so.1  =>     /usr/didbs/current/gbs9_1/lib32/libgcc_s.so.1
From the "mipspro" release git:
Code:
[dan@leafy didbs]$ ldd `which git`
    libpthread.so  =>     /usr/lib32/libpthread.so   
    libz.so.1  =>     /usr/didbs/0_1_6_n32_mips3_mp/lib32/libz.so.1   
    libiconv.so.3  =>     /usr/didbs/0_1_6_n32_mips3_mp/lib32/libiconv.so.3   
    libgen.so  =>     /usr/lib32/libgen.so   
    libintl.so.9  =>     /usr/didbs/0_1_6_n32_mips3_mp/lib32/libintl.so.9   
    libc.so.1  =>     /usr/lib32/libc.so.1

This was for an Irixports git. I built it as my path was not loading didbs/current/bin . Wompwomp.
 

hammy

Member
Jun 1, 2019
65
32
18
UK
Didbs technical release 0.1.7 - The "RPM might actually be usable now" release.

Note: Care - the rpm included here assumes a "prefix" of the /usr/didbs/XX-XX directory - which is not what you want. Use ~/.rpmmacros or edit the $DIDBS_ROOT/lib/rpm/macros file and override this. Once done, you'll want to rpmdb --init a new database under that root.

Changes from the 0.1.6 gcc release:
  • RPM shouldn't require "post-installation rebuilding" + has better underlying libraries
  • Boost "b2" build tool
  • Select boost libraries (very recent)
  • GCC9 is now the only compiler included in didbs
  • Both gcc and "binutils" are now directly inside the didbs bin and lib32 directories. No more additional path acrobatics
If you want to stick with mipspro - or are not interested in the rpm/python2 in the gcc bundle - there is no big benefit to any upgrade!

I'm unclear how much further I might support / create mipspro releases. There's going to be increasingly more things that cannot be built with mipspro.

How to use:
  • Create /usr/didbs
  • chown it to your user
  • Extract the download under there as your user
Note1: For this technical release, I am only providing mips3 versions - please see if the mips3 works for you and if you really want a mips4 version, I'll try and accommodate.

Note2: If you are on Irix <6.5.30 and you want to use the included GCC compiler - you'll need to execute the "header fixer".

Code:
/usr/didbs/0_1_7_n32_mips3_gcc/libexec/gcc/mips-sgi-irix6.5/9.2.0/install-tools/mkheaders
And here is an example of setting paths to use the didbs tools (assuming you've "symlinked" /usr/didbs/current to your extracted release):

Code:
PATH=/usr/didbs/current/bin:$PATH
LD_LIBRARYN32_PATH=/usr/didbs/current/lib32:$LD_LIBRARYN32_PATH
PKG_CONFIG_PATH=/usr/didbs/current/lib32/pkgconfig:$PKG_CONFIG_PATH
export PATH LD_LIBRARYN32_PATH PKG_CONFIG_PATH
 

Attachments

  • Like
Reactions: Elf

About us

  • Silicon Graphics User Group (SGUG) is a community for users, developers, and admirers of Silicon Graphics (SGI) products. We aim to be a friendly hobbyist community for discussing all aspects of SGIs, including use, software development, the IRIX Operating System, and troubleshooting, as well as facilitating hardware exchange.

User Menu