[gambit-list] Building Gambit with Alternate Versions of OpenSSL

Bob Coleman bobcolem at yahoo.com
Thu Sep 6 09:44:06 EDT 2018


Friends -

I recently ran into the OpenSSL 1.1 compatibility issue that others noted
on the gitter chat when building Gambit on Ubuntu 18.  Ubuntu 18.04 is
using the 1.1 version of OpenSSL as default.  Downgrading was not an option
for me due to other dependencies (namely node 8) on the 1.1 version.

OpenSSL version 1.1 introduces several backwards incompatible changes, but
Gambit is only using a hand full of those.  I have patched os_io.c to allow
building with OpenSSL 1.1, but before submitting a pull request I want to
make sure building against OpenSSL 1.0 still works properly.

Is there a way to configure the Gambit build process to use a locally
installed version of OpenSSL 1.0, instead of the system installed OpenSSL
1.1, for testing?

I've tried setting the CFLAGS, LDFLAGS, etc environment variables, as
below, with no luck.  I have also tried building OpenSSL as a static and
shared library with the same results.  Here are the steps I'm using for
building:

    ./configure
    make -j8 realclean
    ./configure
    make -j8 from-scratch
    make -j8 bootstrap
    make bootclean

    export CFLAGS=" -I/home/user/.local/openssl1.0/include/openssl "
    export LDFLAGS="  -L/home/user/.local/openssl1.0/lib "
    export LIBRARY_PATH="/home/user/.local/openssl1.0/lib"
    export LD_LIBRARY_PATH="/home/user/.local/openssl1.0/lib"

    ./configure --enable-single-host --enable-poll --enable-openssl
--prefix=/home/user/tmp/gambit-test/build
    make -j8
    make check


These are the error messages from the make file.  It seems to be having
trouble finding the library, or maybe it is linking it in the wrong order.
Note the flag adding a non-standard OpenSSL location that is always present
with --enable-openssl, even through that directory doesn't exsist
"-L/usr/local/opt/openssl/lib".  Could that be confusing things?

making all in gsi
make[1]: Entering directory '/home/user/tmp/gambit-test/gambit-src/gsi'
gcc -L/home/user/.local/openssl1.0/lib
 -I/home/user/.local/openssl1.0/include/openssl    -Wno-unused
-Wno-write-strings -Wdisabled-optimization -fwrapv -fno-strict-aliasing
-fno-trapping-math -fno-math-errno -fschedule-insns2 -fomit-frame-pointer
-fPIC -fno-common -mpc64   -rdynamic  -I"../include"  -o "gsi"    _gsi.o
_gsi_.o "../lib/libgambit.a" -lutil -ldl -lm  -L/usr/local/opt/openssl/lib
-lssl -lcrypto libgambitgsi.a
../lib/libgambit.a(os_io.o): In function
`___device_tcp_client_close_raw_virt':
os_io.c:(.text+0x45e): undefined reference to `SSL_is_init_finished'
../lib/libgambit.a(os_io.o): In function `___os_make_tls_context':
os_io.c:(.text+0x22d1): undefined reference to `OPENSSL_init_ssl'
os_io.c:(.text+0x22de): undefined reference to `OpenSSL_version_num'
os_io.c:(.text+0x2449): undefined reference to `TLS_server_method'
os_io.c:(.text+0x2499): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x24d0): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x24e9): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x2502): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x258d): undefined reference to `DH_set0_pqg'
os_io.c:(.text+0x25ab): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x25b6): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x25fd): undefined reference to `TLS_client_method'
os_io.c:(.text+0x264d): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x2684): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x269d): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x26b6): undefined reference to `SSL_CTX_set_options'
os_io.c:(.text+0x27d6): undefined reference to `SSL_CTX_set_options'
../lib/libgambit.a(os_io.o):os_io.c:(.text+0x27eb): more undefined
references to `SSL_CTX_set_options' follow
collect2: error: ld returned 1 exit status
makefile:182: recipe for target 'gsi' failed
make[1]: *** [gsi] Error 1
make[1]: Leaving directory '/home/user/tmp/gambit-test/gambit-src/gsi'
makefile:467: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1


I'm sure there's something simple I'm missing here.

Thanks for any recommendations,
Bob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.iro.umontreal.ca/pipermail/gambit-list/attachments/20180906/1f509bd1/attachment.htm>


More information about the Gambit-list mailing list