Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some compilation info
#1
Some compilation info
In this topic, I'll update everyone with a list of things I've compiled and how it was done. A lot of these are very simple as long as you have a modern GCC version on your machine. Also, if you want to tackle most things, use --without-gnu-ld as the GNU linker is broken on IRIX.
Assume that I'm using gcc 4.7.1 in all of these. They are also built for Irisware. If you wish to build things for Irisware as well, make sure to use -O2 in your CFLAGS+CXXFLAGS.

Show ContentClick "show" to see how to compile GCC 4.7.3:


Show ContentClick "show" to see how to compile latest OpenSSL stable:


Show ContentClick "show" to see how to compile latest Vim stable:


Older guides:
Show ContentClick "show" to see how to compile GCC 4.7.1 (soon to be outdated):


Downloads:
Compiled GCC 4.7.3 build (secure)
Octane Aezora - Octane - 2xR10k 250 MHz - SI Graphics - 1 GB RAM - 6.5.30
O2 Kiki - O2 - R5k 180 MHz - 192 MB RAM - Dead system board
Two O350 modules Calcifer - Origin 300 - 4xR14k 500 MHz - 2 GB RAM - 6.5.30
Two O350 modules Tohru - Origin 350 - 4xR16k 800 MHz - 4 GB RAM - 6.5.30 - on loan from Raion
Indy Gary - Indy - R5k 180 MHz - 24-bit XL Graphics -  192 MB RAM - 6.5.22
Mirrors
LarBob Offline
Global Moderator
******

Posts: 63
Threads: 13
Joined: Dec 2017
Find Reply
07-19-2018, 10:22 PM
#2
Re: Some compilation info
Thanks!!! Should save a lot of people a lot of time.
TruHobbyist Offline
O2

Posts: 43
Threads: 6
Joined: May 2018
Find Reply
07-20-2018, 03:11 PM
#3
Re: Some compilation info
TruHobbyist post_id=1615 time=1532099494 user_id=84 Wrote:Thanks!!! Should save a lot of people a lot of time.

No problem. I hope to add more things in the future, sorry about the scarcity right now. Currently working on getting a good build of GCC 4.7.3.
Octane Aezora - Octane - 2xR10k 250 MHz - SI Graphics - 1 GB RAM - 6.5.30
O2 Kiki - O2 - R5k 180 MHz - 192 MB RAM - Dead system board
Two O350 modules Calcifer - Origin 300 - 4xR14k 500 MHz - 2 GB RAM - 6.5.30
Two O350 modules Tohru - Origin 350 - 4xR16k 800 MHz - 4 GB RAM - 6.5.30 - on loan from Raion
Indy Gary - Indy - R5k 180 MHz - 24-bit XL Graphics -  192 MB RAM - 6.5.22
Mirrors
LarBob Offline
Global Moderator
******

Posts: 63
Threads: 13
Joined: Dec 2017
Find Reply
07-20-2018, 08:31 PM
#4
Re: Some compilation info
here are my notes for openssl 1.1.0h:

Show ContentSpoiler:
gijoe77 Offline
Tezro

Posts: 349
Threads: 23
Joined: Jun 2018
Find Reply
07-22-2018, 01:13 AM
#5
Re: Some compilation info
my notes on libarchive3.3.2:

Show ContentSpoiler:
gijoe77 Offline
Tezro

Posts: 349
Threads: 23
Joined: Jun 2018
Find Reply
07-22-2018, 01:41 AM
#6
Re: Some compilation info
The linker errors are because the IRIX linker is picky about what gets linked when. Perl has some notes on this:
https://fossies.org/linux/perl/hints/irix_6.sh
I'm the manager
Besides irix.cc, I run these sites:
projectkitsune.com
kazuo.io

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

Raion Offline
Administrator
*******

Posts: 268
Threads: 46
Joined: Nov 2017
Discord: Umbra#0893
Website Find Reply
07-22-2018, 02:32 AM
#7
Re: Some compilation info
Raion-Fox post_id=1657 time=1532226767 user_id=49 Wrote:The linker errors are because the IRIX linker is picky about what gets linked when. Perl has some notes on this:
https://fossies.org/linux/perl/hints/irix_6.sh

yes the IRIX ld is a strange beast, but I'm not sure I was really able to appreciate what you posted - I see some notes and comments about IRIX and various compiler issues, can you help me zero in on what you wanted me to see?
gijoe77 Offline
Tezro

Posts: 349
Threads: 23
Joined: Jun 2018
Find Reply
07-22-2018, 03:18 AM
#8
Re: Some compilation info
So I did some more research into the issues and it may not be a link order, so while the document I posted is helpful for some linker and other compiler idiosyncrasies, I think that I found some better info. Please also attach your config.log, if you don't mind gijoe.

For the first unresolved symbol dirfd, I found this: https://bugs.freedesktop.org/show_bug.cgi?id=8754 This was also an issue with dbus.

Comment no. 8 by Steve Johns said this:

Quote:I don't believe that there is a problem with the linker, since I have never
had a problem with it in the past. I generally use the native Irix MIPS-Pro
linker, but I just attempted to use the GNU v3.3 linker and still have the
same problem. In doing some research on the problem I have come across a few
references on what sounds to be a similar problem when other packages that use
dirfd and were compiled on Irix, for instance:

* thunar-vfs/thunar-vfs-scandir.c: Workaround missing dirfd()
> definition using the POSIX/XPG API on IRIX. This fixes bug
> #1247.


The workaround was the following:

/* %&§$!# IRIX and Solaris */
#if defined(__sgi__) && !defined(dirfd)
#define dirfd(dp) (((DIR *) (dp))->__dd_fd)
#elif (defined(__sun__) || defined(__sun)) && !defined(dirfd) #define dirfd
(dp) (((DIR *) (dp))->dd_fd) #endif

I will also attach the source file where this was implemented.

The last three are related to OpenSSL - I assume you have OpenSSL installed and working, no?

https://www.openssl.org/docs/man1.1.0/cr...X_new.html
I'm the manager
Besides irix.cc, I run these sites:
projectkitsune.com
kazuo.io

Tezro
Octane2
Indigo2 IMPACT
Indigo2
3x O2
3x Indy

Raion Offline
Administrator
*******

Posts: 268
Threads: 46
Joined: Nov 2017
Discord: Umbra#0893
Website Find Reply
07-22-2018, 06:14 AM
#9
Re: Some compilation info
Hey all, I've now updated the post to include a guide on compiling GCC 4.7.3! Big Grin
I am currently running the C test suite and it's going along okay, but not as good as I want. I wouldn't quite recommend using 4.7.3 as your main compiler on IRIX until I get a few more issues ironed out.

EDIT: Here are the results of gmake -j5 check-gcc-c RUNTESTFLAGS="execute.exp"
Code:
=== gcc Summary ===

# of expected passes            20836
/var/tmp/gccbuild/gcc-objs/gcc/xgcc  version 4.7.3 (GCC)

EDIT 2: Results in gcc.sum after gmake -k -j5 check-gcc
Code:
=== gcc Summary ===

# of expected passes            75096
# of unexpected failures        24
# of expected failures          112
# of unsupported tests          1236
/var/tmp/gccbuild/gcc-objs/gcc/xgcc  version 4.7.3 (GCC)
Pretty nice Big Grin
Octane Aezora - Octane - 2xR10k 250 MHz - SI Graphics - 1 GB RAM - 6.5.30
O2 Kiki - O2 - R5k 180 MHz - 192 MB RAM - Dead system board
Two O350 modules Calcifer - Origin 300 - 4xR14k 500 MHz - 2 GB RAM - 6.5.30
Two O350 modules Tohru - Origin 350 - 4xR16k 800 MHz - 4 GB RAM - 6.5.30 - on loan from Raion
Indy Gary - Indy - R5k 180 MHz - 24-bit XL Graphics -  192 MB RAM - 6.5.22
Mirrors
LarBob Offline
Global Moderator
******

Posts: 63
Threads: 13
Joined: Dec 2017
Find Reply
07-24-2018, 04:06 PM
#10
Re: Some compilation info
Raion-Fox post_id=1663 time=1532240065 user_id=49 Wrote:So I did some more research into the issues and it may not be a link order, so while the document I posted is helpful for some linker and other compiler idiosyncrasies, I think that I found some better info. Please also attach your config.log, if you don't mind gijoe.

For the first unresolved symbol dirfd, I found this: https://bugs.freedesktop.org/show_bug.cgi?id=8754 This was also an issue with dbus.

Comment no. 8 by Steve Johns said this:

Quote:I don't believe that there is a problem with the linker, since I have never
had a problem with it in the past. I generally use the native Irix MIPS-Pro
linker, but I just attempted to use the GNU v3.3 linker and still have the
same problem. In doing some research on the problem I have come across a few
references on what sounds to be a similar problem when other packages that use
dirfd and were compiled on Irix, for instance:

* thunar-vfs/thunar-vfs-scandir.c: Workaround missing dirfd()
> definition using the POSIX/XPG API on IRIX. This fixes bug
> #1247.


The workaround was the following:

/* %&§$!# IRIX and Solaris */
#if defined(__sgi__) && !defined(dirfd)
#define dirfd(dp) (((DIR *) (dp))->__dd_fd)
#elif (defined(__sun__) || defined(__sun)) && !defined(dirfd) #define dirfd
(dp) (((DIR *) (dp))->dd_fd) #endif

I will also attach the source file where this was implemented.

The last three are related to OpenSSL - I assume you have OpenSSL installed and working, no?

https://www.openssl.org/docs/man1.1.0/cr...X_new.html

ok, got past the dirfd issue, here is what I did:
put this line in after all the includes (line 112 specifically) of "libarchive/archive_read_disk_posix.c"
Code:
#define dirfd(dp) (((DIR *) (dp))->__dd_fd)

I do have openSSL 1.1.0h compiled and installed - I haven't actually checked to see if its working. I noticed I did not point the include path to it's include dir "/usr/local/include/openssl", but I'm not sure it that even matters, I'm still reading up on how to check it's actually working Smile

although right after the dirfp, next issue is what appear to be bzlib.h problems :

Code:
export CC=cc
export CXX=CC
export CFLAGS="-c99 -g0 -O2 -mips4 -I/usr/nekoware/include -I/usr/local/include -I/usr/local/include/openssl"
export CXXFLAGS="-g0 -O2 -mips4"

./configure --prefix=/usr/local --includedir=/usr/local,/usr/nekoware

<snip>
checking bzlib.h usability... yes
checking bzlib.h presence... no
configure: WARNING: bzlib.h: accepted by the compiler, rejected by the preprocessor!
configure: WARNING: bzlib.h: proceeding with the compiler's result
checking for bzlib.h... yes
checking for BZ2_bzDecompressInit in -lbz2... no
<snip>

/usr/nekoware/bin/sed -i "s/-Wall -Wformat/-woff all/g" Makefile
gmake

  CCLD     bsdtar
ld32: ERROR   33 : Unresolved text symbol "BZ2_bzDecompressEnd" -- 1st referenced by ./.libs/libarchive.a(archive_read_support_format_7zip.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "BZ2_bzDecompressInit" -- 1st referenced by ./.libs/libarchive.a(archive_read_support_format_7zip.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "BZ2_bzDecompress" -- 1st referenced by ./.libs/libarchive.a(archive_read_support_format_7zip.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "BZ2_bzCompressInit" -- 1st referenced by ./.libs/libarchive.a(archive_write_add_filter_bzip2.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "BZ2_bzCompressEnd" -- 1st referenced by ./.libs/libarchive.a(archive_write_add_filter_bzip2.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "BZ2_bzCompress" -- 1st referenced by ./.libs/libarchive.a(archive_write_add_filter_bzip2.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "BZ2_bzlibVersion" -- 1st referenced by ./.libs/libarchive.a(archive_version_details.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "HMAC_CTX_new" -- 1st referenced by ./.libs/libarchive.a(archive_hmac.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "HMAC_CTX_free" -- 1st referenced by ./.libs/libarchive.a(archive_hmac.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: ERROR   33 : Unresolved text symbol "EVP_CIPHER_CTX_reset" -- 1st referenced by ./.libs/libarchive.a(archive_cryptor.o).
        Use linker option -v to see when and which objects, archives and dsos are loaded.  
ld32: INFO    152: Output file removed because of error.
gmake[1]: *** [bsdtar] Error 2

so it appears the bzlib.h issue is bitting me. I looked over the config.log (attached), here is what appears to me to be the issue:

Code:
cc-1005 cc: ERROR File = conftest.c, Line = 73
  The source file "bzlib.h" is unavailable.

  #include <bzlib.h>
                    ^

1 catastrophic error detected in the compilation of "conftest.c".
Compilation terminated.

the only bzlib.h on the system is in /usr/nekoware/include, so I guess I'm getting some include path wrong or this "conftest.c" needs to be modifed? I can't seem to find a conftest.c anywhere... this makefile/autoconfig is sooooooo confusing...


Attached Files
.rar   config.rar (Size: 36.13 KB / Downloads: 3)
gijoe77 Offline
Tezro

Posts: 349
Threads: 23
Joined: Jun 2018
Find Reply
07-30-2018, 07:53 PM


Forum Jump:


Users browsing this thread: 1 Guest(s)