Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)

Parth Patel
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

Reply | Threaded
Open this post in threaded view
|

Re: Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)

Erik Forsberg-11
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


Reply | Threaded
Open this post in threaded view
|

Re: Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)

Richard Levitte - VMS Whacker-2
"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         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
Reply | Threaded
Open this post in threaded view
|

Re: Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)

Richard Levitte - VMS Whacker-2
Said and done: https://github.com/openssl/openssl/issues/8547

I would appreciate it if you followed what's happening there and
helped out getting it right...

Cheers,
Richard

On Thu, 21 Mar 2019 07:09:37 +0100,
Richard Levitte wrote:

>
> "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         [hidden email]
> OpenSSL Project         http://www.openssl.org/~levitte/
>
--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
Reply | Threaded
Open this post in threaded view
|

Re: Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)

Richard Levitte - VMS Whacker-2
Tentative fix: https://github.com/openssl/openssl/pull/8548

On Thu, 21 Mar 2019 07:22:39 +0100,
Richard Levitte wrote:

>
> Said and done: https://github.com/openssl/openssl/issues/8547
>
> I would appreciate it if you followed what's happening there and
> helped out getting it right...
>
> Cheers,
> Richard
>
> On Thu, 21 Mar 2019 07:09:37 +0100,
> Richard Levitte wrote:
> >
> > "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         [hidden email]
> > OpenSSL Project         http://www.openssl.org/~levitte/
> >
> --
> Richard Levitte         [hidden email]
> OpenSSL Project         http://www.openssl.org/~levitte/
>
--
Richard Levitte         [hidden email]
OpenSSL Project         http://www.openssl.org/~levitte/
Reply | Threaded
Open this post in threaded view
|

Re: Openssl Version 1.1.1b fails to compile on Solaris platform(Intel & Sparc)

Dennis Clarke-2
On 3/21/19 7:04 AM, Richard Levitte wrote:
> Tentative fix: https://github.com/openssl/openssl/pull/8548
>

I think this was all covered in detail during the beta test releases
and I am certain that last year I was quite vocal that the config files
are wrong for Solaris. The solution is that the user *must* modify the
config files and really there is no other way. The compiler that I
tested with was Oracle Studio 12.6 on a solaris 10 sparc server with
full contract support and thus the libm files were changed.  That was
all covered last year and I think Rainer Orth has been detailed and also
vocal about the libm disaster.

also see :

    Obsolete Solaris 10 support
    https://gcc.gnu.org/ml/gcc/2018-10/msg00139.html

So don't expect much in the future from gcc for Solaris 10.

Also see extensive discussions in the OpenSSL archives around the
 Solaris issues :

https://mta.openssl.org/pipermail/openssl-users/2018-February/thread.html



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