Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610936 - dev-libs/libzip-1.1.3: fails to link on musl libc
Summary: dev-libs/libzip-1.1.3: fails to link on musl libc
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL: https://github.com/Galapagos-Linux/ma...
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2017-02-25 23:00 UTC by A. Wilcox (awilfox)
Modified: 2017-03-17 19:49 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Use fts-standalone on musl libc (0001-dev-libs-libzip-Use-fts-standalone-on-musl-libc.patch,2.16 KB, patch)
2017-02-25 23:00 UTC, A. Wilcox (awilfox)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description A. Wilcox (awilfox) 2017-02-25 23:00:09 UTC
Created attachment 465166 [details, diff]
Use fts-standalone on musl libc

libtool: link: gcc -O2 -ggdb -march=nocona -mtune=core2 -fno-omit-frame-pointer -mfpmath=sse -o .libs/zipcmp zipcmp.o  ../lib/.libs/libzip.so -lz
zipcmp.o: In function `list_directory':
/var/tmp/portage/dev-libs/libzip-1.1.3/work/libzip-1.1.3/src/zipcmp.c:320: undefined reference to `fts_open'
/var/tmp/portage/dev-libs/libzip-1.1.3/work/libzip-1.1.3/src/zipcmp.c:328: undefined reference to `fts_read'
/var/tmp/portage/dev-libs/libzip-1.1.3/work/libzip-1.1.3/src/zipcmp.c:376: undefined reference to `fts_close'
/var/tmp/portage/dev-libs/libzip-1.1.3/work/libzip-1.1.3/src/zipcmp.c:366: undefined reference to `fts_close'
collect2: error: ld returned 1 exit status
Makefile:411: recipe for target 'zipcmp' failed


Attached is a patch that:

- adds sys-libs/fts-standalone to [R]DEPEND when elibc_musl
- adds simple check to configure.ac
- revbump to inherit autotools for 'eautoreconf'


Tested on musl and glibc (changes nothing on glibc, builds correctly on musl).
Comment 1 Michael Palimaka (kensington) gentoo-dev 2017-03-02 10:55:10 UTC
Any chance of sending upstream? They seem semi-alive.
Comment 2 Felix Janda 2017-03-02 14:36:27 UTC
I just tried checked out upstream version 1.2.0 on a musl system and it
built fine out of the box. I think that 1.1.3 should also work fine if
sys-libs/fts-standalone is NOT installed.

The point is that there are configure tests for fts but they only check
for presence of fts.h and not whether it is necessary to link to an
additional library. (This is not surprising since I don't think that
any other system has an external libfts.)

fts is only used in the directory comparison of zipcmp.
Comment 3 Andreas Sturmlechner gentoo-dev 2017-03-17 19:49:13 UTC
Well, there has been a recent release 1.2.0 that kde-apps/ark is now optionally depending on. So I've added your patch for the 1.2.0 version bump in git commit 9a609ec75673220be26e8ca4f8f7164cf3262aa2 and also sent my own ballon d'essai to their mailing list about their half-finished cmake support, we'll see how it goes.