-
Notifications
You must be signed in to change notification settings - Fork 771
Build fails w/ libressl-2.2.1 #153
Copy link
Copy link
Closed
Description
On both OS X (Xcode/Clang) and Linux (GCC) the documented build instructions for building s2n against the latest version libressl (2.2.1) do not produce a working library. Specifically, although libressl builds and installs into the local root, s2n will not compile.
On OS X, the error message is:
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C utils
cc -pedantic -Wall -Werror -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wstack-protector -fPIC -std=c99 -D_POSIX_C_SOURCE=200112L -fstack-protector-all -O2 -I../libcrypto-root/include/ -I../api/ -I../ -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security -D_FORTIFY_SOURCE=2 -c -o s2n_blob.o s2n_blob.c
cc -pedantic -Wall -Werror -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wstack-protector -fPIC -std=c99 -D_POSIX_C_SOURCE=200112L -fstack-protector-all -O2 -I../libcrypto-root/include/ -I../api/ -I../ -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security -D_FORTIFY_SOURCE=2 -c -o s2n_mem.o s2n_mem.c
cc -pedantic -Wall -Werror -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wstack-protector -fPIC -std=c99 -D_POSIX_C_SOURCE=200112L -fstack-protector-all -O2 -I../libcrypto-root/include/ -I../api/ -I../ -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security -D_FORTIFY_SOURCE=2 -c -o s2n_random.o s2n_random.c
s2n_random.c:177:13: error: variable has incomplete type 'RAND_METHOD' (aka 'struct rand_meth_st')
RAND_METHOD s2n_openssl_rand_method = {
^
../libcrypto-root/include/openssl/ossl_typ.h:135:16: note: forward declaration of 'struct rand_meth_st'
typedef struct rand_meth_st RAND_METHOD;
^
1 error generated.
make[1]: *** [s2n_random.o] Error 1
make: *** [libs] Error 2
On Linux, the error message is:
make -C utils
make[1]: Entering directory `/home/alex/Build/s2n_linuxbuild/utils'
cc -pedantic -Wall -Werror -Wimplicit -Wunused -Wcomment -Wchar-subscripts -Wuninitialized -Wshadow -Wcast-qual -Wcast-align -Wwrite-strings -Wstack-protector -fPIC -std=c99 -D_POSIX_C_SOURCE=200112L -fstack-protector-all -O2 -I../libcrypto-root/include/ -I../api/ -I../ -Wno-deprecated-declarations -Wno-unknown-pragmas -Wformat-security -D_FORTIFY_SOURCE=2 -c -o s2n_random.o s2n_random.c
s2n_random.c:177:1: error: variable ‘s2n_openssl_rand_method’ has initializer but incomplete type
RAND_METHOD s2n_openssl_rand_method = {
^
s2n_random.c:178:5: error: unknown field ‘seed’ specified in initializer
.seed = NULL,
^
s2n_random.c:178:5: error: excess elements in struct initializer [-Werror]
s2n_random.c:178:5: error: (near initialization for ‘s2n_openssl_rand_method’) [-Werror]
s2n_random.c:179:5: error: unknown field ‘bytes’ specified in initializer
.bytes = s2n_openssl_compat_rand,
^
s2n_random.c:179:5: error: excess elements in struct initializer [-Werror]
s2n_random.c:179:5: error: (near initialization for ‘s2n_openssl_rand_method’) [-Werror]
s2n_random.c:180:5: error: unknown field ‘cleanup’ specified in initializer
.cleanup = NULL,
^
s2n_random.c:180:5: error: excess elements in struct initializer [-Werror]
s2n_random.c:180:5: error: (near initialization for ‘s2n_openssl_rand_method’) [-Werror]
s2n_random.c:181:5: error: unknown field ‘add’ specified in initializer
.add = NULL,
^
s2n_random.c:181:5: error: excess elements in struct initializer [-Werror]
s2n_random.c:181:5: error: (near initialization for ‘s2n_openssl_rand_method’) [-Werror]
s2n_random.c:182:5: error: unknown field ‘pseudorand’ specified in initializer
.pseudorand = s2n_openssl_compat_rand,
^
s2n_random.c:182:5: error: excess elements in struct initializer [-Werror]
s2n_random.c:182:5: error: (near initialization for ‘s2n_openssl_rand_method’) [-Werror]
s2n_random.c:183:5: error: unknown field ‘status’ specified in initializer
.status = s2n_openssl_compat_status
^
s2n_random.c:184:1: error: excess elements in struct initializer [-Werror]
};
^
s2n_random.c:184:1: error: (near initialization for ‘s2n_openssl_rand_method’) [-Werror]
cc1: all warnings being treated as errors
make[1]: *** [s2n_random.o] Error 1
make[1]: Leaving directory `/home/alex/Build/s2n_linuxbuild/utils'
make: *** [libs] Error 2
This seems to only affect compatibility with libressl. I was able to build s2n against openssl and all tests pass.
Thanks for working on this interesting library!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels