Re: undefined symbol fabs in file test/ct_test.o in openssl 1.1.0e on solaris

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



In message <1481BC8A-3E0C-4598-9556-0A83F78AC763@xxxxxxxxxxxx> on Fri, 17 Feb 2017 14:15:10 -0500, Viktor Dukhovni <openssl-users@xxxxxxxxxxxx> said:

openssl-users> 
openssl-users> > On Feb 17, 2017, at 1:51 PM, Bill Smith <bsmith@xxxxxxxxxxxx> wrote:
openssl-users> > 
openssl-users> > I pulled down 1.1.0e and tried to build it on Solaris 64.  I ran into the following error:
openssl-users> > 
openssl-users> > 
openssl-users> > /tools/solaris/SunStudio12.2/bin/cc -xarch=v9 -mt -o test/ct_test test/ct_test.o test/testutil.o -L. -lcrypto -lresolv -lsocket -lnsl -ldl -lpthread
openssl-users> > cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs
openssl-users> > Undefined                 first referenced
openssl-users> > symbol                             in file
openssl-users> > fabs                                test/ct_test.o
openssl-users> > ld: fatal: Symbol referencing errors. No output written to test/ct_test
openssl-users> > 
openssl-users> > These diffs appear to fix the issue.  Added -lm to ex_libs for Solaris.
openssl-users> > 
openssl-users> > solaris64:117$ diff -c /scratch/bsmith/openssl/openssl-1.1.0e/Configurations/10-main.conf Configurations/10-main.conf
openssl-users> > *** /scratch/bsmith/openssl/openssl-1.1.0e/Configurations/10-main.conf    Thu Feb 16 06:58:20 2017
openssl-users> > --- Configurations/10-main.conf Fri Feb 17 11:06:45 2017
openssl-users> > ***************
openssl-users> > *** 179,185 ****
openssl-users> >          inherit_from     => [ "BASE_unix" ],
openssl-users> >          template         => 1,
openssl-users> >          cflags           => "-DFILIO_H",
openssl-users> > !         ex_libs          => add("-lresolv -lsocket -lnsl -ldl"),
openssl-users> >          dso_scheme       => "dlfcn",
openssl-users> >          thread_scheme    => "pthreads",
openssl-users> >          shared_target    => "solaris-shared",
openssl-users> > --- 179,185 ----
openssl-users> >          inherit_from     => [ "BASE_unix" ],
openssl-users> >          template         => 1,
openssl-users> >          cflags           => "-DFILIO_H",
openssl-users> > !         ex_libs          => add("-lresolv -lsocket -lnsl -ldl -lm"),
openssl-users> >          dso_scheme       => "dlfcn",
openssl-users> >          thread_scheme    => "pthreads",
openssl-users> >          shared_target    => "solaris-shared",
openssl-users> > solaris64:117$
openssl-users> 
openssl-users> I would avoid adding that library dependency to all the code just because
openssl-users> a test program uses fabs().  It is better to just avoid fabs() in the test
openssl-users> code, or add "-lm" for just that program (or perhaps just all the test
openssl-users> programs).

This would mean adding that in test/build.info.  Unfortunately, libm
is Unix and the build.info are meant to be platform agnostic, so it's
kind of a no can do.  I'll have a thought on this kind of thing.

Cheers,
Richard

-- 
Richard Levitte         levitte@xxxxxxxxxxx
OpenSSL Project         http://www.openssl.org/~levitte/
-- 
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux