Hello,
I would like to update the emailrelay running currently on my openindiana system (updated a few days ago) but when I try to "make " emailrelay-2.6, it fails saying that openssl is too old.
This is not surpising becalse the default openssl is still 1.0 on openindiana need it, bou openssl-3 is also present. Thus I tried the following:
ml@spitfire:/opt/emailrelay-2.6##make clean
ml@spitfire:/opt/emailrelay-2.6# ./configure.sh CXXFLAGS=-I/USR/OPENSSL/3/include LDFLAGS=-L/USR/OPENSSL/3/lib
ml@spitfire:/opt/emailrelay-2.6# make
wich ended with the following
make[3] : on quitte le répertoire « /opt/emailrelay-2.6/src/glib »
Making all in gssl
make[3] : on entre dans le répertoire « /opt/emailrelay-2.6/src/gssl »
c++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../src -I../../src/glib -DG_LIB_SMALL -I/USR/OPENSSL/3/include -MT gssl.o -MD -MP -MF .deps/gssl.Tpo -c -o gssl.o gssl.cpp
mv -f .deps/gssl.Tpo .deps/gssl.Po
**c++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../src -I../../src/glib -DG_LIB_SMALL -I/USR/OPENSSL/3/include -MT gssl_openssl.o -MD -MP -MF .deps/gssl_openssl.Tpo -c -o gssl_openssl.o gssl_openssl.cpp
**In file included from gssl_openssl.cpp:23:0:
gssl_openssl.h:42:2: error: #error "openssl is too old"**
#error "openssl is too old"
^~~~~
gssl_openssl.cpp: In static member function 'static std::__cxx11::string GSsl::OpenSSL::LibraryImp::sid()':
gssl_openssl.cpp:73:34:** **error: 'OPENSSL_VERSION' was not declared in this scope**
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
gssl_openssl.cpp:73:34: note: suggested alternative: 'OPENSSL_STRING'
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
OPENSSL_STRING
gssl_openssl.cpp:73:18: error: 'OpenSSL_version' was not declared in this scope
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
gssl_openssl.cpp:73:18: note: suggested alternative: 'SSL_version'
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
SSL_version
gssl_openssl.cpp: In member function 'virtual std::__cxx11::string GSsl::OpenSSL::ProtocolImp::protocol() const':
gssl_openssl.cpp:685:10: error: 'SSL_SESSION_get_protocol_version' was not declared in this scope
int v = SSL_SESSION_get_protocol_version( session ) ;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gssl_openssl.cpp:685:10: note: suggested alternative: 'SSL_SESSION_get_compress_id'
int v = SSL_SESSION_get_protocol_version( session ) ;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SSL_SESSION_get_compress_id
make[3]: *** [Makefile:578: gssl_openssl.o] Error 1
make[3] : on quitte le répertoire « /opt/emailrelay-2.6/src/gssl »
make[2]: *** [Makefile:375: all-recursive] Error 1
make[2] : on quitte le répertoire « /opt/emailrelay-2.6/src »
make[1]: *** [Makefile:320: all] Error 2
make[1] : on quitte le répertoire « /opt/emailrelay-2.6/src »
make: *** [Makefile:488: all-recursive] Error 1
ml@spitfire:/opt/emailrelay-2.6#
Thus maybe the compiler does not find the version of openssl and deduces it is too old.
What should I do to be able to compile this version of emailrelay with the appropriate version of openssl ??
Thanks
Marc
Diff:
Hi Graeme,
Thanks for your help.
Indeed the -I directory was not the good one.
./configure.sh CXXFLAGS=-I/usr/openssl/3/include/openssl
LDFLAGS=-L/usr/openssl/3/lib
and in /usr/openssl/3/include/openssl, there is a ssl.h and a sslerr.h
but no err.h
ml@spitfire:/opt/emailrelay-2.6# ls -lrt /usr/openssl/3/include/openssl/ssl
-r--r--r-- 1 root bin 136129 févr. 26 20:04
/usr/openssl/3/include/openssl/ssl.h
-r--r--r-- 1 root bin 658 févr. 26 20:04
/usr/openssl/3/include/openssl/ssl2.h
-r--r--r-- 1 root bin 15159 févr. 26 20:04
/usr/openssl/3/include/openssl/ssl3.h
-r--r--r-- 1 root bin 22573 févr. 26 20:04
/usr/openssl/3/include/openssl/sslerr.h
-r--r--r-- 1 root bin 26944 févr. 26 20:04
/usr/openssl/3/include/openssl/sslerr_legacy.h
ml@spitfire:/opt/emailrelay-2.6# ls -lrt /usr/openssl/3/include/openssl/err
-r--r--r-- 1 root bin 22398 févr. 26 20:04
/usr/openssl/3/include/openssl/err.h
ml@spitfire:/opt/emailrelay-2.6#
but if I do
make clean
./configure.sh CXXFLAGS=-I/usr/openssl/3/include/openssl
LDFLAGS=-L/usr/openssl/3/lib
make
I still get
...
c++ -std=c++17 -DHAVE_CONFIG_H -I. -I../../src -I../../src/glib
-DG_LIB_SMALL -I/usr/openssl/3/include/openssl -MT gssl_openssl.o -MD
-MP -MF .deps/gssl_openssl.Tpo -c -o gssl_openssl.o gssl_openssl.cpp
In file included from gssl_openssl.cpp:23:0:
gssl_openssl.h:42:2: error: #error "openssl is too old"
#error "openssl is too old"
^~~~~
gssl_openssl.cpp: In static member function 'static std::__cxx11::string
GSsl::OpenSSL::LibraryImp::sid()':
gssl_openssl.cpp:73:34: error: 'OPENSSL_VERSION' was not declared in
this scope
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
gssl_openssl.cpp:73:34: note: suggested alternative: 'OPENSSL_STRING'
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
OPENSSL_STRING
gssl_openssl.cpp:73:18: error: 'OpenSSL_version' was not declared in
this scope
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
gssl_openssl.cpp:73:18: note: suggested alternative: 'SSL_version'
std::string v = OpenSSL_version(OPENSSL_VERSION) ;
^~~~~~~~~~~~~~~
SSL_version
gssl_openssl.cpp: In member function 'virtual std::__cxx11::string
GSsl::OpenSSL::ProtocolImp::protocol() const':
gssl_openssl.cpp:685:10: error: 'SSL_SESSION_get_protocol_version' was
not declared in this scope
int v = SSL_SESSION_get_protocol_version( session ) ;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gssl_openssl.cpp:685:10: note: suggested alternative:
'SSL_SESSION_get_compress_id'
int v = SSL_SESSION_get_protocol_version( session ) ;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SSL_SESSION_get_compress_id
make[3]: *** [Makefile:578: gssl_openssl.o] Error 1
make[3] : on quitte le répertoire « /opt/emailrelay-2.6/src/gssl »
make[2]: *** [Makefile:375: all-recursive] Error 1
make[2] : on quitte le répertoire « /opt/emailrelay-2.6/src »
make[1]: *** [Makefile:320: all] Error 2
make[1] : on quitte le répertoire « /opt/emailrelay-2.6/src »
make: *** [Makefile:488: all-recursive] Error 1
ml@spitfire:/opt/emailrelay-2.6#
On 3/2/25 14:58, Graeme Walker wrote:
Related
Support Requests: #106
I think the compiler is still finding the version 1 of the openssl headers. Your "-I" directory must have a "openssl" sub-directory that contains the version 3 headers including "ssl.h" and "err.h".
Using upper-case for "/USR/OPENSSL" looks very odd. Shouldn't it be "/usr/openssl"?
If you are not sure where the headers are try a brute-force search:
$ find /usr -follow -type f -name ssl.h
$ find /USR -follow -type f -name ssl.h
$ find /opt -follow -type f -name ssl.h
or use some sort of index:
$ locate ssl.h
I think you just need to remove the trailing "/openssl", so
CXXFLAGS=-I/usr/openssl/3/include
(Your snippets do seem to show that you have "err.h", so I hope that will not be a problem.)
Thanks. It worked that way. I thus now have
in /etc/init.d
the emailrelay2.0 startup file
in /usr :
emailrelay1.8 files recently renamed theirname.2008
(before that init.d started emailrelay2.0 but commands were
still the old ones)
symbolic links to emailrelay2.0 files located in /usr/local
in/usr/local
emailrelay2.0 files
Now; my plan is to install emailrelay2.6, but I would like not to loose
2.0, that works fine.
If I just do "make install ", I assume all emailrelay2.0 files will be
overwritten. Thus I should change their names before
What will happen to the configuration files (fitting to emailrelay2.0)
will they be overwritten by default files (in that case, I must also
rename them) and are they still OK with 2.6 ?
Thanks again
Marc
On 3/2/25 17:29, Graeme Walker wrote:
Related
Support Requests: #106
A "make install" is likely to overwrite one or other of your earlier versions. In principle it should not overwrite the main configuration file and secrets file but you should not rely on that working as intended -- always make backups.
I suggest you do a "make install" to a temporary directory using DESTDIR:
To avoid accidents and unwanted side-effects do not do this as root. Then pick out any files you want and put them somewhere permanent (as root). You already have a working v2.0, so you probably only need the main emailrelay binary and it can go into /usr/sbin with a different name:
Then edit the /etc/init.d startup script to run the new binary:
The 2.0 configuration file and secrets file will be compatible with the 2.6 binary. Envelope files in the spool directory created by 2.0 will be usable by the 2.6 binary, but not the other way round. There is less compatibility with v1.8 because of breaking changes to the command-line options in going from 1.x to 2.0 (as described in the 2.0 NEWS file).