Help with odd linking error...

71 views
Skip to first unread message

Jeffrey Bromberger

unread,
Apr 5, 2026, 11:05:16 PM (9 days ago) Apr 5
to openss...@openssl.org
I'm a Wild and Crazy Retro Guy trying to get OpenSSL 3.6.1 to run on Solaris 8 (64-bit SPARC).  I am using GCC 4.7.4 and it is backed up with BINUTILS, which is the GNU Assembler and the GNU Loader, both at Version 2.24.  This seems to be extremely stable for me, as everything else I build with it seems to be bulletproof.

When I try to build 3,6,1 with tests enabled, I get this (unknown to me) error:
/opt/local64/bin/gcc  -Iinclude -I. -I../include -I..  -fPIC -m64 -mcpu=ultrasparc -Wa,--noexecstack -mcpu=ultrasparc -DOPENSSL_BUILDING_OPENSSL -DNDEBUG -D__EXTENSIONS__ -MMD -MF test/p_minimal-dso-p_minimal.d.tmp -c -o test/p_minimal-dso-p_minimal.o ../test/p_minimal.c
perl ../util/mkdef.pl --type dso --ordinals ../util/providers.num  --name test/p_minimal --OS solaris-gcc > test/p_minimal.ld
/opt/local64/bin/gcc -fPIC -m64 -mcpu=ultrasparc -Wa,--noexecstack -mcpu=ultrasparc -Wl,-z,defs -shared -static-libgcc -shared -Wl,-Bsymbolic  -mcpu=ultrasparc -lrt \
        -o test/p_minimal.so -Wl,--version-script=test/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
collect2: error: ld returned 1 exit status
make[1]: *** [test/p_minimal.so] Error 1

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

I know that I can build things with tests disabled, but I would like to run the suite and make sure that what was built turns out to be correct.

Looking for any pointers as to what causes this obscure error and how I might manage to get past it.

Thanks in advance!

j
--
Jeffrey L. Bromberger

Dennis Clarke

unread,
Apr 6, 2026, 12:46:39 AM (9 days ago) Apr 6
to openss...@openssl.org
On 4/5/26 23:04, Jeffrey Bromberger wrote:
> I'm a Wild and Crazy Retro Guy trying to get OpenSSL 3.6.1 to run on
> Solaris 8 (64-bit SPARC). I am using GCC 4.7.4 and it is backed up with
> BINUTILS, which is the GNU Assembler and the GNU Loader, both at Version
> 2.24. This seems to be extremely stable for me, as everything else I build
> with it seems to be bulletproof.
>

I will have a look and see if I can reproduce a similar situation.
I will say I admire anyone still running Solaris 8. The big leap is
getting modern OpenSSH working.

--
--
Dennis Clarke
RISC-V/SPARC/PPC/ARM/CISC
UNIX and Linux spoken

Viktor Dukhovni

unread,
Apr 6, 2026, 1:50:33 AM (9 days ago) Apr 6
to openss...@openssl.org
On Sun, Apr 05, 2026 at 10:04:52PM -0500, Jeffrey Bromberger wrote:

> /opt/local64/bin/gcc -fPIC -m64 -mcpu=ultrasparc -Wa,--noexecstack
> -mcpu=ultrasparc -Wl,-z,defs -shared -static-libgcc -shared -Wl,-Bsymbolic
> -mcpu=ultrasparc -lrt \
> -o test/p_minimal.so -Wl,--version-script=test/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
> collect2: error: ld returned 1 exit status
> make[1]: *** [test/p_minimal.so] Error 1
>
> Anonymous Version Tag? And it's ld that is complaining, not the compiler!

Look at "test/p_minimal.ld". Mind you, this failed when building tests,
and this point all the code you actually care about should/may be already
built, if all else fails, you could wing it, and ignore the tests...

--
Viktor. 🇺🇦 Слава Україні!

Michael Wojcik

unread,
Apr 6, 2026, 9:53:39 AM (8 days ago) Apr 6
to Jeffrey Bromberger, openss...@openssl.org
From: openss...@openssl.org <openss...@openssl.org> On Behalf Of Jeffrey 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=ultrasparc -Wa,--noexecstack -mcpu=ultrasparc
> -Wl,-z,defs -shared -static-libgcc -shared -Wl,-Bsymbolic -mcpu=ultrasparc -lrt \
> -o test/p_minimal.so -Wl,--version-script=test/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 embedding 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 entries 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 "version 1.1 publishes symbol 'bar' as part of its interface, and version 1.2 inherits 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; mostly they just use SVR4 library-name versioning, like having libfoo.so.1 symlinked as libfoo.so.)

You could also try adding -Wl,'-z noversion' (with the quotes) to the compilation 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 query version information in shared objects. You might see what it has to say about your libcrypto and libssl.

Michael Wojcik
================================
Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
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
================================

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 you.

Jeffrey Bromberger

unread,
Apr 9, 2026, 9:21:29 PM (5 days ago) Apr 9
to openss...@openssl.org
So, forgive my radio silence for the last few days.   

For those who asked, my test/p_minimal.ld file is obscenely short:
{
    global:
        OSSL_provider_init;
    local: *;
};

That's all there is.  I am going to try the extra LD flag this evening and will let you know what happens...

For those who care, I am running Perl V5.42, built by me for 64 bit Solaris.  I have loaded nothing other than what came with the source code.  If I need extra modules, please share the details.

j

Michael Wojcik

unread,
Apr 10, 2026, 12:27:56 PM (4 days ago) Apr 10
to openss...@openssl.org
> From: openss...@openssl.org <openss...@openssl.org> On Behalf Of Jeffrey Bromberger
> Sent: Thursday, 9 April, 2026 19:21

> For those who asked, my test/p_minimal.ld file is obscenely short:
> {
> global:
> OSSL_provider_init;
> local: *;
> };

Well, that seems fine. My guess is something upstream is causing the problem. Possibly an assembler file that produced an object with the wrong sort of symbol-table entries. It can be difficult to track that sort of thing down. Maybe the ld flag will fix it.

--

Jeffrey Bromberger

unread,
Apr 10, 2026, 7:38:33 PM (4 days ago) Apr 10
to openssl-users, Michael Wojcik
OK, the system now says this:
warning: -z  noversion ignored.

And I added -Wl,'-z noversion' to my LDFLAGS.  So I am trying to decide whether to use a different version (ugh) of binutils or maybe hack something else.

The goal is that I want to have some sort of test suite so I can confirm that this is all working!

j

Germain

unread,
Apr 10, 2026, 9:45:52 PM (4 days ago) Apr 10
to Jeffrey Bromberger, openssl-users, Michael Wojcik
Mmh..
If you add this to LD_FLAGS, then should it not be just -z noversion ?
🤔
(Forgive-me if I’m wrong.)

Germain

> On Apr 10, 2026, at 4:42 PM, Jeffrey Bromberger <jbrom...@gmail.com> wrote:
>
> -z noversion
Reply all
Reply to author
Forward
0 new messages