[OpenIndiana-discuss] running sunpro binaries

Goetz T. Fischer g.fischer at r-a-c.de
Tue Jan 9 02:40:30 UTC 2024


On Mon, 8 Jan 2024 18:17:17 -0800, Alan Coopersmith wrote:
> On 1/8/24 17:55, Goetz T. Fischer wrote:
>> hi again,
>> 
>> i tried to run something compiled with sunpro on solaris 11 on indiana and it almost worked. i put the
>> additional libs in place and everything looked fine. however, running the program in question failed
>> with:
>> 
>> ld.so.1: prog: fatal: prog: hardware capability (CA_SUNW_HW_2) unsupported: 0x80 [ RDSEED ]
>> 
>> of course the first impression is that the cpu simply doesn't support RDSEED but that's not the case. 
>> it
>> does support it and the program in question runs fine on the same machine under solaris 11.
>> so it seems like something sunpro produces gets misinterpreted.
>> 
>> maybe someone else ran into the same problem and found a solution?
> 
> Unfortunately, illumos & Solaris diverged on the id's used for hardware
> capabilities added after the fork.
> 
> On illumos, AV_386_2_RDSEED is 0x00000080 and AV_386_2_BMI2 is 0x00000008,
> but on Solaris, AV2_386_BMI2 is 0x00000080 and AV2_386_RDSEED is 0x00000800.
> (You can see this in the /usr/include/sys/auxv_386.h file on each system.)
> 
> You might be able to use "env LD_DEBUG=cap" to see what capabilities the OS
> thinks your hardware supports and "env LD_HWCAP=+RDSEED" to override that
> detection.
> 
> More info about this is documented in
> 
https://docs.oracle.com/en/operating-systems/solaris/oracle-solaris/11.4/linkers-libraries/capability-processing.html
> and on the illumos side in https://illumos.org/man/1/ld.so.1 .
> 
> -alan-

ah, i see, much thanks for the info!

i always liked the way sunpro binaries expose these cpu features by just using "file" or "ldd". that can 
save a lot of time investigating why something doesn't run.

btw given its age, does it still make sense to use sunpro performance wise? maybe gcc and/or clang did 
catch up in the meantime or maybe got even better?



More information about the openindiana-discuss mailing list