Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 904332 - app-arch/p7zip-17.05-r1: fails to link with USE="natspec"
Summary: app-arch/p7zip-17.05-r1: fails to link with USE="natspec"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Joe Kappus
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2023-04-14 17:28 UTC by Holger Hoffstätte
Modified: 2023-04-16 09:06 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Holger Hoffstätte 2023-04-14 17:28:30 UTC
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: ZipItem.o: in function `NArchive::NZip::CItem::GetUnicodeString(UString&, AString const&, bool, bool, unsigned int) const':
ZipItem.cpp:(.text+0x5a9): undefined reference to `natspec_get_charset_by_locale'
/usr/lib/gcc/x86_64-pc-linux-gnu/12/../../../../x86_64-pc-linux-gnu/bin/ld: ZipItem.cpp:(.text+0x5bf): undefined reference to `natspec_convert'
collect2: error: ld returned 1 exit status


Reproducible: Always

Steps to Reproduce:
1. try to emerge p7zip-17.05-r1 with USE="natspec"
2. fail




As a shot in the dark I added -lnatspec to LIBS in p7zip-17.05/CPP/7zip/Bundles/Alone/makefile and the build completed.
Comment 1 Joe Kappus 2023-04-14 19:22:20 UTC
Thanks for the report! I see what's going on, the patch works to add it to makefile.machine, but then we overwrite the makefile later on depending on arch. 

I will update it to have ebuild add -lnatspec to the other arch makefiles.
Comment 2 Larry the Git Cow gentoo-dev 2023-04-16 06:55:58 UTC
The bug has been closed via the following commit(s):

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

commit 2861b43fa9fdf0f2dfff1508647e5eae87f84d8d
Author:     Joe Kappus <joe@wt.gd>
AuthorDate: 2023-04-14 19:34:03 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-04-16 06:49:06 +0000

    app-arch/p7zip: fix natspec patch
    
    due to how we handle makefiles need to drop that part from patch
    and update the makefiles directly in ebuild. fixes build with natspec.
    
    Closes: https://bugs.gentoo.org/904332
    Signed-off-by: Joe Kappus <joe@wt.gd>
    Closes: https://github.com/gentoo/gentoo/pull/30597
    Signed-off-by: Sam James <sam@gentoo.org>

 app-arch/p7zip/files/p7zip-17.05-natspec.patch | 13 -------------
 app-arch/p7zip/p7zip-17.05-r1.ebuild           |  5 ++++-
 2 files changed, 4 insertions(+), 14 deletions(-)