Closed abrca closed 7 years ago
Hello,
Thanks for the bug report. The following commit should fix it: https://github.com/kakwa/uts-server/commit/dbe37d9b186053530390f3915da08603ac32d28f
Out of curiosity did you had issues with the OpenSSL CMake module?
On a FreeBSD 10.1 it had trouble finding the version, I had to pass -D_OPENSSL_VERSION=1.0.0
manually.
Hello,
FreeBSD sed -i requires an backup extension parameter, so it may be empty - "" - no backup, or *.bak - for creating backup copy (https://www.freebsd.org/cgi/man.cgi?query=sed)
about OpenSSL - VM with FreeBSD is at home, I'll check in the evening.
Sorry, read too fast...
I've fixed the backup extension
Also, while doing some testing, I had to adapt a little for FreeBSD:
sys/syslimits.h
instead of linux/limits.h
about OpenSSL CMake module:
on 11.0 it works fine. It find openssl from base system: -- Found OpenSSL: /usr/lib/libssl.so;/usr/lib/libcrypto.so (found version "1.0.2j") -- OpenSSL include dir: /usr/include -- OpenSSL libraries: /usr/lib/libssl.so;/usr/lib/libcrypto.so -- OpenSSL version: 1.0.2j and -devel from ports: -- Found OpenSSL: /usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so (found version "1.1.0d") -- OpenSSL include dir: /usr/local/include -- OpenSSL libraries: /usr/local/lib/libssl.so;/usr/local/lib/libcrypto.so -- OpenSSL version: 1.1.0d
but compiling with -devel branch of openssl (1.1.0d) gives error:
/root/uts-server-master/civetweb-prefix/src/civetweb/src/civetweb.c:12329:19: error: use of undeclared identifier 'OPENSSL_INIT_LOAD_SSL_STRINGS' OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
/root/uts-server-master/civetweb-prefix/src/civetweb/src/civetweb.c:12330:8: error: use of undeclared identifier 'OPENSSL_INIT_LOAD_CRYPTO_STRINGS' | OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
24 warnings and 2 errors generated. *** Error code 1
building with openssl 1.0.2j - ok.
There was an issue in the cmakelist.txt of civetweb due to a missing include_directories, resulting in the mixing up of basesystem header, openssl-devel package .so file, and version matching.
I've opened a PR for it: https://github.com/civetweb/civetweb/pull/405
Try to build on FreeBSD 11, "cmake <...> && make" gives an error: [ 15%] Performing patch step for 'civetweb' Execute: 'cd /root/uts-server-master/civetweb-prefix/src/civetweb && sed -i s/DATE/\"110973\"/ src/main.c src/civetweb.c'
In FreeBSD sed, -i requires an backup extension (or ""). After adding -i "" in CMakeFiles/civetweb.dir/build.make, sed works ok.