RE: Help with odd linking error...

"'Michael Wojcik' via openssl-users" <[email protected]> Mon, 6 Apr 2026 13:53:25 +0000
Newsgroups gmane.comp.encryption.openssl.user
Message-ID <CH3PPFBCC09965CA7AB79B684175B7B8222C05DA@CH3PPFBCC09965C.namprd07.prod.outlook.com>
From: [email protected] <[email protected]> On Behalf Of Je=
ffrey Bromberger
Sent: Sunday, 5 April, 2026 21:05

> When I try to build 3,6,1 with tests enabled, I get this (unknown to me) =
error:
...
> /opt/local64/bin/gcc -fPIC -m64 -mcpu=3Dultrasparc -Wa,--noexecstack -mcp=
u=3Dultrasparc
> -Wl,-z,defs -shared -static-libgcc -shared -Wl,-Bsymbolic  -mcpu=3Dultras=
parc -lrt \
>        -o test/p_minimal.so -Wl,--version-script=3Dtest/p_minimal.ld \
>        test/p_minimal-dso-p_minimal.o \
>        -lsocket -lnsl -ldl
> /opt/local64/lib/gcc/sparc64-sun-solaris2.8/4.7.4/../../../../sparc64-sun=
-solaris2.8/bin/ld:
> anonymous version tag cannot be combined with other version tags

> Anonymous Version Tag?  And it's ld that is complaining, not the compiler=
!

Yes, according to the /Solaris Linker and Libraries Guide/ (1995) I happen =
to have lying around, ld does Solaris/SysV versiong, which involves embeddi=
ng version symbols specified in a map file (being generated by GCC in this =
case) into the shared object.

As Viktor wrote, look at what's in test/p_minimal.ld. It should have entrie=
s that look something like this:

        FOO_1.2 {
                global:
                        foo;
        } FOO_1.1;
        FOO_1.1 {
                global:
                        bar;
                local:
                        *;
        };

(or possibly something simpler, or much more complicated). That means "vers=
ion 1.1 publishes symbol 'bar' as part of its interface, and version 1.2 in=
herits the 1.1 interface and adds symbol 'foo'". (I think that's right; it'=
s been years since I looked at this stuff. People rarely use it directly; m=
ostly they just use SVR4 library-name versioning, like having libfoo.so.1 s=
ymlinked as libfoo.so.)

You could also try adding -Wl,'-z noversion' (with the quotes) to the compi=
lation command, to suppress versioning. The book mentions that as an option=
 to ld.

There should be a utility named pvs(1) on the system which you can use to q=
uery version information in shared objects. You might see what it has to sa=
y about your libcrypto and libssl.

Michael Wojcik
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
Rocket Software, Inc. and subsidiaries =E2=96=A0 77 Fourth Avenue, Waltham =
MA 02451 =E2=96=A0 Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCE=
mailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - =
http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D

This communication and any attachments may contain confidential information=
 of Rocket Software, Inc. All unauthorized use, disclosure or distribution =
is prohibited. If you are not the intended recipient, please notify Rocket =
Software immediately and destroy all copies of this communication. Thank yo=
u.

--=20
You received this message because you are subscribed to the Google Groups "=
openssl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to openssl-users+unsubscribe-MCmKBN63+Bmbup2nOX2J7Q@public.gmane.org
To view this discussion visit https://groups.google.com/a/openssl.org/d/msg=
id/openssl-users/CH3PPFBCC09965CA7AB79B684175B7B8222C05DA%40CH3PPFBCC09965C=
.namprd07.prod.outlook.com.