OpenSSL header does not match current version at compile time

When trying to compile freeRADIUS server 2.2.3, I got the following error message:

checking for OpenSSL version >= 0.9.7... yes
checking OpenSSL library and header version consistency... library: 90819f header: 90812f... no
configure: error: in `/Users/tyrexionibus/Downloads/freeradius-server-2.2.3':
configure: error: OpenSSL library version does not match header version

Actually openSSL version:

tyrexionibus$ openssl version
OpenSSL 1.0.1f 6 Jan 2014

And the header located in /usr/include/openssl/opensslv.h contains:

#define OPENSSL_VERSION_NUMBER 0x0090819fL

Editing does not solve the problem.

How to solve this?

+5
source share
6 answers

The problem is that often the compiler and linker search paths are incompatible.

By default (unless changed with -isystem or -I) the GCC search path:

  • / Usr / local / enable
  • LIBDIR / GCC / target / version / include
  • / Usr / target / enable
  • / Usr / include

By default (unless changed with -L) Apple linker search path:

  • / Usr / lib
  • / Usr / local / library

( , 2.23.52.20130913 Ubuntu 13.04) ( -L) GNU:

  • /USR//:
  • /Lib/x86_64-Linux-:
  • /USR/Lib/x86_64-Linux-:
  • /USR/Lib/x86_64-Linux-/Mesa:
  • /:
  • /USR/:

, . , ABI, undefined . .

, --with-openssl-includes = -with-openssl-libraries = script. .

./configure --with-openssl-includes=/usr/include --with-openssl-libraries=/usr/lib

, OpenSSL, , .

LD_LIBRARY_PATH , , (, ) .

+2

OSX 10.10 (Yosemite) openssl brew.

$ brew update
$ brew install openssl
$ brew link --force openssl

.

$ openssl version
OpenSSL 1.0.2 22 Jan 2015

, .

$ otool -L /usr/local/bin/openssl
/usr/local/bin/openssl:
    /usr/local/Cellar/openssl/1.0.2/lib/libssl.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/local/Cellar/openssl/1.0.2/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)

script OpenSSL.

$ ./configure --with-ssl-dir=/usr/local/Cellar/openssl/1.0.2
+2

, config.log, configure ( ): , 2 3 OpenSSL: 0.9.8r, 0.9.8y 1.0.1f.

:

1) OPENSSL_VERSION_NUMBER= 0x0090819f /usr/include/openssl/opensslv.h , 0.9.8y /usr;

2) openssl version , 1.0.1f - PATH, 1.0.1f OPENSSL_VERSION_NUMBER 0x1000106fL, 0x0090819f, 1) .

tyrexionibus$ openssl version
OpenSSL 1.0.1f 6 Jan 2014

3) 90812f configure 0.9.8r.

OpenSSL, hex (from opensslv.h) , .

+1

/etc/ld.so.conf

/usr/local/ssl/lib

ldconfig.

libssl lybcrypto .

BEFORE:
=======
[root]/usr/local/ssl/lib> ldd ./libssl.so
    linux-vdso.so.1 (0x00007ffe4c93f000)
    libcrypto.so.1.0.0 => /lib64/libcrypto.so.1.0.0 (0x00007febbdcd3000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007febbdacf000)
    libc.so.6 => /lib64/libc.so.6 (0x00007febbd702000)
     /lib64/ld-linux-x86-64.so.2 (0x0000558484e69000)

AFTER:
======
[root]/usr/local/ssl/lib> ldd ./libssl.so
    linux-vdso.so.1 (0x00007ffcec2aa000)
    libcrypto.so.1.0.0 => /usr/local/ssl/lib/libcrypto.so.1.0.0    (0x00007fa347db5000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007fa347bb0000)
    libc.so.6 => /lib64/libc.so.6 (0x00007fa3477e4000)
    /lib64/ld-linux-x86-64.so.2 (0x00005567459c7000)

, : =)

0

./configure --with-openssl-lib-dir=/usr/local/openssl/lib/ --with-openssl-include-dir=/usr/local/openssl/include/
0

...

sudo apt-get install libssl-dev
0

All Articles