package/memcached: fix static with shared build
PATCH 1/1 package/memcached: fix static with shared build
When BR2_SHARED_STATIC_LIBS is enabled, both --enable-static and --enable-shared are passed to configure. memcached configure.ac only looks for --enable-static to make the build static. But when linking against openssl pkg-config only returns dynamic linking dependencies, resulting in the following build failure:
/home/thomas/autobuild/instance-1/output-1/host/bin/aarch64_be-buildroot-linux-gnu-gcc -std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Ofast -g0 -D_FORTIFY_SOURCE=2 -pthread -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -static -o timedrun timedrun.o -levent -L/home/thomas/autobuild/instance-1/output-1/host/bin/../aarch64_be-buildroot-linux-gnu/sysroot/usr/lib -lssl -lcrypto -ldl /home/thomas/autobuild/instance-1/output-1/host/lib/gcc/aarch64_be-buildroot-linux-gnu/11.3.0/../../../../aarch64_be-buildroot-linux-gnu/bin/ld: memcached-memcached.o: in function `conn_new':
memcached.c:(.text+0x1668): undefined reference to `SSL_set_info_callback'
BR2_SHARED_STATIC_LIBS only makes sense for libraries, not executable binaries. Pass --disable-static unless BR2_STATIC_LIBS is enabled for static only build.
Fixes:
- http://autobuild.buildroot.org/results/363c84eaa69350e02bec0b35b88d4bdf4dad804c
- http://autobuild.buildroot.org/results/0bde41bb700100d8df5ebdb1b64dfdc76c7af475
--- package/memcached/memcached.mk | 4 ++++ 1 file changed, 4 insertions(+)
package/memcached/memcached.mk +4 -0
@@ -29,4 +29,8 @@ else MEMCACHED_CONF_OPTS += --disable-tls endif +ifeq ($(BR2_STATIC_LIBS),) +MEMCACHED_CONF_OPTS += --disable-static +endif + $(eval $(autotools-package))
Signature · 6 lines
2.35.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
When
BR2_SHARED_STATIC_LIBSis enabled, both --enable-static and --enable-shared are passed to configure. memcached configure.ac only looks for --enable-static to make the build static. But when linking against openssl pkg-config only returns dynamic linking dependencies, resulting in the following build failure:
/home/thomas/autobuild/instance-1/output-1/host/bin/aarch64_be-buildroot-linux-gnu-gcc(quoted diff) +0
-6-std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Ofast -g0 -D_FORTIFY_SOURCE=2 -pthread -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -static -o timedrun timedrun.o -levent -L/home/thomas/autobuild/instance-1/output-1/host/bin/../aarch64_be-buildroot-linux-gnu/sysroot/usr/lib -lssl -lcrypto -ldl
/home/thomas/autobuild/instance-1/output-1/host/lib/gcc/aarch64_be-buildroot-linux-gnu/11.3.0/../../../../aarch64_be-buildroot-linux-gnu/bin/ld:
memcached-memcached.o: in function `conn_new':
memcached.c:(.text+0x1668): undefined reference to `SSL_set_info_callback'
BR2_SHARED_STATIC_LIBSonly makes sense for libraries, not executable binaries. Pass --disable-static unlessBR2_STATIC_LIBSis enabled for static only build.
Quoted 5 lines
Fixes:
- http://autobuild.buildroot.org/results/363c84eaa69350e02bec0b35b88d4bdf4dad804c
- http://autobuild.buildroot.org/results/0bde41bb700100d8df5ebdb1b64dfdc76c7af475Signed-off-by Fabrice Fontaine <[email protected]>
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 23 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabrice" == Fabrice Fontaine <[email protected]> writes:
When
BR2_SHARED_STATIC_LIBSis enabled, both --enable-static and --enable-shared are passed to configure. memcached configure.ac only looks for --enable-static to make the build static. But when linking against openssl pkg-config only returns dynamic linking dependencies, resulting in the following build failure:
/home/thomas/autobuild/instance-1/output-1/host/bin/aarch64_be-buildroot-linux-gnu-gcc(quoted diff) +0
-6-std=gnu99 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Ofast -g0 -D_FORTIFY_SOURCE=2 -pthread -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -static -o timedrun timedrun.o -levent -L/home/thomas/autobuild/instance-1/output-1/host/bin/../aarch64_be-buildroot-linux-gnu/sysroot/usr/lib -lssl -lcrypto -ldl
/home/thomas/autobuild/instance-1/output-1/host/lib/gcc/aarch64_be-buildroot-linux-gnu/11.3.0/../../../../aarch64_be-buildroot-linux-gnu/bin/ld:
memcached-memcached.o: in function `conn_new':
memcached.c:(.text+0x1668): undefined reference to `SSL_set_info_callback'
BR2_SHARED_STATIC_LIBSonly makes sense for libraries, not executable binaries. Pass --disable-static unlessBR2_STATIC_LIBSis enabled for static only build.
Quoted 5 lines
Fixes:
- http://autobuild.buildroot.org/results/363c84eaa69350e02bec0b35b88d4bdf4dad804c
- http://autobuild.buildroot.org/results/0bde41bb700100d8df5ebdb1b64dfdc76c7af475Signed-off-by Fabrice Fontaine <[email protected]>
Committed to 2022.08.x and 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot