* [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue
@ 2017-02-09 10:29 Peter Korsgaard
2017-02-09 10:29 ` [Buildroot] [PATCH 2/2] libevent: drop openssl static linking workaround Peter Korsgaard
2017-02-09 14:02 ` [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue Peter Korsgaard
0 siblings, 2 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-02-09 10:29 UTC (permalink / raw)
To: buildroot
Fixes:
http://autobuild.buildroot.net/results/1e7/1e7027b1b87d88b4517b1b19d3a2ae54c24f2c10/
http://autobuild.buildroot.net/results/ff7/ff7e010b41e7448d15d20396e9e9bd7319dd493b/
http://autobuild.buildroot.net/results/269/269a3a76f61c65423ba703a85e94cc003fb75e4c/
Libevent/libtool gets confused by the library order when statically linking
the sample programs and passes -lz before -lcrypto even though libcrypto
uses zlib.
/bin/bash ./libtool --tag=CC --mode=link .. -o sample/https-client \
sample/https-client.o sample/hostcheck.o \
sample/openssl_hostname_validation.o libevent.la \
libevent_openssl.la -lssl -lcrypto -lz -lz -lcrypto
libtool: link: .. -o sample/https-client sample/https-client.o \
sample/hostcheck.o sample/openssl_hostname_validation.o \
./.libs/libevent.a ./.libs/libevent_openssl.a \
-lssl -lz -lcrypto
../libcrypto.a(c_zlib.o): In function `zlib_stateful_expand_block':
c_zlib.c:(.text+0x30): undefined reference to `inflate'
This is most likely fixable, but as the sample programs aren't installed /
used, simply skip building them to save time and work around this issue.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/libevent/libevent.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/package/libevent/libevent.mk b/package/libevent/libevent.mk
index 0a5417f98..128bb2ac7 100644
--- a/package/libevent/libevent.mk
+++ b/package/libevent/libevent.mk
@@ -11,6 +11,7 @@ LIBEVENT_LICENSE = BSD-3c, OpenBSD
LIBEVENT_LICENSE_FILES = LICENSE
# For 0001-Disable-building-test-programs.patch
LIBEVENT_AUTORECONF = YES
+LIBEVENT_CONF_OPTS = --disable-samples
define LIBEVENT_REMOVE_PYSCRIPT
rm $(TARGET_DIR)/usr/bin/event_rpcgen.py
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] libevent: drop openssl static linking workaround
2017-02-09 10:29 [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue Peter Korsgaard
@ 2017-02-09 10:29 ` Peter Korsgaard
2017-02-09 14:02 ` Peter Korsgaard
2017-02-09 14:02 ` [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue Peter Korsgaard
1 sibling, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2017-02-09 10:29 UTC (permalink / raw)
To: buildroot
Commit f29bb169cf (libevent: fix openssl detection when statically linking)
forced libevent to link against zlib when statically linking against openssl
as the configure script failed to do this.
Since then libevent has been bumped, and it now uses pkg-config to figure
out how to link with openssl, so ensure pkg-config is available and drop the
now-unneeded workaround.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
package/libevent/libevent.mk | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/package/libevent/libevent.mk b/package/libevent/libevent.mk
index 128bb2ac7..5458ce316 100644
--- a/package/libevent/libevent.mk
+++ b/package/libevent/libevent.mk
@@ -24,13 +24,8 @@ LIBEVENT_POST_INSTALL_TARGET_HOOKS += LIBEVENT_REMOVE_PYSCRIPT
endif
ifeq ($(BR2_PACKAGE_OPENSSL),y)
-LIBEVENT_DEPENDENCIES += openssl
+LIBEVENT_DEPENDENCIES += host-pkgconf openssl
LIBEVENT_CONF_OPTS += --enable-openssl
-# openssl needs zlib but configure forgets to link against it causing
-# openssl detection to fail
-ifeq ($(BR2_STATIC_LIBS),y)
-LIBEVENT_CONF_ENV += OPENSSL_LIBADD='-lz'
-endif
else
LIBEVENT_CONF_OPTS += --disable-openssl
endif
--
2.11.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue
2017-02-09 10:29 [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue Peter Korsgaard
2017-02-09 10:29 ` [Buildroot] [PATCH 2/2] libevent: drop openssl static linking workaround Peter Korsgaard
@ 2017-02-09 14:02 ` Peter Korsgaard
1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-02-09 14:02 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> Fixes:
> http://autobuild.buildroot.net/results/1e7/1e7027b1b87d88b4517b1b19d3a2ae54c24f2c10/
> http://autobuild.buildroot.net/results/ff7/ff7e010b41e7448d15d20396e9e9bd7319dd493b/
> http://autobuild.buildroot.net/results/269/269a3a76f61c65423ba703a85e94cc003fb75e4c/
> Libevent/libtool gets confused by the library order when statically linking
> the sample programs and passes -lz before -lcrypto even though libcrypto
> uses zlib.
> /bin/bash ./libtool --tag=CC --mode=link .. -o sample/https-client \
> sample/https-client.o sample/hostcheck.o \
> sample/openssl_hostname_validation.o libevent.la \
> libevent_openssl.la -lssl -lcrypto -lz -lz -lcrypto
> libtool: link: .. -o sample/https-client sample/https-client.o \
> sample/hostcheck.o sample/openssl_hostname_validation.o \
> ./.libs/libevent.a ./.libs/libevent_openssl.a \
> -lssl -lz -lcrypto
> ../libcrypto.a(c_zlib.o): In function `zlib_stateful_expand_block':
> c_zlib.c:(.text+0x30): undefined reference to `inflate'
> This is most likely fixable, but as the sample programs aren't installed /
> used, simply skip building them to save time and work around this issue.
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] libevent: drop openssl static linking workaround
2017-02-09 10:29 ` [Buildroot] [PATCH 2/2] libevent: drop openssl static linking workaround Peter Korsgaard
@ 2017-02-09 14:02 ` Peter Korsgaard
0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2017-02-09 14:02 UTC (permalink / raw)
To: buildroot
>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
> Commit f29bb169cf (libevent: fix openssl detection when statically linking)
> forced libevent to link against zlib when statically linking against openssl
> as the configure script failed to do this.
> Since then libevent has been bumped, and it now uses pkg-config to figure
> out how to link with openssl, so ensure pkg-config is available and drop the
> now-unneeded workaround.
> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-02-09 14:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-09 10:29 [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue Peter Korsgaard
2017-02-09 10:29 ` [Buildroot] [PATCH 2/2] libevent: drop openssl static linking workaround Peter Korsgaard
2017-02-09 14:02 ` Peter Korsgaard
2017-02-09 14:02 ` [Buildroot] [PATCH 1/2] libevent: disable sample programs to workaround static linking issue Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox