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