package/aircrack-ng: add dependency on ! BR2_PREFER_STATIC_LIB
PATCH 1/1 package/aircrack-ng: add dependency on ! BR2_PREFER_STATIC_LIB
Now that BR2_PREFER_STATIC_LIB means "do not build dynamic libs and build statically linked applications" this package just can't be built in case BR2_PREFER_STATIC_LIB is selected. Add that to dependencies and drop conditional LDFLAGS manipulations.
--- package/aircrack-ng/Config.in | 5 +++-- package/aircrack-ng/aircrack-ng.mk | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-)
package/aircrack-ng/Config.in +3 -2
@@ -5,11 +5,12 @@ config BR2_PACKAGE_AIRCRACK_NG select BR2_PACKAGE_OPENSSL select BR2_PACKAGE_IW # runtime depends on BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_PREFER_STATIC_LIB help A set of tools for auditing wireless networks http://www.aircrack-ng.org/ -comment "aircrack-ng needs a toolchain w/ largefile, threads" +comment "aircrack-ng needs a toolchain w/ largefile, threads, dynamic library" depends on BR2_USE_MMU - depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS + depends on !BR2_LARGEFILE || !BR2_TOOLCHAIN_HAS_THREADS || BR2_PREFER_STATIC_LIB
package/aircrack-ng/aircrack-ng.mk +2 -3
@@ -13,15 +13,14 @@ AIRCRACK_NG_DEPENDENCIES = openssl ifeq ($(BR2_PACKAGE_SQLITE),y) AIRCRACK_NG_MAKE_OPTS = sqlite=true AIRCRACK_NG_MAKE_OPTS += \ - LIBSQL="-lsqlite3$(if $(BR2_PREFER_STATIC_LIB), -ldl -lpthread)" + LIBSQL="-lsqlite3" AIRCRACK_NG_DEPENDENCIES += sqlite else AIRCRACK_NG_MAKE_OPTS = sqlite=false endif -AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) -lz \ - $(if $(BR2_PREFER_STATIC_LIB),-ldl -lpthread) +AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) -lz define AIRCRACK_NG_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE1) CC="$(TARGET_CC)" LD="$(TARGET_LD)" \
Signature · 1 line
1.7.7.6
PATCH 1/1 package/aircrack-ng: add dependency on ! BR2_PREFER_STATIC_LIB
Dear Max Filippov,
Quoted 10 lines · Max Filippov
Now that
BR2_PREFER_STATIC_LIBmeans "do not build dynamic libs and build statically linked applications" this package just can't be built in caseBR2_PREFER_STATIC_LIBis selected. Add that to dependencies and drop conditional LDFLAGS manipulations.Signed-off-by Max Filippov <[email protected]>--- package/aircrack-ng/Config.in | 5 +++-- package/aircrack-ng/aircrack-ng.mk | 5 ++--- 2 files changed, 5 insertions(+), 5 deletions(-)
I'm not sure this is the correct fix, and I believe the current situation is wrong due to a succession of mistakes. See below.
package/aircrack-ng/aircrack-ng.mk AIRCRACK_NG_DEPENDENCIES = openssl · line 16
Quoted 10 lines
package/aircrack-ng/aircrack-ng.mk +1
-1@@ -13,15 +13,14 @@ AIRCRACK_NG_DEPENDENCIES = openssl ifeq ($(BR2_PACKAGE_SQLITE),y) AIRCRACK_NG_MAKE_OPTS = sqlite=true AIRCRACK_NG_MAKE_OPTS += \ - LIBSQL="-lsqlite3$(if $(BR2_PREFER_STATIC_LIB), -ldl -lpthread)" + LIBSQL="-lsqlite3"
This was added in commit 1141d99aae9e1b139509ad71c969e6705417a48b, from August 2013. At the time, sqlite3 was indeed linked against libdl. But following commit bd56cd6b4cc75511ffacfe020a8de3c1aad44fc9, from November 2013, this is no longer the case: when BR2_PREFER_STATIC_LIB is enabled, the dynamic library loading feature of sqlite is disabled, so sqlite can be used in pure static library configurations.
package/aircrack-ng/aircrack-ng.mk AIRCRACK_NG_DEPENDENCIES = openssl · line 23
Quoted 3 lines
package/aircrack-ng/aircrack-ng.mk +1
-2-AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) -lz \ - $(if $(BR2_PREFER_STATIC_LIB),-ldl -lpthread) +AIRCRACK_NG_LDFLAGS = $(TARGET_LDFLAGS) -lz
This one was added in commit bed1490d0f58dc963d2144f2fe6b705f9f36d848, in May 2013, to fix
http://autobuild.buildroot.net/results/2441d8b62323a00f32f2edb7cb781dda71ff7f68.
But the fix is wrong, because the -ldl and -lpthread dependencies only come because of sqlite, not because of aircrack-ng itself.
I'm going to do some testing, but I believe that aircrack-ng can continue to build in BR2_PREFER_STATIC_LIB configurations, and that those -ldl flags are not necessary.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/aircrack-ng: add dependency on ! BR2_PREFER_STATIC_LIB
Hello,
Quoted 3 lines · Thomas Petazzoni
I'm going to do some testing, but I believe that aircrack-ng can continue to build in
BR2_PREFER_STATIC_LIBconfigurations, and that those -ldl flags are not necessary.
I've committed what I believe is a better fix for the issue:
http://git.buildroot.net/buildroot/commit/?id=68e8a10f97ffed4525c5a14b74679c682e8cbf61.
Do not hesitate to have a look, and report back if you disagree.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 package/aircrack-ng: add dependency on ! BR2_PREFER_STATIC_LIB
Hi Thomas,
Quoted 8 lines · Thomas Petazzoni
Quoted 3 lines · Thomas Petazzoni
I'm going to do some testing, but I believe that aircrack-ng can continue to build in
BR2_PREFER_STATIC_LIBconfigurations, and that those -ldl flags are not necessary.I've committed what I believe is a better fix for the issue:
http://git.buildroot.net/buildroot/commit/?id=68e8a10f97ffed4525c5a14b74679c682e8cbf61.
Do not hesitate to have a look, and report back if you disagree.
with the additional patch that I've just sent it works well.
Signature · 2 lines
Thanks. -- Max