Skip to contentSkip to conversation

package/libzip: fix build with musl-fts

PATCH New Fabrice Fontaine 2 participants 4 messages Oct 11, 2019 – Oct 12, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libzip: fix build with musl-fts

Fixes:
- http://autobuild.buildroot.org/results/89f5fc111bb8bcecbe05ab79d62ac809094b6ce1

---
 package/libzip/Config.in | 1 +
 package/libzip/libzip.mk | 5 +++++
 2 files changed, 6 insertions(+)
package/libzip/Config.in +1 -0
index f69dd0d4d5..c6ddabe6b5 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBZIP
 	bool "libzip"
 	depends on !BR2_STATIC_LIBS # dlsym()
+	select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_ZLIB
 	help
 	  C library for reading, creating, and modifying zip archives.
package/libzip/libzip.mk +5 -0
index 280ca6d8c7..a312dd90df 100644
@@ -33,5 +33,10 @@ else
 LIBZIP_CONF_OPTS += -DENABLE_OPENSSL=OFF
 endif
 
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
+LIBZIP_DEPENDENCIES += musl-fts
+LIBZIP_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-lfts
+endif
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
Signature · 1 line
2.23.0
#1 lore raw

PATCH 1/1 package/libzip: fix build with musl-fts

Quoted 2 lines · Fabrice Fontaine

Fixes:
- http://autobuild.buildroot.org/results/89f5fc111bb8bcecbe05ab79d62ac809094b6ce1

Ha, we didn't think of that when adding musl-fts... Packages that check for
fts.h may now fail to build because they find fts.h but don't link with -lfts...

Quoted 2 lines

Applied to master, thanks.

Regards,
Arnout

Quoted 33 lines
---
 package/libzip/Config.in | 1 +
 package/libzip/libzip.mk | 5 +++++
 2 files changed, 6 insertions(+)
package/libzip/Config.in +1 -0
index f69dd0d4d5..c6ddabe6b5 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBZIP
 	bool "libzip"
 	depends on !BR2_STATIC_LIBS # dlsym()
+	select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
 	select BR2_PACKAGE_ZLIB
 	help
 	  C library for reading, creating, and modifying zip archives.
package/libzip/libzip.mk +5 -0
index 280ca6d8c7..a312dd90df 100644
@@ -33,5 +33,10 @@ else
 LIBZIP_CONF_OPTS += -DENABLE_OPENSSL=OFF
 endif
 
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
+LIBZIP_DEPENDENCIES += musl-fts
+LIBZIP_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-lfts
+endif
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))
#2 lore raw

PATCH 1/1 package/libzip: fix build with musl-fts

Dear Arnout,

Le ven. 11 oct. 2019 ? 22:09, Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 9 lines · Fabrice Fontaine
Quoted 2 lines

Fixes:
- http://autobuild.buildroot.org/results/89f5fc111bb8bcecbe05ab79d62ac809094b6ce1

Ha, we didn't think of that when adding musl-fts... Packages that check for
fts.h may now fail to build because they find fts.h but don't link with -lfts...

There is another interesting issue due to musl-fts on elfutils
(http://autobuild.buildroot.org/results/ef3/ef3ec5aaef2b26c9947f403d2672b0f9beafd6db/build-end.log):

In file included from linux-kernel-modules.c:67:0:
/data/buildroot/buildroot-test/instance-0/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/include/fts.h:149:6:
error: conflicting types for 'fts_set'

 int  fts_set(FTS *, FTSENT *, int);
      ^~~~~~~
Quoted 34 lines
Quoted 3 lines

Applied to master, thanks.

Regards,
Arnout

Quoted 25 lines
---
 package/libzip/Config.in | 1 +
 package/libzip/libzip.mk | 5 +++++
 2 files changed, 6 insertions(+)
package/libzip/Config.in +1 -0
index f69dd0d4d5..c6ddabe6b5 100644
@@ -1,6 +1,7 @@
 config BR2_PACKAGE_LIBZIP
      bool "libzip"
      depends on !BR2_STATIC_LIBS # dlsym()
+     select BR2_PACKAGE_MUSL_FTS if !BR2_TOOLCHAIN_USES_GLIBC
      select BR2_PACKAGE_ZLIB
      help
        C library for reading, creating, and modifying zip archives.
package/libzip/libzip.mk +0 -0
index 280ca6d8c7..a312dd90df 100644
@@ -33,5 +33,10 @@ else
 LIBZIP_CONF_OPTS += -DENABLE_OPENSSL=OFF
 endif
 
Quoted 8 lines

package/libzip/libzip.mk else · line 42

Quoted 8 lines
package/libzip/libzip.mk +5 -0
+ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),)
+LIBZIP_DEPENDENCIES += musl-fts
+LIBZIP_CONF_OPTS += -DCMAKE_EXE_LINKER_FLAGS=-lfts
+endif
+
 $(eval $(cmake-package))
 $(eval $(host-cmake-package))

Best Regards,

Fabrice

#3 lore raw

PATCH 1/1 package/libzip: fix build with musl-fts

Quoted 12 lines · Fabrice Fontaine

Dear Arnout,

Le ven. 11 oct. 2019 ? 22:09, Arnout Vandecappelle <[email protected]> a ?crit :

Quoted 9 lines · Fabrice Fontaine
Quoted 2 lines

Fixes:
- http://autobuild.buildroot.org/results/89f5fc111bb8bcecbe05ab79d62ac809094b6ce1

Ha, we didn't think of that when adding musl-fts... Packages that check for
fts.h may now fail to build because they find fts.h but don't link with -lfts...

Quoted 8 lines

There is another interesting issue due to musl-fts on elfutils
(http://autobuild.buildroot.org/results/ef3/ef3ec5aaef2b26c9947f403d2672b0f9beafd6db/build-end.log):

In file included from linux-kernel-modules.c:67:0:
/data/buildroot/buildroot-test/instance-0/output/host/m68k-buildroot-linux-uclibc/sysroot/usr/include/fts.h:149:6:
error: conflicting types for 'fts_set'

 int  fts_set(FTS *, FTSENT *, int);
      ^~~~~~~

We do that unto ourselves with patch 0002...

Regards,
Arnout