Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 336910 - Cygwin - Shared libraries not found -> Solution: extend $PATH
Summary: Cygwin - Shared libraries not found -> Solution: extend $PATH
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: x86 Other
: High normal (vote)
Assignee: Gentoo Prefix
URL: http://en.gentoo-wiki.com/wiki/Prefix...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-12 11:09 UTC by Al
Modified: 2014-01-15 10:10 UTC (History)
1 user (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 Al 2010-09-12 11:09:56 UTC
While bootstrapping Prefix on Cygwin several exectables can't find shared libraries. 

On Windows such libraries are searched in $PATH, but the automatically generated $PATH on Prefix doesn't include $PREFIX/lib and $PREFIX/usr/lib, where many libs are installed.





Reproducible: Always

Steps to Reproduce:
While bootstrapping Cygwin in prefix disable gen_usr_ldscript, as the script still breaks all. 

 gen_usr_ldscript() {
    return 0
 }
Actual Results:  
Bootstrapping breaks, because libraries can't be loaded.

Expected Results:  
Examples where shared libs are installed.

*/lib/libbz2.so
*/usr/lib/cyghistory6.dll
*/usr/lib/cygreadline6.dll
*/usr/lib/libperl.so
*/usr/lib/libz.so

*/usr/bin/cygcharset-1.dll*
*/usr/bin/cygexpat-1.dll*
*/usr/bin/cygffi-5.dll*


I can't come up with a solution here, as I still don't know in detail which scripts generate the pathes.

Workaround: Fix a) AND b).

 a) $PREFIX/etc/env.d/00basic

PATH="/home/prefix/gentoo/usr/lib:/home/prefix/gentoo/lib:/home/prefix/gentoo/opt/bin:/home/

 b) $PREFIX/usr/portage/profiles/prefix/windows/cygwin/1.7/x86/make.defaults

EPREFIX="/home/prefix/gentoo"
DEFAULT_PATH="${DEFAULT_PATH}:${EPREFIX}/lib:${EPREFIX}/usr/lib"

Alternatively one could fix gen_usr_ldscript to generate working links to bin dirs, but that would be more work and isn't the real purpose of the scipt.
Comment 1 Greg Turner 2012-08-11 19:16:13 UTC
see 

https://github.com/gmt/gmt-cygwin-overlay/blob/master/portage_diffs/latest/eclass

which contains a real solution (nb: and other non-solution stuff).  At some point I will split this out and send it to the portage-dev mailing list but, as implemented, I think it's still a bit too ugly.
Comment 2 Fabian Groffen gentoo-dev 2014-01-14 19:53:35 UTC
If Greg isn't driving this, I'm affraid noone will atm.
Comment 3 Greg Turner 2014-01-15 10:10:35 UTC
(In reply to Fabian Groffen from comment #2)
> If Greg isn't driving this, I'm affraid noone will atm.

Indeed, I am not behind the wheel on Cygwin ATM.  I do plan to get back there sooner or later but many things need re-evaluating, a lot has changed.