[OpenIndiana-discuss] When this misery end?

Hung Nguyen Gia gh_origin at zohomail.com
Sun Jan 10 16:14:24 UTC 2021


Illumos is not 64 bit ready. This is why the compiler has to target 32 bit by default. All Illumos distros have this limitation.

Don't get me wrong, I have read that many parts of the OS itself remain to be 32 bit, e.g: nscd, they are not yet 64 bit ready.

I pretty much agreed and appreciate the Unleashed OS initiative but sadly it was terminated: https://unleashed-os.org/

It is, IMHO, what Illumos should be.

But you are partially right, though. Nothing stop we from setup the compiler to provide 64 bit binaries by default but still keeps the -m32 target so we could build the not 64 bit ready parts of the OS, too. This, indeed, is what many Linux distros are doing now. We are really weirded, because we are a 64 bit OS but choose to 'cross compile' to 32 bit by default. It should be the otherwise around: a 64 bit OS which generates 64 bit binaries by default but offer to 'cross compile' to 32 bit. But all of the Illumos distros did so, not only us. It's the general limitation of the platform.

Put all of this aside, I only want to know how to fix my current linking issue with libdazzle. I have no idea to workaround this 'Wrong ELF Class' issue.

This issue is a known problem: https://blogs.oracle.com/solaris/wrong-elf-class-requires-consistent-compiler-flags-v2

It have haunted many developers and scared them from even attempt to make their software compile on Solaris/Illumos.

---- On Sun, 10 Jan 2021 22:00:51 +0700 Bob Friesenhahn <bfriesen at simple.dallas.tx.us> wrote ----

 > On Sun, 10 Jan 2021, Hung Nguyen Gia via openindiana-discuss wrote: 
 >  
 > > Unlike other systems, Illumos is a weirded platform! You have a 64 
 > > bit OS but the compiler by default will generate 32 bit binaries! 
 > > The linker by default link 32 bit binaries! This has caused endless 
 >  
 > This is not a feature of Illumos, rather it is a feature of the 
 > compiler delivered by the distribution. 
 >  
 > There are compilers targeting Illumos which produce 64-bit output by 
 > default. 
 >  
 > There is nothing actually wrong with 32-bit apps since they can 
 > safely address 2GB of memory, which is quite a lot.  The 64-bit ABI 
 > does provide more registers and instructions and improved calling 
 > convention so code may run faster. 
 >  
 > Bob 
 > -- 
 > Bob Friesenhahn 
 > bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ 
 > GraphicsMagick Maintainer, http://www.GraphicsMagick.org/ 
 > Public Key, http://www.simplesystems.org/users/bfriesen/public-key.txt 
 >  
 > _______________________________________________ 
 > openindiana-discuss mailing list 
 > openindiana-discuss at openindiana.org 
 > https://openindiana.org/mailman/listinfo/openindiana-discuss 
 > 



More information about the openindiana-discuss mailing list