Trying to build Dovecot 2.2.34 on OpenBSD fails.
This seems to have been introduced by this commit.. https://github.com/dovecot/core/commit/4a9020ed888caf03fd3132a30a7818b01daa4...
Fairly -current..
/usr/bin/libtool --tag=CC --mode=link cc -std=gnu99 -O2 -pipe -Wall
-W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast
-Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -L/usr/local/lib
-o libssl_iostream.la iostream-ssl.lo
libtool: link: ar cru .libs/libssl_iostream.a .libs/iostream-ssl.o
libtool: link: ranlib .libs/libssl_iostream.a
cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test
-DMODULE_DIR=\""/usr/local/lib/dovecot"\" -I/usr/local/include
-I../../src/lib -I../../src/lib-test
-DMODULE_DIR=\""/usr/local/lib/dovecot"\" -std=gnu99 -O2 -pipe -Wall -W
-Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast
-Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -MT
test_ssl_iostream-test-ssl-iostream.o -MD -MP -MF
.deps/test_ssl_iostream-test-ssl-iostream.Tpo -c -o
test_ssl_iostream-test-ssl-iostream.o test -f 'test-ssl-iostream.c' || echo './'
test-ssl-iostream.c
mv -f .deps/test_ssl_iostream-test-ssl-iostream.Tpo
.deps/test_ssl_iostream-test-ssl-iostream.Po
/usr/bin/libtool --tag=CC --mode=link cc -I../../src/lib
-I../../src/lib-test -DMODULE_DIR=\""/usr/local/lib/dovecot"\"
-std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
-Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2
-L/usr/local/lib -o test-ssl-iostream
test_ssl_iostream-test-ssl-iostream.o libssl_iostream_openssl.la
libssl_iostream.la ../lib-test/libtest.la ../lib/liblib.la
-export-dynamic
warning: library filename
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream_openssl.so
has no version number
libtool: link: cc -o .libs/test-ssl-iostream -I../../src/lib
-I../../src/lib-test -DMODULE_DIR="/usr/local/lib/dovecot" -std=gnu99
-O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations
-Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
-Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -Wl,-E
test_ssl_iostream-test-ssl-iostream.o
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream.a
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-test/.libs/libtest.a
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib/.libs/liblib.a
-L.libs -lssl_iostream_openssl -lssl -lcrypto
-Wl,-rpath,/usr/local/lib/dovecot
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib/.libs/liblib.a(net.o):
In function net_connect_unix_with_retries': net.c:(.text+0x852): warning: rand() may return deterministic values, is that what you want? .libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_cert_match_name'
.libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_context_deinit' .libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_handshake'
.libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_unref' .libs/libssl_iostream_openssl.so: undefined reference to
iostream_ssl_module_init'
.libs/libssl_iostream_openssl.so: undefined reference to
`ssl_iostream_has_valid_client_cert'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Error while executing cc -o .libs/test-ssl-iostream -I../../src/lib
-I../../src/lib-test -DMODULE_DIR="/usr/local/lib/dovecot" -std=gnu99
-O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations
-Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
-Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -Wl,-E
test_ssl_iostream-test-ssl-iostream.o
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream.a
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-test/.libs/libtest.a
/home/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib/.libs/liblib.a
-L.libs -lssl_iostream_openssl -lssl -lcrypto
-Wl,-rpath,/usr/local/lib/dovecot
A 6.0-ish build..
/usr/bin/libtool --tag=CC --mode=link cc -std=gnu99 -O2 -pipe -Wall
-W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith
-Wchar-subscripts -Wformat=2 -Wbad-function-cast -fno-builtin-strftime
-Wstrict-aliasing=2 -I/usr/include -L/usr/local/lib -o
libssl_iostream.la iostream-ssl.lo
libtool: link: ar cru .libs/libssl_iostream.a .libs/iostream-ssl.o
libtool: link: ranlib .libs/libssl_iostream.a
cc -DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test
-DMODULE_DIR=\""/usr/local/lib/dovecot"\" -I/usr/local/include
-I../../src/lib -I../../src/lib-test -DMODULE_DIR=\""/usr/local/lib/do
vecot"\" -std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2
-Wbad-function-cast -fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/include
-MT test_ssl_iostream-test-ssl-iostream.o -MD -MP -MF
.deps/test_ssl_iostream-test-ssl-iostream.Tpo -c -o
test_ssl_iostream-test-ssl-iostream.o test -f 'test-ssl-iostream.c' || echo './'
test-ssl-iostream.
c
mv -f .deps/test_ssl_iostream-test-ssl-iostream.Tpo
.deps/test_ssl_iostream-test-ssl-iostream.Po
/usr/bin/libtool --tag=CC --mode=link cc -I../../src/lib
-I../../src/lib-test -DMODULE_DIR=\""/usr/local/lib/dovecot"\"
-std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes
-Wmissing-declarations -Wpoi
nter-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
-fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/include
-L/usr/local/lib -o test-ssl-iostream
test_ssl_iostream-test-ssl-iostream.o libssl_io
stream_openssl.la libssl_iostream.la ../lib-test/libtest.la
../lib/liblib.la -export-dynamic
warning: library filename
/home/brad/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream_openssl.so
has no version number
libtool: link: cc -o .libs/test-ssl-iostream -I../../src/lib
-I../../src/lib-test -DMODULE_DIR="/usr/local/lib/dovecot" -std=gnu99
-O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-ar
ith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
-fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/include -Wl,-E
test_ssl_iostream-test-ssl-iostream.o
/home/brad/ports/pobj/dovecot-2.2.34-no_db-no_ldap-
no_mysql-no_postgresql/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream.a
/home/brad/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-test/.libs/libtest.a
/home
/brad/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib/.libs/liblib.a
-L.libs -lssl_iostream_openssl -lssl -lcrypto
-Wl,-rpath,/usr/local/lib/dovecot
.libs/libssl_iostream_openssl.so: undefined reference to
`ssl_iostream_cert_match_name'
.libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_context_deinit' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_ref'
.libs/libssl_iostream_openssl.so: undefined reference to `t_malloc'
.libs/libssl_iostream_openssl.so: undefined reference to
buffer_append_space_unsafe' .libs/libssl_iostream_openssl.so: undefined reference to
i_error'
.libs/libssl_iostream_openssl.so: undefined reference to o_stream_get_fd' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_compress'
.libs/libssl_iostream_openssl.so: undefined reference to
o_stream_set_max_buffer_size' .libs/libssl_iostream_openssl.so: undefined reference to
p_strdup'
.libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_handshake' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_unref'
.libs/libssl_iostream_openssl.so: undefined reference to safe_memset' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_alloc'
.libs/libssl_iostream_openssl.so: undefined reference to
i_stream_get_data_size' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_get_buffer_used_size'
.libs/libssl_iostream_openssl.so: undefined reference to i_strdup_printf' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_close'
.libs/libssl_iostream_openssl.so: undefined reference to i_fatal_status' .libs/libssl_iostream_openssl.so: undefined reference to
buffer_append'
.libs/libssl_iostream_openssl.so: undefined reference to i_strdup' .libs/libssl_iostream_openssl.so: undefined reference to
i_strocpy'
.libs/libssl_iostream_openssl.so: undefined reference to str_printfa' .libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_unref'
.libs/libssl_iostream_openssl.so: undefined reference to i_panic' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_get_max_buffer_size'
.libs/libssl_iostream_openssl.so: undefined reference to
i_stream_try_alloc' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_unref'
.libs/libssl_iostream_openssl.so: undefined reference to
buffer_append_zero' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_get_name'
.libs/libssl_iostream_openssl.so: undefined reference to i_debug' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_set_name'
.libs/libssl_iostream_openssl.so: undefined reference to i_stream_create' .libs/libssl_iostream_openssl.so: undefined reference to
iostream_ssl_module_init'
.libs/libssl_iostream_openssl.so: undefined reference to i_stream_get_fd' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_close'
.libs/libssl_iostream_openssl.so: undefined reference to o_stream_create' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_skip'
.libs/libssl_iostream_openssl.so: undefined reference to
io_stream_set_error' .libs/libssl_iostream_openssl.so: undefined reference to
i_fatal'
.libs/libssl_iostream_openssl.so: undefined reference to str_c' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_send'
.libs/libssl_iostream_openssl.so: undefined reference to o_stream_flush' .libs/libssl_iostream_openssl.so: undefined reference to
buffer_delete'
.libs/libssl_iostream_openssl.so: undefined reference to
o_stream_set_flush_pending' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_uncork'
.libs/libssl_iostream_openssl.so: undefined reference to i_stream_get_data' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_switch_ioloop'
.libs/libssl_iostream_openssl.so: undefined reference to
o_stream_get_error' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_set_flush_callback'
.libs/libssl_iostream_openssl.so: undefined reference to t_strsplit_spaces' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_get_name'
.libs/libssl_iostream_openssl.so: undefined reference to
i_stream_read_data' .libs/libssl_iostream_openssl.so: undefined reference to
i_info'
.libs/libssl_iostream_openssl.so: undefined reference to t_strdup_noconst' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_get_error'
.libs/libssl_iostream_openssl.so: undefined reference to
o_stream_get_buffer_avail_size' .libs/libssl_iostream_openssl.so: undefined reference to
t_strndup'
.libs/libssl_iostream_openssl.so: undefined reference to
i_stream_set_input_pending' .libs/libssl_iostream_openssl.so: undefined reference to
i_stream_set_name'
.libs/libssl_iostream_openssl.so: undefined reference to
buffer_create_dynamic' .libs/libssl_iostream_openssl.so: undefined reference to
pool_alloconly_create'
.libs/libssl_iostream_openssl.so: undefined reference to
o_stream_set_no_error_handling' .libs/libssl_iostream_openssl.so: undefined reference to
default_pool'
.libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_has_valid_client_cert' .libs/libssl_iostream_openssl.so: undefined reference to
buffer_free'
.libs/libssl_iostream_openssl.so: undefined reference to t_strdup_printf' .libs/libssl_iostream_openssl.so: undefined reference to
buffer_get_writable_size'
.libs/libssl_iostream_openssl.so: undefined reference to net_ip_compare' .libs/libssl_iostream_openssl.so: undefined reference to
o_stream_cork'
.libs/libssl_iostream_openssl.so: undefined reference to t_str_new' .libs/libssl_iostream_openssl.so: undefined reference to
t_strconcat'
collect2: ld returned 1 exit status
Error while executing cc -o .libs/test-ssl-iostream -I../../src/lib
-I../../src/lib-test -DMODULE_DIR="/usr/local/lib/dovecot" -std=gnu99
-O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpoi
nter-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast
-fno-builtin-strftime -Wstrict-aliasing=2 -I/usr/include -Wl,-E
test_ssl_iostream-test-ssl-iostream.o
/home/brad/ports/pobj/dovecot-2.2.34-no_db-n
o_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream.a
/home/brad/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib-test/.libs/libtest.
a
/home/brad/ports/pobj/dovecot-2.2.34-no_db-no_ldap-no_mysql-no_postgresql/dovecot-2.2.34/src/lib/.libs/liblib.a
-L.libs -lssl_iostream_openssl -lssl -lcrypto
-Wl,-rpath,/usr/local/lib/dovecot
On 2018-03-04, Brad Smith <brad@comstyle.com> wrote:
Trying to build Dovecot 2.2.34 on OpenBSD fails.
This seems to have been introduced by this commit.. https://github.com/dovecot/core/commit/4a9020ed888caf03fd3132a30a7818b01daa4...
This is libtool-related. GNU libtool prints a warning but is able to link:
$ /usr/local/bin/libtool --tag=CC --mode=link cc -I../../src/lib -I../../src/lib-test -DMODULE_DIR=\""/usr/local/lib/dovecot"\" -std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -L/usr/local/lib -o test-ssl-iostream test_ssl_iostream-test-ssl-iostream.o libssl_iostream_openssl.la libssl_iostream.la ../lib-test/libtest.la ../lib/liblib.la -export-dynamic *** Warning: Linking the executable test-ssl-iostream against the loadable module *** libssl_iostream_openssl.so is not portable! libtool: link: cc -I../../src/lib -I../../src/lib-test -DMODULE_DIR=\"/usr/local/lib/dovecot\" -std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -o .libs/test-ssl-iostream test_ssl_iostream-test-ssl-iostream.o -Wl,-E -L/usr/local/lib -L./.libs -lssl_iostream_openssl -lssl -lcrypto ./.libs/libssl_iostream.a ../lib-test/.libs/libtest.a ../lib/.libs/liblib.a -Wl,-rpath,/usr/local/lib/dovecot ../lib/.libs/liblib.a(net.o): In function `net_connect_unix_with_retries': net.c:(.text+0x852): warning: rand() may return deterministic values, is that what you want?
But it fails with OpenBSD libtool:
$ /usr/bin/libtool --tag=CC --mode=link cc -I../../src/lib -I../../src/lib-test -DMODULE_DIR=\""/usr/local/lib/dovecot"\" -std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -L/usr/local/lib -o test-ssl-iostream test_ssl_iostream-test-ssl-iostream.o libssl_iostream_openssl.la libssl_iostream.la ../lib-test/libtest.la ../lib/liblib.la -export-dynamic
warning: library filename /usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream_openssl.so has no version number
libtool: link: cc -o .libs/test-ssl-iostream -I../../src/lib -I../../src/lib-test -DMODULE_DIR="/usr/local/lib/dovecot" -std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -Wl,-E test_ssl_iostream-test-ssl-iostream.o /usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream.a /usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib-test/.libs/libtest.a /usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib/.libs/liblib.a -L.libs -lssl_iostream_openssl -lssl -lcrypto -Wl,-rpath,/usr/local/lib/dovecot
/usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib/.libs/liblib.a(net.o): In function net_connect_unix_with_retries': net.c:(.text+0x852): warning: rand() may return deterministic values, is that what you want? .libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_cert_match_name'
.libs/libssl_iostream_openssl.so: undefined reference to ssl_iostream_context_deinit' .libs/libssl_iostream_openssl.so: undefined reference to
ssl_iostream_handshake'
.libs/libssl_iostream_openssl.so: undefined reference to ssl_iostream_unref' .libs/libssl_iostream_openssl.so: undefined reference to
iostream_ssl_module_init'
.libs/libssl_iostream_openssl.so: undefined reference to `ssl_iostream_has_valid_client_cert'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
Error while executing cc -o .libs/test-ssl-iostream -I../../src/lib -I../../src/lib-test -DMODULE_DIR="/usr/local/lib/dovecot" -std=gnu99 -O2 -pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wpointer-arith -Wchar-subscripts -Wformat=2 -Wbad-function-cast -Wno-duplicate-decl-specifier -Wstrict-aliasing=2 -Wl,-E test_ssl_iostream-test-ssl-iostream.o /usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib-ssl-iostream/.libs/libssl_iostream.a /usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib-test/.libs/libtest.a /usr/obj/ports/dovecot-2.2.34/dovecot-2.2.34/src/lib/.libs/liblib.a -L.libs -lssl_iostream_openssl -lssl -lcrypto -Wl,-rpath,/usr/local/lib/dovecot
Clearly OpenBSD libtool isn't handling something that GNU libtool can cope with, but given the warning from GNU libtool it doesn't seem entirely legit in the first place.
participants (2)
-
Brad Smith
-
Stuart Henderson