Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628618 - dev-lang/perl-5.24.2 on cygwin: error while loading shared libraries (breaking emerge -e system during bootstrap-prefix)
Summary: dev-lang/perl-5.24.2 on cygwin: error while loading shared libraries (breakin...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 16:19 UTC by Didier Colle
Modified: 2017-08-25 13:53 UTC (History)
0 users

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


Attachments
sys-apps/coreutils-8.25 (build.log,48.24 KB, application/octet-stream)
2017-08-24 08:40 UTC, Didier Colle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Didier Colle 2017-08-22 16:19:23 UTC
I am trying to bootstrap prefix on cygwin with the bootstrap-prefix.sh script.
After stage3, emerge -e system is executed: this fails because emerging sys-apps/coreutils fails (build.log below). The error message suggests that there is a problem with perl not finding/being unable to load shared libraries.
Calling perl from directly from the command line gives a similar error message (now referring to libperl.5.24.2.dll.a instead to '?')
It seems libperl.5.24.2.dll.a is present in both the bin directory where perl.exe is situated as well as in usr/lib.
Adding execution permission to the latter instance doesn't help; neither copying copying the instance to /usr/lib (for the case perl would not care about the prefix directory).
It is striking how the error message start with "C:/..." instead of "/cygdrive/c/...": is that an indication of the underlying problem that perl is not accessing the fs in the normal way?

dcolle@yoga /prefix
$ usr/bin/perl.exe
C:/gentoo/prefix/usr/bin/perl.exe: error while loading shared libraries: libperl.5.24.2.dll.a: cannot open shared object file: No such file or directory

dcolle@yoga /prefix
$ find . -name libperl.5.24.2.dll.a -exec ls -l {} \;
-rwxr-xr-x+ 1 dcolle None 1994094 Aug 22 12:11 ./usr/bin/libperl.5.24.2.dll.a
-rw-r--r--+ 1 dcolle None 1994094 Aug 22 12:12 ./usr/lib/libperl.5.24.2.dll.a
lrwxrwxrwx 1 dcolle None 39 Aug 22 12:12 ./usr/lib/perl5/5.24.2/x86_64-cygwin/CORE/libperl.5.24.2.dll.a -> ../../../../../lib/libperl.5.24.2.dll.a

dcolle@yoga /prefix
$ chmod +x usr/lib/libperl.5.24.2.dll.a

dcolle@yoga /prefix
$ find . -name libperl.5.24.2.dll.a -exec ls -l {} \;
-rwxr-xr-x+ 1 dcolle None 1994094 Aug 22 12:11 ./usr/bin/libperl.5.24.2.dll.a
-rwxr-xr-x+ 1 dcolle None 1994094 Aug 22 12:12 ./usr/lib/libperl.5.24.2.dll.a
lrwxrwxrwx 1 dcolle None 39 Aug 22 12:12 ./usr/lib/perl5/5.24.2/x86_64-cygwin/CORE/libperl.5.24.2.dll.a -> ../../../../../lib/libperl.5.24.2.dll.a

dcolle@yoga /prefix
$ usr/bin/perl.exe
C:/gentoo/prefix/usr/bin/perl.exe: error while loading shared libraries: libperl.5.24.2.dll.a: cannot open shared object file: No such file or directory

dcolle@yoga /prefix
$ cp -i usr/lib/libperl.5.24.2.dll.a /usr/lib/

dcolle@yoga /prefix
$ usr/bin/perl.exe
C:/gentoo/prefix/usr/bin/perl.exe: error while loading shared libraries: libperl.5.24.2.dll.a: cannot open shared object file: No such file or directory

dcolle@yoga /prefix
$ mkdir -p /usr/lib/perl5/5.24.2/x86_64-cygwin/CORE

dcolle@yoga /prefix
$ ln -s usr/lib/libperl.5.24.2.dll.a /usr/lib/perl5/5.24.2/x86_64-cygwin/CORE/libperl.5.24.2.dll.a

dcolle@yoga /prefix
$ usr/bin/perl.exe
C:/gentoo/prefix/usr/bin/perl.exe: error while loading shared libraries: libperl.5.24.2.dll.a: cannot open shared object file: No such file or directory

$ tail -n 40 var/tmp/portage/sys-apps/coreutils-8.25/temp/build.log
  GEN      lib/wchar.h
  GEN      lib/wctype.h
  GEN      src/coreutils.h
  GEN      src/dircolors.h
  GEN      src/fs-is-local.h
  GEN      src/fs.h
C:/gentoo/prefix/usr/bin/perl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
C:/gentoo/prefix/usr/bin/perl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
WARNING: 'perl' is missing on your system.
         You might have modified some files without having the proper
         tools for further handling them.  Check the 'README' file, it
         often tells you about the needed prerequisites for installing
         this package.  You may also peek at any GNU archive site, in
         case some other package contains this missing 'perl' program.
WARNING: 'perl' is missing on your system.
         You might have modified some files without having the proper
         tools for further handling them.  Check the 'README' file, it
         often tells you about the needed prerequisites for installing
         this package.  You may also peek at any GNU archive site, in
         case some other package contains this missing 'perl' program.
make: *** [Makefile:14111: src/dircolors.h] Error 127
make: *** Waiting for unfinished jobs....
make: *** [Makefile:14158: src/fs-is-local.h] Error 127
C:/gentoo/prefix/usr/bin/perl.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
WARNING: 'perl' is missing on your system.
         You might have modified some files without having the proper
         tools for further handling them.  Check the 'README' file, it
         often tells you about the needed prerequisites for installing
         this package.  You may also peek at any GNU archive site, in
         case some other package contains this missing 'perl' program.
make: *** [Makefile:14165: src/fs.h] Error 127
 * ERROR: sys-apps/coreutils-8.25::gentoo_prefix failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-apps/coreutils-8.25::gentoo_prefix'`,
 * the complete build log and the output of `emerge -pqv '=sys-apps/coreutils-8.25::gentoo_prefix'`.
 * The complete build log is located at '/prefix/var/tmp/portage/sys-apps/coreutils-8.25/temp/build.log'.
 * The ebuild environment file is located at '/prefix/var/tmp/portage/sys-apps/coreutils-8.25/temp/environment'.
 * Working directory: '/prefix/var/tmp/portage/sys-apps/coreutils-8.25/work/coreutils-8.25'
 * S: '/prefix/var/tmp/portage/sys-apps/coreutils-8.25/work/coreutils-8.25'
Comment 1 Michael Haubenwallner (RETIRED) gentoo-dev 2017-08-22 17:26:42 UTC
Does it make a difference when you bootstrap (from scratch) with LATEST_TREE_YES=1 environment variable set?
At least my buildbot succeeded in bootstrapping this way two days ago...
Comment 2 Didier Colle 2017-08-22 19:17:44 UTC
That trick helped to get around bug 628176.
To be more precise, I did the following, starting from a brand new cygwin install:
LATEST_TREE_YES=1 ./bootstrap-prefix.sh

During the weekend, I ran in exactly the same problem on my private laptop....

Would there be an easy way to monitor/trace/log the process of loading the shared libraries? What path is perl.exe exactly trying to open: is it trying to open something that exists? If it does, is it using the right process (as it is on cygwin, I am not sure loading a DLL happens exactly the same way as loading libraries on regular linux)? I am still suspicious about the error msgs stating c:/... instead of /cygdrive/c/... and the library being called ....dll.a instead of simply ....dll
Comment 3 Fabian Groffen gentoo-dev 2017-08-23 06:40:09 UTC
@haubi: shall I bump the snapshot?
Comment 4 Michael Haubenwallner (RETIRED) gentoo-dev 2017-08-23 08:00:05 UTC
(In reply to Fabian Groffen from comment #3)
> @haubi: shall I bump the snapshot?

YesPlease, time to spread the (multi-platform) bug#619542 fix especially.
Comment 5 Fabian Groffen gentoo-dev 2017-08-23 09:40:09 UTC
done, up to you to close this bug (if applicable)
Comment 6 Didier Colle 2017-08-24 08:40:40 UTC
Created attachment 490382 [details]
sys-apps/coreutils-8.25
Comment 7 Didier Colle 2017-08-24 09:02:57 UTC
Started over again "LATEST_TREE_YES=1 ./bootstrap-prefix.sh" after removing the old prefix dir. Ended up with exactly the same issue.

Now I have attached the full build.log for the broken emerge of the sys-apps/coreutils-8.25 package. Unfortunately, the build.log for dev-lang/perl is not anymore present at this time: I assume that would be the more interesting one....

Please let me know what info I can provide you to diagnose the problem, in case you cannot reproduce the problem. I assume the stage[123].log files are of no use, as the problem occurs in a later phase?

For completeness:

dcolle@yoga /prefix
$ usr/bin/emerge --info dev-lang/perl
Portage 2.3.8-prefix (python 2.7.12-final-0, prefix/windows/cygwin/x64, gcc-5.4.0, unavailable, 2.8.2-gentoo-r0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: CYGWIN_NT-6.3-2.8.2-gentoo-r0-x86_64-64bit
Timestamp of repository gentoo_prefix: Wed, 23 Aug 2017 18:56:56 +0000
sh bash 4.3_p48-r1
ld GNU ld (GNU Binutils) 2.25.2
app-shells/bash:      4.3_p48-r1::gentoo_prefix
dev-lang/perl:        5.24.2::gentoo_prefix
dev-lang/python:      2.7.12::gentoo_prefix
dev-util/pkgconfig:   0.29.1::gentoo_prefix
sys-devel/autoconf:   2.69-r4::gentoo_prefix
sys-devel/automake:   1.15.1-r1::gentoo_prefix
sys-devel/binutils:   2.27::gentoo_prefix
sys-devel/gcc:        5.3.0::gentoo_prefix
sys-devel/gcc-config: 1.8-r01.1::gentoo_prefix
sys-devel/libtool:    2.4.6-r4::gentoo_prefix
sys-devel/make:       4.2.1-r1::gentoo_prefix
Repositories:

gentoo_prefix
    location: /prefix/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix
    priority: -1000

ACCEPT_KEYWORDS="~x64-cygwin"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-cygwin"
CFLAGS=" -O2 -pipe"
CHOST="x86_64-pc-cygwin"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/terminfo"
CXXFLAGS=" -O2 -pipe"
DISTDIR="/prefix/usr/portage/distfiles"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs case-insensitive-fs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS=""
MAKEOPTS="-j3"
PKGDIR="/prefix/usr/portage/packages"
PORTAGE_CONFIGROOT="/prefix/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/prefix/var/tmp"
USE="cracklib cxx modules ncurses nls prefix prefix-guest readline ssl unicode x64-cygwin zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Cygwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Winnt" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby22 ruby24" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

dev-lang/perl-5.24.2::gentoo_prefix was built with the following:
USE="(prefix) (prefix-guest) -berkdb -debug -doc -gdbm -ithreads"
LDFLAGS="-L/prefix/usr/lib"


dcolle@yoga /prefix
$ usr/bin/emerge --info sys-apps/coreutils
Portage 2.3.8-prefix (python 2.7.12-final-0, prefix/windows/cygwin/x64, gcc-5.4.0, unavailable, 2.8.2-gentoo-r0 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: CYGWIN_NT-6.3-2.8.2-gentoo-r0-x86_64-64bit
Timestamp of repository gentoo_prefix: Wed, 23 Aug 2017 18:56:56 +0000
sh bash 4.3_p48-r1
ld GNU ld (GNU Binutils) 2.25.2
app-shells/bash:      4.3_p48-r1::gentoo_prefix
dev-lang/perl:        5.24.2::gentoo_prefix
dev-lang/python:      2.7.12::gentoo_prefix
dev-util/pkgconfig:   0.29.1::gentoo_prefix
sys-devel/autoconf:   2.69-r4::gentoo_prefix
sys-devel/automake:   1.15.1-r1::gentoo_prefix
sys-devel/binutils:   2.27::gentoo_prefix
sys-devel/gcc:        5.3.0::gentoo_prefix
sys-devel/gcc-config: 1.8-r01.1::gentoo_prefix
sys-devel/libtool:    2.4.6-r4::gentoo_prefix
sys-devel/make:       4.2.1-r1::gentoo_prefix
Repositories:

gentoo_prefix
    location: /prefix/usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.prefix.bitzolder.nl/gentoo-portage-prefix
    priority: -1000

ACCEPT_KEYWORDS="~x64-cygwin"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-cygwin"
CFLAGS=" -O2 -pipe"
CHOST="x86_64-pc-cygwin"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/terminfo"
CXXFLAGS=" -O2 -pipe"
DISTDIR="/prefix/usr/portage/distfiles"
FCFLAGS=""
FEATURES="assume-digests binpkg-logs case-insensitive-fs collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix merge-sync multilib-strict news nostrip parallel-fetch preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged"
FFLAGS=""
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.UTF-8"
LDFLAGS=""
MAKEOPTS="-j3"
PKGDIR="/prefix/usr/portage/packages"
PORTAGE_CONFIGROOT="/prefix/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/prefix/var/tmp"
USE="cracklib cxx modules ncurses nls prefix prefix-guest readline ssl unicode x64-cygwin zlib" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="Cygwin" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse" KERNEL="Winnt" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7" RUBY_TARGETS="ruby22 ruby24" USERLAND="GNU" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-apps/coreutils-8.25::gentoo_prefix was built with the following:
USE="bootstrap kill (prefix) (prefix-guest) stdbuf (-acl) -caps -gmp -hostname -multicall -nls (-selinux) -static -uptime -vanilla -xattr"
LDFLAGS="-L/prefix/usr/lib"


dcolle@yoga /prefix
$ usr/bin/emerge -pqv dev-lang/perl
[ebuild   R   ] dev-lang/perl-5.24.2  USE="-berkdb -debug -doc -gdbm -ithreads"

dcolle@yoga /prefix
$ usr/bin/emerge -pqv sys-apps/coreutils
[ebuild   R   ] sys-apps/coreutils-8.25  USE="kill nls* stdbuf (-acl) -caps -gmp -hostname -multicall (-selinux) -static -uptime -vanilla -xattr"

btw: is there a less time consuming way to resume from this situation (failure in emerge -e system executed by the bootstrap-prefix script)?
Comment 8 Michael Haubenwallner (RETIRED) gentoo-dev 2017-08-24 14:50:46 UTC
(In reply to Didier Colle from comment #7)
> System uname: CYGWIN_NT-6.3-2.8.2-gentoo-r0-x86_64-64bit

Are you using Windows 8.1 (which edition), or Windows Server 2012r2 (like me)?

> btw: is there a less time consuming way to resume from this situation
> (failure in emerge -e system executed by the bootstrap-prefix script)?

Unfortunately, not a documented or automatic one. But you can try this:
$ /prefix/bin/bash -c 'source /prefix/etc/profile && emerge -avq --resume'
Comment 9 Michael Haubenwallner (RETIRED) gentoo-dev 2017-08-24 16:36:54 UTC
Actually, Cygwin (Windows) does not provide some kind of "embedded runpath", thus the dlls are located next to the executables in usr/bin/.

So the idea for usr/bin/perl.exe is to load usr/bin/libperl.5.24.2.dll.a.

dev-lang/perl is installed during stage3: Anything suspicious along libperl in /prefix/stage3.log?

Cygwin does provide some kind of 'strace'.
Try:
$ strace -o perl.strace.out /prefix/usr/bin/perl.exe -V

Is there a difference compared to:
$ env -i /bin/strace.exe -o strace.out /prefix/usr/bin/perl.exe -V
Comment 10 Didier Colle 2017-08-24 21:31:13 UTC
(In reply to Michael Haubenwallner from comment #8)
> (In reply to Didier Colle from comment #7)
> > System uname: CYGWIN_NT-6.3-2.8.2-gentoo-r0-x86_64-64bit
> 
> Are you using Windows 8.1 (which edition), or Windows Server 2012r2 (like
> me)?

Windows 8.1 Enterprise edition.
(@home: win10 home edition. As mentioned before, I have same problem on this machine).
Comment 11 Michael Haubenwallner (RETIRED) gentoo-dev 2017-08-25 10:02:09 UTC
Does your Cygwin (not Prefix) installation contain a /bin/cygcrypt-0.dll by chance?
Comment 12 Didier Colle 2017-08-25 13:02:12 UTC
(In reply to Michael Haubenwallner from comment #11)
> Does your Cygwin (not Prefix) installation contain a /bin/cygcrypt-0.dll by
> chance?

NO, it did not.
Running your strace suggestion, an exception was thrown and a dialog window was opened indicating this issue.
After installing the cygwin package crypt, calling the perl.exe command did not raise anymore the error.

> Unfortunately, not a documented or automatic one. But you can try this:
> $ /prefix/bin/bash -c 'source /prefix/etc/profile && emerge -avq --resume'
Executing also this suggestion, does not raise anymore an error message regarding perl. (Despite it ended up with another error during emerging sys-apps/coreutils: "/prefix/var/tmp/portage/sys-apps/coreutils-8.25/work/coreutils-8.25/build-aux/missing: line 81: makeinfo: command not found"... I shall restart the complete bootstrap process, to see if that helps... in case it does not I may end up filing another bug).

At least as temporary resolution, you may add the requirement to install the cygwin crypt package on https://wiki.gentoo.org/wiki/Prefix/Cygwin#Additional_packages , although I assume in the ideal world you do not want to have this dependency.

Thanks a lot for your help and patience!
Comment 13 Michael Haubenwallner (RETIRED) gentoo-dev 2017-08-25 13:53:33 UTC
(In reply to Didier Colle from comment #12)
> (In reply to Michael Haubenwallner from comment #11)
> > Does your Cygwin (not Prefix) installation contain a /bin/cygcrypt-0.dll by
> > chance?
> 
> NO, it did not.

> After installing the cygwin package crypt, calling the perl.exe command did
> not raise anymore the error.

So this one problem was that sys-libs/cygwin-crypt was removed before emerge -e system via emerge --depclean. Apparently I've fixed this yesterday in:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45d65f366877d7d45e567997e0a43a1008bb7d10

> > $ /prefix/bin/bash -c 'source /prefix/etc/profile && emerge -avq --resume'
> Executing also this suggestion, does not raise anymore an error message
> regarding perl. (Despite it ended up with another error during emerging
> sys-apps/coreutils:
> "/prefix/var/tmp/portage/sys-apps/coreutils-8.25/work/coreutils-8.25/build-
> aux/missing: line 81: makeinfo: command not found"...

Fixed this yesterday as well: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=19c6a4c2fcad84386b68cd24aaedc82b61254bb8

> I shall restart the complete bootstrap process,

Doesn't feel necessary for the moment - try this one instead:
$ /prefix/bin/bash --login
$ emerge --sync
$ emerge -avqn1 sys-libs/cygwin-crypt
$ emerge -avqn sys-apps/texinfo # work around (brand new) bug#628912
$ exit

It should continue to work now even when you remove that cygcrypt package from your host Cygwin installation again.

Now rerun the bootstrap-prefix.sh with same arguments as before: It shall continue with stage3 and detect nothing to do, followed by emerge -e @system, and finally create the startprefix script.

Thanks for testing, and enjoy Gentoo Prefix/Cygwin!