[openssl-users] undefined symbol fabs in file test/ct_test.o in openssl 1.1.0e on solaris

Viktor Dukhovni openssl-users at dukhovni.org
Fri Feb 17 19:15:10 UTC 2017


> On Feb 17, 2017, at 1:51 PM, Bill Smith <bsmith at progress.com> wrote:
> 
> I pulled down 1.1.0e and tried to build it on Solaris 64.  I ran into the following error:
> 
> 
> /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
> cc: Warning: -xarch=v9 is deprecated, use -m64 to create 64-bit programs
> Undefined                 first referenced
> symbol                             in file
> fabs                                test/ct_test.o
> ld: fatal: Symbol referencing errors. No output written to test/ct_test
> 
> These diffs appear to fix the issue.  Added -lm to ex_libs for Solaris.
> 
> solaris64:117$ diff -c /scratch/bsmith/openssl/openssl-1.1.0e/Configurations/10-main.conf Configurations/10-main.conf
> *** /scratch/bsmith/openssl/openssl-1.1.0e/Configurations/10-main.conf    Thu Feb 16 06:58:20 2017
> --- Configurations/10-main.conf Fri Feb 17 11:06:45 2017
> ***************
> *** 179,185 ****
>          inherit_from     => [ "BASE_unix" ],
>          template         => 1,
>          cflags           => "-DFILIO_H",
> !         ex_libs          => add("-lresolv -lsocket -lnsl -ldl"),
>          dso_scheme       => "dlfcn",
>          thread_scheme    => "pthreads",
>          shared_target    => "solaris-shared",
> --- 179,185 ----
>          inherit_from     => [ "BASE_unix" ],
>          template         => 1,
>          cflags           => "-DFILIO_H",
> !         ex_libs          => add("-lresolv -lsocket -lnsl -ldl -lm"),
>          dso_scheme       => "dlfcn",
>          thread_scheme    => "pthreads",
>          shared_target    => "solaris-shared",
> solaris64:117$

I would avoid adding that library dependency to all the code just because
a test program uses fabs().  It is better to just avoid fabs() in the test
code, or add "-lm" for just that program (or perhaps just all the test
programs).

-- 
	Viktor.



More information about the openssl-users mailing list