Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 829247

Summary: app-misc/nnn-4.3 - nnn.c:(.text+<snip>): undefined reference to fts_open
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: cfuga, sam, zlogene
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 430702    
Attachments: emerge-info.txt
app-misc:nnn-4.3:20211215-083718.log
emerge-history.txt
environment
etc.portage.tar.bz2
temp.tar.bz2
musl patch for app-misc/nnn-4.3.ebuild
musl patch for app-misc/nnn-4.5.ebuild

Description Toralf Förster gentoo-dev 2021-12-15 09:44:09 UTC
too long lines were shrinked:

>>> Compiling source in /var/tmp/portage/app-misc/nnn-4.3/work/nnn-4.3 ...
make -j4 
x86_64-gentoo-linux-musl-gcc  -pipe -march=native -fno-diagnostics-color -O2 -std=c11 -Wall -Wextra -Wshadow -O3 -I/usr/include/ncursesw  -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -o nnn  src/nnn.c -lreadline -lncursesw -ltinfow  -lpthread
/usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: /var/tmp/portage/app-misc/nnn-4.3/temp/ccnlMlhP.o: in function `du_thread':
nnn.c:(.text+0x17f9): undefined reference to `fts_open'
/usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: nnn.c:(.text+0x1804): undefined reference to `fts_read'
/usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: nnn.c:(.text+0x184f): undefined reference to `fts_read'
/usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.1/../../../../x86_64-gentoo-linux-musl/bin/ld: nnn.c:(.text+0x185f): undefined reference to `fts_close'
collect2: error: ld returned 1 exit status

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl_hardened-j4-20211213-184654

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-11.2.1 *
clang version 13.0.0
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/13/bin
/usr/lib/llvm/13
13.0.0
Python 3.9.9
Available Ruby profiles:
  [1]   ruby26 (with Rubygems)
  [2]   ruby27 (with Rubygems)
  [3]   ruby30 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.57.0 *
The following VMs are available for generation-2:
Available Java Virtual Machines:
  (none found)

php cli:

  HEAD of ::gentoo
commit 6dd8b735ba14f8d83e08e027651bf0e7caa8bc5f
Author: Repository mirror & CI <repomirrorci@gentoo.org>
Date:   Wed Dec 15 08:06:57 2021 +0000

    2021-12-15 08:06:56 UTC

emerge -qpvO app-misc/nnn
[ebuild  N    ] app-misc/nnn-4.3
Comment 1 Toralf Förster gentoo-dev 2021-12-15 09:44:10 UTC
Created attachment 759114 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2021-12-15 09:44:11 UTC
Created attachment 759115 [details]
app-misc:nnn-4.3:20211215-083718.log
Comment 3 Toralf Förster gentoo-dev 2021-12-15 09:44:13 UTC
Created attachment 759116 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2021-12-15 09:44:14 UTC
Created attachment 759117 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2021-12-15 09:44:15 UTC
Created attachment 759118 [details]
etc.portage.tar.bz2
Comment 6 Toralf Förster gentoo-dev 2021-12-15 09:44:16 UTC
Created attachment 759119 [details]
temp.tar.bz2
Comment 7 CFuga 2022-06-23 21:36:45 UTC
Created attachment 787289 [details, diff]
musl patch for app-misc/nnn-4.3.ebuild

The patch makes the following changes:
* inherits flag-o-matic eclass
* adds sys-libs/fts-standalone as dependency for musl
* adds "-lfts" to compilation flags
Comment 8 CFuga 2022-06-23 21:37:42 UTC
Created attachment 787292 [details, diff]
musl patch for app-misc/nnn-4.5.ebuild

The patch makes the following changes:
* inherits flag-o-matic eclass
* adds sys-libs/fts-standalone as dependency for musl
* adds "-lfts" to compilation flags
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-24 01:51:42 UTC
(In reply to CFuga from comment #8)
> Created attachment 787292 [details, diff] [details, diff]
> musl patch for app-misc/nnn-4.5.ebuild
> 
> The patch makes the following changes:
> * inherits flag-o-matic eclass
> * adds sys-libs/fts-standalone as dependency for musl
> * adds "-lfts" to compilation flags

CFuga, given you're doing so many of these (which I really appreciate!!), would you consider attaching 'git format-patch' output (ideally with a Signed-off-by line including your real name, but an alias is considered borderline tolerable if the work isn't huge) so I can easily apply these & you get full credit?

Big thanks.
Comment 10 Larry the Git Cow gentoo-dev 2022-06-24 03:43:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b028dfb98e34e7da505ec03da95d9049938587d0

commit b028dfb98e34e7da505ec03da95d9049938587d0
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2022-06-24 01:50:55 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2022-06-24 03:13:47 +0000

    app-misc/nnn: fix build on musl
    
    Closes: https://bugs.gentoo.org/829247
    Thanks-to: CFuga <cfuga@cfuga.mx>
    Signed-off-by: Sam James <sam@gentoo.org>

 app-misc/nnn/nnn-4.5.ebuild | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Comment 11 CFuga 2022-06-24 18:28:59 UTC
(In reply to Sam James from comment #9)
> (In reply to CFuga from comment #8)
> > Created attachment 787292 [details, diff] [details, diff] [details, diff]
> > musl patch for app-misc/nnn-4.5.ebuild
> > 
> > The patch makes the following changes:
> > * inherits flag-o-matic eclass
> > * adds sys-libs/fts-standalone as dependency for musl
> > * adds "-lfts" to compilation flags
> 
> CFuga, given you're doing so many of these (which I really appreciate!!),
> would you consider attaching 'git format-patch' output (ideally with a
> Signed-off-by line including your real name, but an alias is considered
> borderline tolerable if the work isn't huge) so I can easily apply these &
> you get full credit?
> 
> Big thanks.

You're welcome.

For sure! Since this moment, I'll send patches in the specified format.