Menu

#27 Linux emailrelay ./configure does not find openssl

v1.0 (example)
closed
None
3
2018-06-20
2018-06-08
Mark Kovach
No

I am trying to compile version 1.9 or 2.0 for Ubuntu 16.04 however it will not find openssl. Is there someway to tell configure to look at a specific place?

./configure --prefix=/usr/local/emailrelay --with-openssl
checking for openssl... no
configure: WARNING: ignoring --with-openssl: check config.log and try setting CFLAGS

config.log

| / end confdefs.h. /
| #include <openssl ssl.h="">
| int
| main ()
| {
| SSL_CTX * p = 0 ; return 1;
| ;
| return 0;
| }
configure:6559: result: no
configure:6568: WARNING: ignoring --with-openssl: check config.log and try setting CFLAGS

openssl version
OpenSSL 1.0.2g 1 Mar 2016

ldd /usr/bin/openssl
linux-vdso.so.1 => (0x00007ffe9bf3f000)
libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f99630e4000)
libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f9962ca0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f99628d6000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f99626d2000)
/lib64/ld-linux-x86-64.so.2 (0x00007f996334d000)

Thanks

Discussion

  • Graeme Walker

    Graeme Walker - 2018-06-08

    It's configurable through the CFLAGS, CXXFLAGS and LDFLAGS variables. You would normally do ./configure CFLAGS=-I/foo/bar CXXFLAGS=-I/foo/bar LDFLAGS=-L/foo/bar. The compiler will see "-I/foo/bar" on its command-line, and the #include line in the source code does #include <openssl ssl.h="">, so it will look for the file /foo/bar/openssl/ssl.h (in addition to the standard places). The linker will get "-L/foo/bar" and "-lssl" on its command-line and look for libraries like /foo/bar/libssl.a etc.

    However, your snippet from config.log looks very strange. The configure script itself has #include <openssl ssl.h="">, but you have #include <openssl ssl.h=""> in your config.log. Why is that? Can you build other packages from source? Maybe try building 'tar' (cd /tmp; apt-get source tar; cd tar* ; ./configure; make)?

     
  • Mark Kovach

    Mark Kovach - 2018-06-09

    I couldn't find ssl.h so that got me thinking that I was missing these include files. Turns out I needed the development toolkit. Everything worked fine after installing the package below.

    apt-get install libssl-dev

     
  • Graeme Walker

    Graeme Walker - 2018-06-20
    • status: open --> closed
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.