I am trying to install on VM , with 16GB ram , 8 core CPU, FreeBSD 12.1 and latest port snapshot for NOW. before installation , freebsd system updated. for Every dependency ports , default options are selected. after # make install clean, you will see the error below. /etc/make.conf CPUTYPE?=native CFLAGS=-O2 -pipe -fno-strict-aliasing COPTFLAGS=$CFLAGS MK_PROFILE=no DEFAULT_VERSIONS+=ssl=libressl python=3.8 python2=2.7 python3=3.8 php=7.4 pgsql=12 mysql=5.7 OPTIONS_SET+=ICONV OPTIONS_UNSET+=CUPS DEBUG DOCS FONTCONFIG NLS X11 MAN EXAMPLES MAN3 WITHOUT_MODULES=sound ntfs linux WITHOUT=X11 MAN MAN3 MANPAGES EXAMPLES DOCS ftp_curl_UNSET= TLS_SRP security_p5-GSSAPI_SET = GSSAPI_MIT OPTIONS_UNSET += GSSAPI_BASE OPTIONS_SET += GSSAPI_NONE config File /etc/src.conf WITHOUT_ATM=YES WITHOUT_BLUETOOTH=YES WITHOUT_DICT=YES WITHOUT_EXAMPLES=YES WITHOUT_GAMES=YES WITHOUT_IPFILTER=YES WITHOUT_HTML=YES WITHOUT_LPR=YES§ WITHOUT_NDIS=YES WITHOUT_MAN=YES WITHOUT_MANPAGES=YES WITHOUT_MAN_UTILS=YES WITHOUT_PROFILE=YES WITHOUT_WIRELESS=YES WITHOUT_WIRELESS_SUPPORT=YES WITHOUT_WPA_SUPPLICANT_EAPOL=YES after make install clean the error is below. -------------------- ERROR ------------------ /h2o/work/h2o-2.2.6/src/main.c --- CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o --- /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:635:13: error: static declaration of 'RSA_get0_key' follows non-static declaration static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) ^ /usr/local/include/openssl/rsa.h:399:6: note: previous declaration is here void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:650:12: error: static declaration of 'RSA_set0_key' follows non-static declaration static int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d) ^ /usr/local/include/openssl/rsa.h:401:5: note: previous declaration is here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:666:13: error: static declaration of 'RSA_set_flags' follows non-static declaration static void RSA_set_flags(RSA *r, int flags) ^ /usr/local/include/openssl/rsa.h:409:6: note: previous declaration is here void RSA_set_flags(RSA *r, int flags); ^ 3 errors generated. *** [CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o] Error code 1 make[4]: stopped in /usr/ports/www/h2o/work/.build 1 error make[4]: stopped in /usr/ports/www/h2o/work/.build *** [CMakeFiles/h2o.dir/all] Error code 2 make[3]: stopped in /usr/ports/www/h2o/work/.build 1 error make[3]: stopped in /usr/ports/www/h2o/work/.build *** [all] Error code 2 make[2]: stopped in /usr/ports/www/h2o/work/.build 1 error make[2]: stopped in /usr/ports/www/h2o/work/.build ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/h2o *** Error code 1 Stop. make: stopped in /usr/ports/www/h2o
Created attachment 210208 [details] svn-diff-h2o-libressl
@Walter Thank you for the patch. Has this been QA'd and confirmned to pass for all values of USES=ssl=<value> including openssl and *-devel ?
Sorry, forgot. It is not tested with openssl (cannot test with openssl in the moment).
I updated Makefile and created new file named on files/patch-deps_neverbleed-neverbleed.c and saved the patch like this but i got error below. for information, without this patch , i installed h2o with openssl without problem. but after this patch i dont know does it work or not. --- deps/neverbleed/neverbleed.c.orig 2019-12-24 22:26:48 UTC +++ deps/neverbleed/neverbleed.c @@ -630,7 +630,7 @@ static int sign_stub(struct expbuf_t *buf) return 0; } -#if !OPENSSL_1_1_API +#if !OPENSSL_1_1_API && !defined(LIBRESSL_VERSION_NUMBER) static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) { ######### ERROR with Patch ######### --- CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o --- /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:635:13: error: static declaration of 'RSA_get0_key' follows non-static declarati on static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) ^ /usr/local/include/openssl/rsa.h:399:6: note: previous declaration is here void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:650:12: error: static declaration of 'RSA_set0_key' follows non-static declarati on static int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d) ^ /usr/local/include/openssl/rsa.h:401:5: note: previous declaration is here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:666:13: error: static declaration of 'RSA_set_flags' follows non-static declarat ion static void RSA_set_flags(RSA *r, int flags) ^ /usr/local/include/openssl/rsa.h:409:6: note: previous declaration is here void RSA_set_flags(RSA *r, int flags); ^ 3 errors generated. *** [CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o] Error code 1 make[4]: stopped in /usr/ports/www/h2o/work/.build 1 error make[4]: stopped in /usr/ports/www/h2o/work/.build *** [CMakeFiles/h2o.dir/all] Error code 2 make[3]: stopped in /usr/ports/www/h2o/work/.build 1 error make[3]: stopped in /usr/ports/www/h2o/work/.build *** [all] Error code 2 make[2]: stopped in /usr/ports/www/h2o/work/.build 1 error make[2]: stopped in /usr/ports/www/h2o/work/.build ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/h2o *** Error code 1 Stop. make: stopped in /usr/ports/www/h2o
Created attachment 210225 [details] svn-diff-h2o-libressl_v2 Ok, please try this one, this should work.
New ERROR here --- CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o --- /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:635:13: error: st atic declaration of 'RSA_get0_key' follows non-static declaration static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, con st BIGNUM **d) ^ /usr/local/include/openssl/rsa.h:399:6: note: previous declaration is here void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:650:12: error: st atic declaration of 'RSA_set0_key' follows non-static declaration static int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d) ^ /usr/local/include/openssl/rsa.h:401:5: note: previous declaration is here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:666:13: error: st atic declaration of 'RSA_set_flags' follows non-static declaration static void RSA_set_flags(RSA *r, int flags) ^ /usr/local/include/openssl/rsa.h:409:6: note: previous declaration is here void RSA_set_flags(RSA *r, int flags); ^ --- CMakeFiles/h2o.dir/deps/picotls/lib/picotls.c.o --- --- CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o --- 3 errors generated. *** [CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o] Error code 1 make[4]: stopped in /usr/ports/www/h2o/work/.build --- CMakeFiles/h2o.dir/deps/picotls/lib/picotls.c.o --- [ 60%] Building C object CMakeFiles/h2o.dir/deps/picotls/lib/picotls.c.o /usr/bin/cc -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/mruby/include -I/usr/ports /www/h2o/work/h2o-2.2.6/deps/mruby-input-stream/src -I/usr/ports/www/h2o/work/h2 o-2.2.6/include -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/cloexec -I/usr/ports/ww w/h2o/work/h2o-2.2.6/deps/brotli/enc -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/go lomb/usr/ports/www/h2o/work/h2o-2.2.6/deps/libgkc -I/usr/ports/www/h2o/work/h2o- 2.2.6/deps/libyrmcds -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/klib -I/usr/ports/ www/h2o/work/h2o-2.2.6/deps/neverbleed -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/ picohttpparser -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotest -I/usr/ports/ww w/h2o/work/h2o-2.2.6/deps/yaml/include -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/ yoml -I/usr/local/include -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/deps/ cifra/src/ext -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/deps/cifra/src -I /usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/deps/micro-ecc -I/usr/ports/www/h 2o/work/h2o-2.2.6/deps/picotls/include -O2 -g -Wall -Wno-unused-value -Wno-unuse d-function -O2 -pipe -fno-strict-aliasing -march=native -fstack-protector-stron g -DH2O_ROOT="/usr/local" -DH2O_CONFIG_PATH="etc/h2o.conf" -pthread -O2 -pipe -f no-strict-aliasing -march=native -fstack-protector-strong -DH2O_USE_LIBUV=0 - DH2O_USE_BROTLI=1 -DH2O_USE_MRUBY=1 -DH2O_USE_PICOTLS=1 -o CMakeFiles/h2o.dir/de ps/picotls/lib/picotls.c.o -c /usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/l ib/picotls.c 1 error make[4]: stopped in /usr/ports/www/h2o/work/.build *** [CMakeFiles/h2o.dir/all] Error code 2 make[3]: stopped in /usr/ports/www/h2o/work/.build 1 error make[3]: stopped in /usr/ports/www/h2o/work/.build *** [all] Error code 2 make[2]: stopped in /usr/ports/www/h2o/work/.build 1 error make[2]: stopped in /usr/ports/www/h2o/work/.build ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/h2o *** Error code 1 Stop. make: stopped in /usr/ports/www/h2o
Created attachment 210249 [details] svn-diff-h2o-libressl_v3 Aah.. I was little puzzled .... it is the same error as with libressl. Only needs to remove "static".
Yes it seems same error before second patch. i dont get it. there is no change. do i need only to remove static?
Patch Version 3 ERROR ports/www/h2o/work/h2o-2.2.6/deps/picotls/lib/openssl.c --- CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o --- /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:635:13: error: static declaration of 'RSA_get0_key' follows non-static declaration static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) ^ /usr/local/include/openssl/rsa.h:399:6: note: previous declaration is here void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:650:12: error: static declaration of 'RSA_set0_key' follows non-static declaration static int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d) ^ /usr/local/include/openssl/rsa.h:401:5: note: previous declaration is here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:666:13: error: static declaration of 'RSA_set_flags' follows non-static declaration static void RSA_set_flags(RSA *r, int flags) ^ /usr/local/include/openssl/rsa.h:409:6: note: previous declaration is here void RSA_set_flags(RSA *r, int flags); ^ 3 errors generated. *** [CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o] Error code 1 make[4]: stopped in /usr/ports/www/h2o/work/.build 1 error make[4]: stopped in /usr/ports/www/h2o/work/.build *** [CMakeFiles/h2o.dir/all] Error code 2 make[3]: stopped in /usr/ports/www/h2o/work/.build 1 error make[3]: stopped in /usr/ports/www/h2o/work/.build *** [all] Error code 2 make[2]: stopped in /usr/ports/www/h2o/work/.build 1 error make[2]: stopped in /usr/ports/www/h2o/work/.build ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/h2o *** Error code 1 Stop. make: stopped in /usr/ports/www/h2o
Maybe, you did something wrong. I have patched out "static". And you have it still...
I think at least the second patch should work (also for openssl), maybe also the first. I rather think the third patch is wrong for openssl.
firstly, without any patch i was able to install with openssl and no problem. secondly, for patch, if there is no any problem about character conversation for editors. I applied patch manually like this, I updated Makefile myself with ee and created file on files/patch-deps_neverbleed-neverbleed.c and i copy your patch to this file. Which part i am doing worng or can you help me about doing better without mistake? thank you very much Mr. Walter.
I don't know whar may went wrong. I do it in following way: cd /usr/ports/www/h20 patch < svn-diff-h2o-libressl_v2 rm files patch-deps_neverbleed-neverbleed.c.orig (if exists - this a svn nonsense, a file with size 0) and run make install clean and have a different result like you (it works for libressl).
correct was a typo in it: rm files/patch-deps_neverbleed-neverbleed.c.orig
I have done this. I will Try first patch too and i will tell the result. root@h2olibre:/usr/ports/www/h2o # patch < svn-diff-h2o-libressl_v2 Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: Makefile |=================================================================== |--- Makefile (revision 520822) |+++ Makefile (working copy) -------------------------- Patching file Makefile using Plan A... Hunk #1 failed at 4. Hunk #2 failed at 23. 2 out of 2 hunks failed--saving rejects to Makefile.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: files/patch-deps_neverbleed-neverbleed.c |=================================================================== |--- files/patch-deps_neverbleed-neverbleed.c (nonexistent) |+++ files/patch-deps_neverbleed-neverbleed.c (working copy) -------------------------- (Creating file files/patch-deps_neverbleed-neverbleed.c...) Patching file files/patch-deps_neverbleed-neverbleed.c using Plan A... Empty context always matches. Hunk #1 succeeded at 1. Hmm... Ignoring the trailing garbage. done root@h2olibre:/usr/ports/www/h2o # make install clean ..... /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:635:13: error: static declaration of 'RSA_get0_key' follows non-static declaration static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) ^ /usr/local/include/openssl/rsa.h:399:6: note: previous declaration is here void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:650:12: error: static declaration of 'RSA_set0_key' follows non-static declaration static int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d) ^ /usr/local/include/openssl/rsa.h:401:5: note: previous declaration is here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:666:13: error: static declaration of 'RSA_set_flags' follows non-static declaration static void RSA_set_flags(RSA *r, int flags) ^ /usr/local/include/openssl/rsa.h:409:6: note: previous declaration is here void RSA_set_flags(RSA *r, int flags); ^ 3 errors generated. *** [CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o] Error code 1 make[4]: stopped in /usr/ports/www/h2o/work/.build 1 error make[4]: stopped in /usr/ports/www/h2o/work/.build *** [CMakeFiles/h2o.dir/all] Error code 2 make[3]: stopped in /usr/ports/www/h2o/work/.build 1 error make[3]: stopped in /usr/ports/www/h2o/work/.build *** [all] Error code 2 make[2]: stopped in /usr/ports/www/h2o/work/.build 1 error make[2]: stopped in /usr/ports/www/h2o/work/.build ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/h2o *** Error code 1 Stop. make: stopped in /usr/ports/www/h2o
Trying First Patch,, root@h2olibre:/usr/ports/www/h2o/files # ls h2o.conf.sample.in patch-deps_neverbleed-neverbleed.c h2o.in patch-deps_neverbleed-neverbleed.c.orig root@h2olibre:/usr/ports/www/h2o/files # rm patch-deps_neverbleed-neverbleed.c root@h2olibre:/usr/ports/www/h2o/files # rm patch-deps_neverbleed-neverbleed.c.orig root@h2olibre:/usr/ports/www/h2o/files # cd .. root@h2olibre:/usr/ports/www/h2o # ls distinfo Makefile.orig pkg-plist files Makefile.rej svn-diff-h2o-libressl_v2 Makefile pkg-descr work root@h2olibre:/usr/ports/www/h2o # ls distinfo Makefile.rej svn-diff-h2o-libressl_v2 files pkg-descr work Makefile pkg-plist Makefile.orig svn-diff-h2o-libressl root@h2olibre:/usr/ports/www/h2o # patch < svn-diff-h2o-libressl Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: Makefile |=================================================================== |--- Makefile (revision 520822) |+++ Makefile (working copy) -------------------------- Patching file Makefile using Plan A... Hunk #1 failed at 4. 1 out of 1 hunks failed--saving rejects to Makefile.rej Hmm... The next patch looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: files/patch-deps_neverbleed-neverbleed.c |=================================================================== |--- files/patch-deps_neverbleed-neverbleed.c (nonexistent) |+++ files/patch-deps_neverbleed-neverbleed.c (working copy) -------------------------- (Creating file files/patch-deps_neverbleed-neverbleed.c...) Patching file files/patch-deps_neverbleed-neverbleed.c using Plan A... Empty context always matches. Hunk #1 succeeded at 1. Hmm... Ignoring the trailing garbage. done root@h2olibre:/usr/ports/www/h2o # make install clean ===> Building for h2o-2.2.6 /usr/local/bin/cmake -S/usr/ports/www/h2o/work/h2o-2.2.6 -B/usr/ports/www/h2o/work/.build --check-build-system CMakeFiles/Makefile.cmake 0 /usr/local/bin/cmake -E cmake_progress_start /usr/ports/www/h2o/work/.build/CMakeFiles /usr/ports/www/h2o/work/.build/CMakeFiles/progress.marks /usr/bin/make -f CMakeFiles/Makefile2 all --- CMakeFiles/mruby.dir/all --- --- CMakeFiles/libh2o.dir/all --- --- CMakeFiles/libh2o-evloop.dir/all --- --- CMakeFiles/mruby.dir/all --- /usr/bin/make -f CMakeFiles/mruby.dir/build.make CMakeFiles/mruby.dir/depend --- CMakeFiles/libh2o.dir/all --- /usr/bin/make -f CMakeFiles/libh2o.dir/build.make CMakeFiles/libh2o.dir/depend --- CMakeFiles/libh2o-evloop.dir/all --- /usr/bin/make -f CMakeFiles/libh2o-evloop.dir/build.make CMakeFiles/libh2o-evloop.dir/depend --- CMakeFiles/mruby.dir/all --- --- CMakeFiles/mruby.dir/depend --- cd /usr/ports/www/h2o/work/.build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build/CMakeFiles/mruby.dir/DependInfo.cmake --color= /usr/bin/make -f CMakeFiles/mruby.dir/build.make CMakeFiles/mruby.dir/build --- CMakeFiles/libh2o.dir/all --- --- CMakeFiles/libh2o.dir/depend --- --- CMakeFiles/mruby.dir/all --- --- CMakeFiles/mruby --- --- CMakeFiles/libh2o-evloop.dir/all --- --- CMakeFiles/libh2o-evloop.dir/depend --- --- CMakeFiles/libh2o.dir/all --- cd /usr/ports/www/h2o/work/.build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build/CMakeFiles/libh2o.dir/DependInfo.cmake --color= --- CMakeFiles/mruby.dir/all --- cd /usr/ports/www/h2o/work/h2o-2.2.6/deps/mruby && MRUBY_TOOLCHAIN=clang MRUBY_CONFIG=/usr/ports/www/h2o/work/h2o-2.2.6/misc/mruby_config.rb MRUBY_BUILD_DIR=/usr/ports/www/h2o/work/.build/mruby ruby minirake --- CMakeFiles/libh2o-evloop.dir/all --- cd /usr/ports/www/h2o/work/.build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build/CMakeFiles/libh2o-evloop.dir/DependInfo.cmake --color= --- CMakeFiles/libh2o.dir/all --- /usr/bin/make -f CMakeFiles/libh2o.dir/build.make CMakeFiles/libh2o.dir/build --- CMakeFiles/libh2o-evloop.dir/all --- /usr/bin/make -f CMakeFiles/libh2o-evloop.dir/build.make CMakeFiles/libh2o-evloop.dir/build --- CMakeFiles/libh2o.dir/all --- [ 55%] Built target libh2o --- CMakeFiles/libh2o-evloop.dir/all --- [ 55%] Built target libh2o-evloop --- CMakeFiles/mruby.dir/all --- (in /usr/ports/www/h2o/work/h2o-2.2.6/deps/mruby) PKG-CONFIG onigmo PKG-CONFIG oniguruma Build summary: ================================================ Config Name: host Output Directory: ../../../.build/mruby/host Binaries: mruby-config, mrbc Included Gems: mruby-pack mruby-input-stream - 1.0.0 - InputStream class for Rack mruby-time - standard Time class mruby-file-stat mruby-io mruby-errno mruby-array-ext - Array class extension mruby-dir mruby-compiler - mruby compiler library mruby-eval - standard Kernel#eval method mruby-require mruby-env mruby-onig-regexp mruby-sprintf - standard Kernel#sprintf method mruby-iijson mruby-digest mruby-print - standard print/puts/p mruby-bin-strip - irep dump debug section remover command - Binaries: mruby-strip mruby-object-ext - Object class extension mruby-fiber - Fiber class mruby-error - extensional error handling mruby-range-ext - Range class extension mruby-proc-ext - Proc class extension mruby-exit - Kernel#exit method mruby-inline-struct - inline structure mruby-enum-ext - Enumerable module extension mruby-hash-ext - Hash class extension mruby-enumerator - Enumerator class mruby-string-ext - String class extension mruby-toplevel-ext - toplevel object (main) methods extension mruby-math - standard Math module mruby-struct - standard Struct class mruby-class-ext - class/module extension mruby-bin-mirb - mirb command - Binaries: mirb mruby-enum-lazy - Enumerator::Lazy class mruby-objectspace - ObjectSpace class mruby-kernel-ext - Kernel module extension mruby-symbol-ext - Symbol class extension mruby-bin-mrbc - mruby compiler executable mruby-random - Random class mruby-bin-mruby - mruby command - Binaries: mruby mruby-numeric-ext - Numeric class extension ================================================ [ 55%] Built target mruby --- CMakeFiles/h2o.dir/all --- /usr/bin/make -f CMakeFiles/h2o.dir/build.make CMakeFiles/h2o.dir/depend --- CMakeFiles/h2o.dir/depend --- cd /usr/ports/www/h2o/work/.build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/h2o-2.2.6 /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build /usr/ports/www/h2o/work/.build/CMakeFiles/h2o.dir/DependInfo.cmake --color= /usr/bin/make -f CMakeFiles/h2o.dir/build.make CMakeFiles/h2o.dir/build --- CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o --- [ 55%] Building C object CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o /usr/bin/cc -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/mruby/include -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/mruby-input-stream/src -I/usr/ports/www/h2o/work/h2o-2.2.6/include -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/cloexec -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/brotli/enc -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/golomb/usr/ports/www/h2o/work/h2o-2.2.6/deps/libgkc -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/libyrmcds -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/klib -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picohttpparser -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotest -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/yaml/include -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/yoml -I/usr/local/include -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/deps/cifra/src/ext -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/deps/cifra/src -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/deps/micro-ecc -I/usr/ports/www/h2o/work/h2o-2.2.6/deps/picotls/include -O2 -g -Wall -Wno-unused-value -Wno-unused-function -O2 -pipe -fno-strict-aliasing -march=native -fstack-protector-strong -DH2O_ROOT="/usr/local" -DH2O_CONFIG_PATH="etc/h2o.conf" -pthread -O2 -pipe -fno-strict-aliasing -march=native -fstack-protector-strong -DH2O_USE_LIBUV=0 -DH2O_USE_BROTLI=1 -DH2O_USE_MRUBY=1 -DH2O_USE_PICOTLS=1 -o CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o -c /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:635:13: error: static declaration of 'RSA_get0_key' follows non-static declaration static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) ^ /usr/local/include/openssl/rsa.h:399:6: note: previous declaration is here void RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:650:12: error: static declaration of 'RSA_set0_key' follows non-static declaration static int RSA_set0_key(RSA *rsa, BIGNUM *n, BIGNUM *e, BIGNUM *d) ^ /usr/local/include/openssl/rsa.h:401:5: note: previous declaration is here int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); ^ /usr/ports/www/h2o/work/h2o-2.2.6/deps/neverbleed/neverbleed.c:666:13: error: static declaration of 'RSA_set_flags' follows non-static declaration static void RSA_set_flags(RSA *r, int flags) ^ /usr/local/include/openssl/rsa.h:409:6: note: previous declaration is here void RSA_set_flags(RSA *r, int flags); ^ 3 errors generated. *** [CMakeFiles/h2o.dir/deps/neverbleed/neverbleed.c.o] Error code 1 make[4]: stopped in /usr/ports/www/h2o/work/.build 1 error make[4]: stopped in /usr/ports/www/h2o/work/.build *** [CMakeFiles/h2o.dir/all] Error code 2 make[3]: stopped in /usr/ports/www/h2o/work/.build 1 error make[3]: stopped in /usr/ports/www/h2o/work/.build *** [all] Error code 2 make[2]: stopped in /usr/ports/www/h2o/work/.build 1 error make[2]: stopped in /usr/ports/www/h2o/work/.build ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make[1]: stopped in /usr/ports/www/h2o *** Error code 1 Stop. make: stopped in /usr/ports/www/h2o
any changes?
h2o-devel has in neverbleed.c: 633 #if !OPENSSL_1_1_API && (!defined(LIBRESSL_VERSION_NUMBER) || LIBRESSL_VERSION_NUMBER < 0x2070000fL) 634 635 static void RSA_get0_key(const RSA *rsa, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) 636 { 637 if (n) { 638 *n = rsa->n; 639 } it is nearly the same as my first patch.
By the way the REINPLACE_CMD in the Makefile in h2o and h2o-devel does nothing and can be removed. => post-patch: @${REINPLACE_CMD} -e 's|exec perl|exec ${LOCALBASE}/bin/perl|' \ ......
thanks Walter for the patch v2! I assume the 2019-12-24 version is obsolete too now. under poudriere, 12.1-RELEASE - h2o compiles fine with ssl= (default) - h2o fails with ssl=libressl for me http://pkg.skunkwerks.at/poudriere/data/12_1_x64-default/2020-01-10_22h31m31s/logs/errors/h2o-2.2.6_1.log has more details. Any suggestions on what's missing? I'll remove the REINPLACE_CMD once we have this patch sorted out, we now have an rc.d var to handle this instead.
Try the h2o-devel version, I works without patch for libressl on 12.0 (in the moment only tested with the port).
(In reply to Dave Cottlehuber from comment #20) h2o-devel builds fine with libressl with poudriere. And I am little bit puzzled: h2o with patch_v2 builds also fine with libressl with poudriere.
Sorry, I had a new poudriere jail and it ignored my make.conf. You are right, h2o and h2o-devel failed with same errors.
I think I found it. We need patch_v2 and in the Makefile 64 + .include <bsd.port.pre.mk> 65 + .if ${SSL_DEFAULT:Mlibressl*} 66 + USES+= localbase 67 + .endif .... 89 - .include <bsd.port.mk> 89 + .include <bsd.port.post.mk>
h2o-devel don't needs the patch, only needs the change in the Makefile.
Created attachment 210656 [details] svn-diff-h2o-libressl_v4
I think we have a candidate patch here: https://reviews.freebsd.org/D24455
A commit references this bug: Author: csjp Date: Sat May 9 01:52:03 UTC 2020 New revision: 534701 URL: https://svnweb.freebsd.org/changeset/ports/534701 Log: Fix h2o build when building with libressl PR: 242863 Reported by: Ulas SAYGIN Reviewed by: dch Approved by: dch Differential Revision: https://reviews.freebsd.org/D24455 Changes: head/www/h2o/files/patch-deps_neverbleed_neverbleed.c
Fixed in https://svnweb.freebsd.org/ports?view=revision&revision=534701