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

Bug 797517

Summary: [cygwin][prefix] app-arch/libarchive-3.5.1 broken
Product: Gentoo/Alt Reporter: Egor Y. Egorov <egorov_egor>
Component: OtherAssignee: Gentoo non-Linux Team <alt>
Status: CONFIRMED ---    
Severity: normal CC: floppym
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Other   
Package list:
Runtime testing required: ---
Attachments: test.bz2

Description Egor Y. Egorov 2021-06-22 09:24:50 UTC
On my system applications linked with libarchive are not work

Reproducible: Always

Steps to Reproduce:
1. emerge -1 libarchive
2. untar test.tbz2
3. make clean && make && ./test.exe
Actual Results:  
output is empty

Expected Results:  
output like:
 a = 0x8000003c0

after command (livarchive installed in cygwin root too)
cp /bin/cygarchive-13.dll ./
test work fine:
$ ./test
 a = 0x8000003c0
Comment 1 Egor Y. Egorov 2021-06-22 09:25:14 UTC
Created attachment 717615 [details]
Comment 2 Egor Y. Egorov 2021-06-22 11:32:00 UTC
Reproduced if libarchive merged with USE=nettle

If USE=-nettle - test work
Comment 3 Egor Y. Egorov 2021-06-22 11:52:02 UTC
emerge -1 nettle didn't help
Comment 4 Fabian Groffen gentoo-dev 2021-06-22 11:54:25 UTC
can't we just mask USE=nettle for libarchive here if that works?
Comment 5 Egor Y. Egorov 2021-06-23 03:07:10 UTC
I think this is the solution. At least until we find another solution.
Comment 6 Egor Y. Egorov 2021-06-23 06:24:03 UTC
I found what cygnettle-8.dll cyghogweed-6.dll are broken after rebasing on post_pkg_preinst fase. If execute ebuild nettle-3.7.3.ebuild clean install and copy builded dlls in prefix root manualy all work fine
Comment 7 Egor Y. Egorov 2021-06-23 07:00:43 UTC
The rebase was not the reason.
The problem was that the files cygnettle-8.dll cyghogweed-6.dll did not have execute permission.
Comment 8 Egor Y. Egorov 2021-06-23 07:55:40 UTC
Created attachment 717837 [details, diff]

Patch for dev-libs/nettle-3.7.3 solve issue for me
Comment 9 Fabian Groffen gentoo-dev 2021-06-23 08:00:45 UTC
@base: how about Egor's nettle patch?  It seems to only affect dll targets, so shouldn't affect any other target than windows.
Comment 10 Egor Y. Egorov 2021-06-23 08:09:39 UTC
Some problem for app-crypt/rhash
$ ls -l `qlist app-crypt/rhash | grep -e 'cyg.*dll'`
-rw-r--r-- 1 e_egorov Domain Users 386813 июн 23 14:03 /home/e_egorov/gentoo_new/usr/bin/cygrhash-0.dll

Need to create new bug?
Comment 11 Fabian Groffen gentoo-dev 2021-06-23 08:11:33 UTC
yes, although we could also create a post script in the cygwin profiles to just make any *.dll executable?  Then we don't need to patch anything
Comment 12 Egor Y. Egorov 2021-06-23 08:21:52 UTC
(In reply to Fabian Groffen from comment #11)
> yes, although we could also create a post script in the cygwin profiles to
> just make any *.dll executable?  Then we don't need to patch anything

I like this idea
Comment 13 Fabian Groffen gentoo-dev 2021-06-23 08:27:19 UTC
dropping @base, we will work around this in a more generic manner, thanks
Comment 14 Mike Gilbert gentoo-dev 2021-06-23 14:00:01 UTC
Wouldn't it be better to patch the build system so that it works out of the box on non-Gentoo systems as well?