<div dir="ltr"><div>Friends -<br></div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>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:</div><div><br></div><div>    ./configure</div><div>    make -j8 realclean</div><div>    ./configure</div><div>    make -j8 from-scratch</div><div>    make -j8 bootstrap</div><div>    make bootclean</div><div><br></div><div>    export CFLAGS=" -I/home/user/.local/openssl1.0/include/openssl "</div><div>    export LDFLAGS="  -L/home/user/.local/openssl1.0/lib "</div><div>    export LIBRARY_PATH="/home/user/.local/openssl1.0/lib"</div><div>    export LD_LIBRARY_PATH="/home/user/.local/openssl1.0/lib"</div><div><br></div><div>    ./configure --enable-single-host --enable-poll --enable-openssl --prefix=/home/user/tmp/gambit-test/build</div><div>    make -j8</div><div>    make check</div><div><br></div><div><br></div><div>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?</div><div><br></div><div>making all in gsi</div><div>make[1]: Entering directory '/home/user/tmp/gambit-test/gambit-src/gsi'</div><div>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</div><div>../lib/libgambit.a(os_io.o): In function `___device_tcp_client_close_raw_virt':</div><div>os_io.c:(.text+0x45e): undefined reference to `SSL_is_init_finished'</div><div>../lib/libgambit.a(os_io.o): In function `___os_make_tls_context':</div><div>os_io.c:(.text+0x22d1): undefined reference to `OPENSSL_init_ssl'</div><div>os_io.c:(.text+0x22de): undefined reference to `OpenSSL_version_num'</div><div>os_io.c:(.text+0x2449): undefined reference to `TLS_server_method'</div><div>os_io.c:(.text+0x2499): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x24d0): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x24e9): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x2502): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x258d): undefined reference to `DH_set0_pqg'</div><div>os_io.c:(.text+0x25ab): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x25b6): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x25fd): undefined reference to `TLS_client_method'</div><div>os_io.c:(.text+0x264d): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x2684): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x269d): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x26b6): undefined reference to `SSL_CTX_set_options'</div><div>os_io.c:(.text+0x27d6): undefined reference to `SSL_CTX_set_options'</div><div>../lib/libgambit.a(os_io.o):os_io.c:(.text+0x27eb): more undefined references to `SSL_CTX_set_options' follow</div><div>collect2: error: ld returned 1 exit status</div><div>makefile:182: recipe for target 'gsi' failed</div><div>make[1]: *** [gsi] Error 1</div><div>make[1]: Leaving directory '/home/user/tmp/gambit-test/gambit-src/gsi'</div><div>makefile:467: recipe for target 'all-recursive' failed</div><div>make: *** [all-recursive] Error 1</div><div><br></div><div><br></div><div>I'm sure there's something simple I'm missing here.</div><div><br></div><div>Thanks for any recommendations,</div><div>Bob</div><div><br></div></div>