LibreSSL Portable itself. This includes the build scaffold and compatibility layer that builds portable LibreSSL from the OpenBSD source code. Pull requests or patches sent to tech@openbsd.org are welcome.
root@b86ced94e4ab:/libressl/portable# ./configure
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... none needed
checking whether cc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of cc... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for file... file
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking size of time_t... 8
checking if cc supports "-fno-strict-overflow"... yes
checking whether C compiler accepts -Werror... yes
checking whether to add -D_FORTIFY_SOURCE=2 to CPPFLAGS... yes
checking if /usr/bin/ld -m elf_x86_64 supports "-Wl,-z,relro"... yes
checking if /usr/bin/ld -m elf_x86_64 supports "-Wl,-z,now"... yes
checking if cc supports "-fstack-protector-strong"... yes
checking if cc supports "-fcf-protection=full"... yes
checking whether AS supports .note.GNU-stack... yes
checking dependency style of cc... gcc3
checking if compiling with clang... no
checking whether CC supports -Wno-pointer-sign... yes
checking for symlink... yes
checking for funopen... no
checking for endian.h... yes
checking for machine/endian.h... no
checking for err.h... yes
checking for readpassphrase.h... no
checking for netinet/ip.h... yes
checking for sys/types.h... (cached) yes
checking for netinet/in.h... yes
checking for arpa/nameser.h... yes
checking for netdb.h... yes
checking for resolv.h... yes
checking for asprintf... yes
checking for freezero... no
checking for memmem... yes
checking for readpassphrase... no
checking for reallocarray... yes
checking for recallocarray... no
checking for strcasecmp... yes
checking for strlcat... no
checking for strlcpy... no
checking for strndup... yes
checking for strnlen... yes
checking for strsep... yes
checking for strtonum... no
checking for timegm... yes
checking for _mkgmtime... no
checking for timespecsub... no
checking for getopt... yes
checking for getprogname... no
checking for syslog... yes
checking for syslog_r... no
checking for getpagesize... yes
checking for accept4... yes
checking for pipe2... yes
checking for pledge... no
checking for poll... yes
checking for socketpair... yes
checking for arc4random... yes
checking for arc4random_buf... yes
checking for arc4random_uniform... yes
checking for explicit_bzero... yes
checking for getauxval... yes
checking for getentropy... yes
checking for timingsafe_bcmp... no
checking for timingsafe_memcmp... no
checking for getauxval... (cached) yes
checking for library containing dl_iterate_phdr... none required
checking for dl_iterate_phdr... yes
checking for library containing pthread_once... none required
checking for library containing pthread_mutex_lock... none required
checking for library containing clock_gettime... none required
checking for clock_gettime... yes
checking whether va_copy exists... yes
checking whether __va_copy exists... yes
checking for library containing b64_ntop... no
checking for library containing __b64_ntop... -lresolv
checking for b64_ntop... yes
checking if .gnu.warning accepts long strings... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating include/Makefile
config.status: creating include/openssl/Makefile
config.status: creating crypto/Makefile
config.status: creating ssl/Makefile
config.status: creating tls/Makefile
config.status: creating tests/Makefile
config.status: creating apps/Makefile
config.status: creating apps/ocspcheck/Makefile
config.status: creating apps/openssl/Makefile
config.status: creating apps/nc/Makefile
config.status: creating man/Makefile
config.status: creating libcrypto.pc
config.status: creating libssl.pc
config.status: creating libtls.pc
config.status: creating openssl.pc
config.status: executing depfiles commands
config.status: executing libtool commands
And finally, when I ran make check, I had the error
root@b86ced94e4ab:/libressl/portable# make check
Making check in include
make[1]: Entering directory '/libressl/portable/include'
Making check in openssl
make[2]: Entering directory '/libressl/portable/include/openssl'
echo "generating opensslconf.h ..."
generating opensslconf.h ...
cp ../../include/arch/amd64/opensslconf.h opensslconf.h
make check-am
make[3]: Entering directory '/libressl/portable/include/openssl'
make[3]: Nothing to be done for 'check-am'.
make[3]: Leaving directory '/libressl/portable/include/openssl'
make[2]: Leaving directory '/libressl/portable/include/openssl'
make[2]: Entering directory '/libressl/portable/include'
make[2]: Nothing to be done for 'check-am'.
make[2]: Leaving directory '/libressl/portable/include'
make[1]: Leaving directory '/libressl/portable/include'
Making check in crypto
make[1]: Entering directory '/libressl/portable/crypto'
echo "generating crypto_portable.sym ..."
generating crypto_portable.sym ...
cp ../crypto/crypto.sym crypto_portable.sym
chmod u+w crypto_portable.sym
make check-am
make[2]: Entering directory '/libressl/portable/crypto'
CPPAS aes/libcrypto_la-aes-elf-x86_64.lo
CPPAS aes/libcrypto_la-bsaes-elf-x86_64.lo
CPPAS aes/libcrypto_la-vpaes-elf-x86_64.lo
CPPAS aes/libcrypto_la-aesni-elf-x86_64.lo
CPPAS aes/libcrypto_la-aesni-sha1-elf-x86_64.lo
CPPAS bn/libcrypto_la-modexp512-elf-x86_64.lo
CPPAS bn/libcrypto_la-mont-elf-x86_64.lo
CPPAS bn/libcrypto_la-mont5-elf-x86_64.lo
CPPAS camellia/libcrypto_la-cmll-elf-x86_64.lo
CPPAS md5/libcrypto_la-md5-elf-x86_64.lo
CPPAS modes/libcrypto_la-ghash-elf-x86_64.lo
CPPAS rc4/libcrypto_la-rc4-elf-x86_64.lo
CPPAS rc4/libcrypto_la-rc4-md5-elf-x86_64.lo
CPPAS sha/libcrypto_la-sha1-elf-x86_64.lo
CPPAS sha/libcrypto_la-sha256-elf-x86_64.lo
CPPAS sha/libcrypto_la-sha512-elf-x86_64.lo
CPPAS whrlpool/libcrypto_la-wp-elf-x86_64.lo
CPPAS libcrypto_la-cpuid-elf-x86_64.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_add.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_cmadd.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_cmul.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_mul.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_mul_4_8_alt.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_mul_8_16_alt.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_sqr.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_sqr_4_8_alt.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_sqr_8_16_alt.lo
CPPAS bn/arch/amd64/libcrypto_la-bignum_sub.lo
CPPAS bn/arch/amd64/libcrypto_la-word_clz.lo
CC bn/arch/amd64/libcrypto_la-bn_arch.lo
CC libcrypto_la-cpt_err.lo
CC libcrypto_la-cryptlib.lo
CC libcrypto_la-crypto_init.lo
CC libcrypto_la-crypto_lock.lo
CC libcrypto_la-cversion.lo
CC libcrypto_la-ex_data.lo
CC libcrypto_la-malloc-wrapper.lo
CC libcrypto_la-mem_clr.lo
CC libcrypto_la-mem_dbg.lo
CC libcrypto_la-o_fips.lo
CC libcrypto_la-o_init.lo
CC libcrypto_la-o_str.lo
CC aes/libcrypto_la-aes_cfb.lo
CC aes/libcrypto_la-aes_ctr.lo
CC aes/libcrypto_la-aes_ecb.lo
CC aes/libcrypto_la-aes_ige.lo
CC aes/libcrypto_la-aes_ofb.lo
CC aes/libcrypto_la-aes_wrap.lo
CC asn1/libcrypto_la-a_bitstr.lo
CC asn1/libcrypto_la-a_enum.lo
CC asn1/libcrypto_la-a_int.lo
CC asn1/libcrypto_la-a_mbstr.lo
CC asn1/libcrypto_la-a_object.lo
CC asn1/libcrypto_la-a_octet.lo
CC asn1/libcrypto_la-a_pkey.lo
CC asn1/libcrypto_la-a_print.lo
CC asn1/libcrypto_la-a_pubkey.lo
CC asn1/libcrypto_la-a_strex.lo
CC asn1/libcrypto_la-a_string.lo
CC asn1/libcrypto_la-a_strnid.lo
CC asn1/libcrypto_la-a_time.lo
CC asn1/libcrypto_la-a_time_posix.lo
asn1/a_time_posix.c:31:10: fatal error: openssl/posix_time.h: No such file or directory
31 | #include <openssl/posix_time.h>
| ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:5535: asn1/libcrypto_la-a_time_posix.lo] Error 1
make[2]: Leaving directory '/libressl/portable/crypto'
make[1]: *** [Makefile:8873: check] Error 2
make[1]: Leaving directory '/libressl/portable/crypto'
make: *** [Makefile:462: check-recursive] Error 1
Hi! I had some problems building freessl. I followed the steps as README.md says.
Context: I used the latest Debian GCC container available on Docker Hub.
Here is the error:
I was able to continue the process by commenting the lines that contained the
include
.Then I was able to compile passing all the tests:
The full process is below.
First, I ran
autogen.sh
Then, I ran
configure
And finally, when I ran
make check
, I had the error