Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)
Richard Levitte
levitte at openssl.org
Thu Mar 21 06:09:37 UTC 2019
"collect2" indicates that this isn't Solaris ld, but GNU ld in
action. With GNU ld, -Map doesn't do what you think it does
(from https://sourceware.org/binutils/docs/ld/Options.html#Options):
-Map=mapfile
Print a link map to the file mapfile. See the description of
the -M option, above.
Also, with GNU ld, -M has a different meaning than for Solaris:
-M
--print-map
Print a link map to the standard output. A link map provides
information about the link, including the following:
...
What you actually want is -Wl,--version-script=
However, it seems like our solaris configs need more than just a small
tweak. The way they're currently written, they assume that the linker
is Solaris ld at all times... I'm told, though, that this is a
correct assumption with the default gcc on Solaris, but that doesn't
mean a non-default gcc that uses GNU ld instead of Solaris ld is
impossible.
I'll raise an issue on this.
Cheers,
Richard
On Thu, 21 Mar 2019 06:22:35 +0100,
Erik Forsberg wrote:
>
> I see this is Solaris 10, dont use that anywhere anymore.
> But in Solaris 11, its fine. From ld(1)
>
> -M mapfile
>
> Reads mapfile as a text file of directives to the link-editor. This
> option can be specified multiple times. If mapfile is a directory,
> then all regular files, as defined by stat(2), within the directory
> are processed. See Chapter 10, Mapfiles in the Link-Editor in Ora-
> cle Solaris 11.4 Linkers and Libraries Guide. Example mapfiles are
> provided in /usr/lib/ld. See also FILES.
>
>
> >-- Original Message --
> >
> >Hi All,
> >
> >We are trying to build OpenSSL version 1.1.1b on Solaris, but it fails with
> >following error:
> >
> >libcrypto.map: file format not recognized; treating as linker script
> >collect2: error: ld returned 1 exit status
> >gmake[2]: *** [libcrypto.so] Error 1
> >gmake[1]: *** [all] Error 2
> >
> >$ uname -a
> >SunOS mh-vmss3fnpb32.enguk.acresso.com 5.10 Generic_147147-26 sun4v sparc
> >sun4v
> >
> >
> >This is happening because of the flags defined in
> >Configurations/10-main.conf:
> >
> >#### Solaris configurations
> > "solaris-common" => {
> > inherit_from => [ "BASE_unix" ],
> > template => 1,
> > lib_cppflags => "-DFILIO_H",
> > ex_libs => add("-lsocket -lnsl -ldl"),
> > dso_scheme => "dlfcn",
> > thread_scheme => "pthreads",
> > shared_target => "self",
> > shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",
> > shared_ldflag => "-Wl,-Bsymbolic",
> > shared_defflag => "-Wl,-M,",
> > shared_sonameflag=> "-Wl,-h,",
> > },
> >
> >After changing the shared_defflag to "-Wl, -Map," it works fine. i.e "-Wl,
> >-M" is not recognized on Solaris, it needs to be "-Wl, -Map,".
> >Couple of queries here:
> >1. Is it not a bug on Solaris with OpenSSL 1.1.1b version?
> >2. Can we modify 'Configurations/10-main.conf' in our local copy of OpenSSL
> >which is used internally by our product?Will it cause any licensing
> >problem(OpenSSL license and GPL)?
> >
> >Any help would be greatly appreciated.
> >
> >Regards,
> >Parth
>
>
>
--
Richard Levitte levitte at openssl.org
OpenSSL Project http://www.openssl.org/~levitte/
More information about the openssl-users
mailing list