[OpenIndiana-discuss] running sunpro binaries

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jan 9 02:17:17 UTC 2024


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-



More information about the openindiana-discuss mailing list