Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.88k stars 530 forks source link

Installing perl on Windows 10, MSYS2: Configure fails with: /proc/curproc/exe: No such file or directory #18037

Open hakonhagland opened 3 years ago

hakonhagland commented 3 years ago

I am trying to install a debug version of perl 5.32.0 on Windows 10, using MSYS2.

$ wget https://www.cpan.org/src/5.0/perl-5.32.0.tar.gz
$ tar zxvf perl-5.32.0.tar.gz
$ cd perl-5.32.0.tar.gz
$ sh Configure -de -Dprefix=$HOME/myperl -DDEBUGGING -Dman1dir=none -Dman3dir=none -Doptimize=-g3 -Accflags=-g3

Beginning of configuration questions for perl5.

Checking echo to see how to suppress newlines...
...using -n.
The star should be here-->*

First let's make sure your kit is complete.  Checking...
Looks good...

This installation shell script will examine your system and ask you questions
to determine how the perl5 package should be installed. If you get
stuck on a question, you may use a ! shell escape to start a subshell or
execute a command.  Many of the questions will have default answers in square
brackets; typing carriage return will give you the default.

On some of the questions which ask for file or directory names you are allowed
to use the ~name construct to specify the login directory belonging to "name",
even if you don't have a shell which knows about that.  Questions where this is
allowed will be marked "(~name ok)".

[Type carriage return to continue]

The prompter used in this script allows you to use shell variables and
backticks in your answers.  You may use $1, $2, etc...  to refer to the words
in the default answer, as if the default line was a set of arguments given to a
script shell.  This means you may also use $* to repeat the whole default line,
so you do not have to re-type everything to add something to the default.

Every time there is a substitution, you will have to confirm.  If there is an
error (e.g. an unmatched backtick), the default answer will remain unchanged
and you will be prompted again.

If you are in a hurry, you may run 'Configure -d'.  This will bypass nearly all
the questions and use the computed defaults (or the previous answers if there
was already a config.sh file). Type 'Configure -h' for a list of options.
You may also start interactively and then answer '& -d' at any prompt to turn
on the non-interactive behaviour for the remainder of the execution.

[Type carriage return to continue]

Much effort has been expended to ensure that this shell script will run on any
Unix system.  If despite that it blows up on yours, your best bet is to edit
Configure and run it again.  If you can't run Configure for some reason,
you'll have to generate a config.sh file by hand.  Whatever problems you
have, let me (https://github.com/Perl/perl5/issues) know how I blew it.

This installation script affects things in two ways:

1) it may do direct variable substitutions on some of the files included
   in this kit.
2) it builds a config.h file for inclusion in C programs.  You may edit
   any of these files as the need arises after running this script.

If you make a mistake on a question, there is no easy way to back up to it
currently.  The easiest thing to do is to edit config.sh and rerun all the SH
files.  Configure will offer to let you do this before it runs the SH files.

[Type carriage return to continue]

Locating common programs...
awk is in /usr/bin/awk.
cat is in /usr/bin/cat.
chmod is in /usr/bin/chmod.
comm is in /usr/bin/comm.
cp is in /usr/bin/cp.
echo is in /usr/bin/echo.
expr is in /usr/bin/expr.
grep is in /usr/bin/grep.
ls is in /usr/bin/ls.
mkdir is in /usr/bin/mkdir.
rm is in /usr/bin/rm.
sed is in /usr/bin/sed.
sort is in /usr/bin/sort.
touch is in /usr/bin/touch.
tr is in /usr/bin/tr.
uniq is in /usr/bin/uniq.

Don't worry if any of the following aren't found...
ar is in /usr/bin/ar.
bison is in /usr/bin/bison.
I don't see byacc out there, offhand.
cpp is in /usr/bin/cpp.
I don't see csh out there, either.
date is in /usr/bin/date.
egrep is in /usr/bin/egrep.
I don't see gmake out there, either.
gzip is in /usr/bin/gzip.
less is in /usr/bin/less.
ln is in /usr/bin/ln.
make is in /usr/bin/make.
more is in /usr/bin/more.
nm is in /usr/bin/nm.
nroff is in /usr/bin/nroff.
perl is in /usr/bin/perl.
pg is in /usr/bin/pg.
test is in /usr/bin/test.
uname is in /usr/bin/uname.
I don't see zip out there, either.
Substituting less -R for less.
Using the test built into your sh.

Checking compatibility between /usr/bin/echo.exe and builtin echo (if any)...
They are compatible.  In fact, they may be identical.
The following message is sponsored by

  Dresden.pm<--The stars should be here.

Dear Perl user, system administrator or package
maintainer, the Perl community sends greetings to
you. Do you (emblematical) greet back [Y/n]? n

Symbolic links are supported.

Checking how to test for symbolic links...
/usr/bin/ln: failed to create symbolic link 'sym': No such file or directory
Your builtin 'test -h' may be broken.
Trying external '/usr/bin/test -h'.
External '/usr/bin/test -h' is broken, too.
I do not know how you can test for symbolic links.
Checking for cross-compile
No targethost for running compiler tests against defined, running locally

Good, your tr supports [:lower:] and [:upper:] to convert case.
Using [:upper:] and [:lower:] to convert case.

First time through, eh?  I have some defaults handy for some systems
that need some extra help getting the Configure answers right:

aix           dragonfly       irix_5            nonstopux     sunos_4_0
aix_3         dynix           irix_6            openbsd       sunos_4_1
aix_4         dynixptx        irix_6_0          opus          super-ux
altos486      epix            irix_6_1          os2           svr4
amigaos       esix4           isc               os390         svr5
atheos        fps             isc_2             os400         ti1500
aux_3         freebsd         linux             posix-bc      ultrix_4
bitrig        freemint        linux-android     qnx           umips
bsdos         gnu             lynxos            riscos        unicos
catamount     gnukfreebsd     midnightbsd       sco           unicosmk
convexos      gnuknetbsd      minix             sco_2_3_0     unisysdynix
cxux          greenhills      mips              sco_2_3_1     utekv
cygwin        haiku           mirbsd            sco_2_3_2     uwin
darwin        hpux            mpc               sco_2_3_3     vos
dcosx         i386            ncr_tower         sco_2_3_4
dec_osf       interix         netbsd            solaris_2
dos_djgpp     irix_4          newsos4           stellar

You may give one or more space-separated answers, or "none" if appropriate.
If you have a handcrafted Policy.sh file or a Policy.sh file generated by a
previous run of Configure, you may specify it as well as or instead of
OS-specific hints.  If hints are provided for your OS, you should use them:
although Perl can probably be built without hints on many platforms, using
hints often improve performance and may enable features that Configure can't
set up on its own. If there are no hints that match your OS, specify "none";
DO NOT give a wrong version or a wrong OS.

Which of these apply, if any? [none]

Configure uses the operating system name and version to set some defaults.
The default value is probably right if the name rings a bell. Otherwise,
since spelling matters for me, either accept the default or answer "none"
to leave it blank.

Operating system name? [msys_nt-10.0-18363]

Operating system version? [3.1.5-340.x86_64]

By default, perl5 will be installed in /home/hakon/myperl/bin, manual pages
under /home/hakon/myperl/man, etc..., i.e. with /home/hakon/myperl as prefix for all
installation directories. Typically this is something like /usr/local.
If you wish to have binaries under /usr/bin but other parts of the
installation under /usr/local, that's ok: you will be prompted
separately for each of the installation directories, the prefix being
only used to set the defaults.

Installation prefix to use? (~name ok) [/home/hakon/myperl]
Directory /home/hakon/myperl doesn't exist.  Use that name anyway? [y]

AFS does not seem to be running...

In some special cases, particularly when building perl5 for distribution,
it is convenient to distinguish the directory in which files should be
installed from the directory (/home/hakon/myperl) in which they will
eventually reside.  For most users, these two directories are the same.

What installation prefix should I use for installing files? (~name ok)
[/home/hakon/myperl]
Directory /home/hakon/myperl doesn't exist.  Use that name anyway? [y]

Getting the current patchlevel...
(You have perl5 version 32 subversion 0.)

Perl can be built to offer a form of threading support on some systems
To do so, Configure can be run with -Dusethreads.

Note that Perl built with threading support runs slightly slower
and uses slightly more memory than plain Perl.

If this doesn't make any sense to you, just accept the default 'n'.
Build a threading Perl? [n]

Perl can be built so that multiple Perl interpreters can coexist
within the same Perl executable.

If this doesn't make any sense to you, just accept the default 'n'.
Build Perl for multiplicity? [n]

Use which C compiler? [cc]

Hmm...  Looks kind of like a BSD system, but we'll see...

Congratulations.  You aren't running Eunice.

It's not Xenix...

Nor is it Venix...

Checking for GNU cc in disguise and/or its version number...
You are using GNU cc 9.3.0.

Hmm...  Doesn't look like a MIPS system.

Now, how can we feed standard input to your C preprocessor...
Maybe "cc -E" will work...
Nope...maybe "cc -E -" will work...
Yup, it does.

Some systems have incompatible or broken versions of libraries.  Among
the directories listed in the question below, please remove any you
know not to be holding relevant libraries, and add any that are needed.
Say "none" for none.

Directories to use for library searches?
[/usr/lib/gcc/x86_64-pc-msys/9.3.0/include-fixed /usr/lib /usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../lib/../include/w32api]

On some systems, shared libraries may be available.  Answer 'none' if
you want to suppress searching of shared libraries for the remainder
of this configuration.

What is the file extension used for shared libraries? [so]

Some dynamic loaders assume that the *basename* of shared library filenames
are globally unique.  We'll default this to undef as we assume your system
is not this weird. Set to defined if you're on one of them.

Make shared library basenames unique? [n]

Perl can be built to use the SOCKS proxy protocol library.  To do so,
Configure must be run with -Dusesocks.  If you use SOCKS you also need
to use the PerlIO abstraction layer, this will be implicitly selected.

If this doesn't make any sense to you, just accept the default 'n'.
Build Perl for SOCKS? [n]

Perl can be built to take advantage of long doubles which
(if available) may give more accuracy and range for floating point numbers.

If this doesn't make any sense to you, just accept the default 'n'.
Try to use long doubles if available? [n]

Checking for optional libraries...
No -lcl.
Found -lpthread.
No -lsocket.
No -lbind.
No -linet.
No -lnsl.
No -lndbm.
No -lgdbm.
No -ldbm.
No -ldb.
No -lmalloc.
Found -ldl.
No -lld.
No -lsun.
Found -lm.
Found -lcrypt.
No -lsec.
Found -lutil.
Found -lc.
No -lcposix.
No -lposix.
No -lucb.
No -lbsd.
No -lBSD.

In order to compile perl5 on your machine, a number of libraries
are usually needed.  Include any other special libraries here as well.
Say "none" for none.  The default list is almost always right.

What libraries to use? [-lpthread -ldl -lm -lcrypt -lutil -lc]

By default, perl5 compiles with the -O flag to use the optimizer.
Alternately, you might want to use the symbolic debugger, which uses
the -g flag (on traditional Unix systems).  Either flag can be
specified here.  To use neither flag, specify the word "none".

What optimizer/debugger flag should be used? [-g3]

Checking if your compiler accepts -fno-strict-aliasing
Yes, it does.

Checking if your compiler accepts -pipe
Yes, it does.

Checking if your compiler accepts -fstack-protector-strong
Yes, it does.

Your C compiler may want other flags.  For this question you should include
-I/whatever and -DWHATEVER flags and any other flags used by the C compiler,
but you should NOT include libraries or ld flags like -lwhatever.  If you
want perl5 to honor its debug switch, you should include -DDEBUGGING here.
Your C compiler might also need additional flags, such as -D_POSIX_SOURCE.

To use no flags, specify the word "none".

Any additional cc flags?
[-g3 -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong]

Let me guess what the preprocessor flags are...
They appear to be: -g3 -fwrapv -DDEBUGGING -fno-strict-aliasing -pipe -fstack-protector-strong

Your C linker may need flags.  For this question you should
include -L/whatever and any other flags used by the C linker, but you
should NOT include libraries like -lwhatever.

Make sure you include the appropriate -L/path flags if your C linker
does not normally search all of the directories you specified above,
namely
        /usr/lib/gcc/x86_64-pc-msys/9.3.0/include-fixed /usr/lib /usr/lib/gcc/x86_64-pc-msys/9.3.0/../../../../lib/../include/w32api
To use no flags, specify the word "none".

Any additional ld flags (NOT including libraries)?
[ -fstack-protector-strong]

Checking your choice of C compiler and flags for coherency...
OK, that should do.

Checking to see how big your integers are...
Your integers are 4 bytes long.
Your long integers are 8 bytes long.
Your short integers are 2 bytes long.

Checking to see if you have long long...
You have long long.

Checking to see how big your long longs are...
Your long longs are 8 bytes long.
(That isn't any different from an ordinary long.)

Computing filename position in cpp output for #include directives...
Your cpp writes the filename in the third field of the line.

<inttypes.h> found.

Checking to see if you have int64_t...
You have int64_t.

Checking which 64-bit integer type we could use...
We could use 'long' for 64-bit integers.

You have natively 64-bit long integers.

You may also choose to try maximal 64-bitness.  It means using as much
64-bitness as possible on the platform.  This in turn means even more
binary incompatibilities.  On the other hand, your platform may not
have any more 64-bitness available than what you already have chosen.

If this doesn't make any sense to you, just accept the default 'y'.
(The default has been chosen based on your configuration.)
Try to use maximal 64-bit support, if available? [y]

Checking if your C library has broken 64-bit functions...
Your C library's 64-bit functions are ok.

Checking for GNU C Library...
You are not using the GNU C Library

I can use /usr/bin/nm to extract the symbols from your C libraries. This
is a time consuming task which may generate huge output on the disk (up
to 3 megabytes) but that should make the symbols extraction faster. The
alternative is to skip the 'nm' extraction part and to compile a small
test program instead to determine whether each symbol is present. If
you have a fast C compiler and/or if your 'nm' output cannot be parsed,
this may be the best solution.

You probably shouldn't let me use 'nm' if you are using the GNU C Library.

Shall I use /usr/bin/nm to extract C symbols from the libraries? [y]

Your C library seems to be in /usr/lib/libc.a.  That's fine.

If the guess above is wrong (which it might be if you're using a strange
compiler, or your machine supports multiple models), you can override it here.

Where is your C library? [/usr/lib/libc.a]

Extracting names from the following files for later perusal:

        /usr/lib/libc.a
        /usr/lib/libcrypt.a
        /usr/lib/libdl.a
        /usr/lib/libm.a
        /usr/lib/libpthread.a
        /usr/lib/libutil.a

This may take a while.....done.

Checking for C++...
You are not using a C++ compiler.

Checking to see how big your double precision numbers are...
Your double is 8 bytes long.

Checking to see if you have long double...
You have long double.

ldexpl() found.

Checking to see how big your long doubles are...
Your long doubles are 16 bytes long.
Checking the kind of long doubles you have...
You have x86 80-bit little endian long doubles.

What is your architecture name [x86_64-msys_nt-10.0-18363]
Add the Perl API version to your archname? [n]
This architecture is naturally 64-bit, not changing architecture name.

Pathname where the public executables will reside? (~name ok)
[/home/hakon/myperl/bin]
Directory /home/hakon/myperl/bin doesn't exist.  Use that name anyway? [y]

Would you like to build Perl so that the installation is relocatable, so that
library paths in @INC are determined relative to the path of the perl binary?
This is not advised for system Perl installs, or if you need to run setid
scripts or scripts under taint mode.

If this doesn't make any sense to you, just accept the default 'n'.
Use relocatable @INC? [n]

There are some auxiliary files for perl5 that need to be put into a
private library directory that is accessible by everyone.

Pathname where the private library files will reside? (~name ok)
[/home/hakon/myperl/lib/5.32.0]

Perl5 contains architecture-dependent library files.  If you are
sharing libraries in a heterogeneous environment, you might store
these files in a separate location.  Otherwise, you can just include
them with the rest of the public library files.

Where do you want to put the public architecture-dependent libraries? (~name ok)
[/home/hakon/myperl/lib/5.32.0/x86_64-msys_nt-10.0-18363]

Some kernels have a bug that prevents setuid #! scripts from being
secure.  Some sites have disabled setuid #! scripts because of this.

First let's decide if your kernel supports secure setuid #! scripts.
(If setuid #! scripts would be secure but have been disabled anyway,
don't say that they are secure if asked.)

If you are not sure if they are secure, I can check but I'll need a
username and password different from the one you are using right now.
If you don't have such a username or don't want me to test, simply
enter 'none'.

Other username to test security of setuid scripts with? [none]
I'll assume setuid scripts are *not* secure.
Does your kernel have *secure* setuid scripts? [n]
Looking for a previously installed perl5.005 or later...
Using /usr/bin/perl.

After perl5 is installed, you may wish to install various
add-on modules and utilities.  Typically, these add-ons will
be installed under /home/hakon/myperl with the rest
of this package.  However, you may wish to install such add-ons
elsewhere under a different prefix.

If you do not wish to put everything under a single prefix, that's
ok.  You will be prompted for the individual locations; this siteprefix
is only used to suggest the defaults.

The default should be fine for most people.

Installation prefix to use for add-on modules and utilities? (~name ok)
[/home/hakon/myperl]

The installation process will create a directory for
site-specific extensions and modules.  Most users find it convenient
to place all site-specific files in this directory rather than in the
main distribution directory.

Pathname for the site-specific library files? (~name ok)
[/home/hakon/myperl/lib/site_perl/5.32.0]

In order to ease the process of upgrading, this version of perl
can be configured to use modules built and installed with earlier
versions of perl that were installed under /home/hakon/myperl.  Specify here
the list of earlier versions that this version of perl should check.
If Configure detected no earlier versions of perl installed under
/home/hakon/myperl, then the list will be empty.  Answer 'none' to tell perl
to not search earlier versions.

The default should almost always be sensible, so if you're not sure,
just accept the default.
List of earlier versions to include in @INC? [none]

<malloc/malloc.h> NOT found.

<malloc.h> found.

Checking to see how big your pointers are...
Your pointers are 8 bytes long.

Do you wish to wrap malloc calls to protect against potential overflows? [n]

Do you wish to attempt to use the malloc that comes with perl5? [n]

Your system wants malloc to return 'void *', it would seem.
Your system uses void free(), it would seem.

The installation process will also create a directory for
architecture-dependent site-specific extensions and modules.

Pathname for the site-specific architecture-dependent library files? (~name ok)
[/home/hakon/myperl/lib/site_perl/5.32.0/x86_64-msys_nt-10.0-18363]

The installation process will also create a directory for
vendor-supplied add-ons.  Vendors who supply perl with their system
may find it convenient to place all vendor-supplied files in this
directory rather than in the main distribution directory.  This will
ease upgrades between binary-compatible maintenance versions of perl.

Of course you may also use these directories in whatever way you see
fit.  For example, you might use them to access modules shared over a
company-wide network.

The default answer should be fine for most people.
This causes further questions about vendor add-ons to be skipped
and no vendor-specific directories will be configured for perl.

Do you want to configure vendor-specific add-on directories? [n]

Lastly, you can have perl look in other directories for extensions and
modules in addition to those already specified.
These directories will be searched after
        /home/hakon/myperl/lib/site_perl/5.32.0/x86_64-msys_nt-10.0-18363
        /home/hakon/myperl/lib/site_perl/5.32.0

Enter a colon-separated set of extra paths to include in perl's @INC
search path, or enter 'none' for no extra paths.

Colon-separated list of additional directories for perl to search? [none]

Perl can be built to support DTrace on platforms that support it.
DTrace is a diagnosis and performance analysis tool from Sun.

If this doesn't make any sense to you, just accept the default.
Support DTrace if available? [n]

Perl can be built with extra modules or bundles of modules which
will be fetched from the CPAN and installed alongside Perl.

Notice that you will need access to the CPAN; either via the Internet,
or a local copy, for example a CD-ROM or a local CPAN mirror.  (You will
be asked later to configure the CPAN.pm module which will in turn do
the installation of the rest of the extra modules or bundles.)

Notice also that if the modules require any external software such as
libraries and headers (the libz library and the zlib.h header for the
Compress::Zlib module, for example) you MUST have any such software
already installed, this configuration process will NOT install such
things for you.

If this doesn't make any sense to you, just accept the default 'n'.
Install any extra modules (y or n)? [n]

If you wish to install html files for programs in Perl5, indicate
the appropriate directory here.  To skip installing html files,
answer "none".
Directory for the main Perl5 html pages? (~name ok) [none]

If you wish to install html files for modules associated with Perl5,
indicate the appropriate directory here.  To skip installing html files,
answer "none".
Directory for the Perl5 module html pages? (~name ok) [none]

Many scripts expect perl to be installed as /usr/bin/perl.

If you want to, I can install the perl you are about to compile
as /usr/bin/perl (in addition to /home/hakon/myperl/bin/perl).

However, please note that because you already have a /usr/bin/perl,
overwriting that with a new Perl would very probably cause problems.
Therefore I'm assuming you don't want to do that (unless you insist).

Do you want to install perl as /usr/bin/perl? [n]

dlopen() found.

<unistd.h> found.

Do you wish to use dynamic loading? [y]
The following dynamic loading files are available:
ext/DynaLoader/dl_aix.xs      ext/DynaLoader/dl_dlopen.xs  ext/DynaLoader/dl_freemint.xs  ext/DynaLoader/dl_none.xs     ext/DynaLoader/dl_vms.xs
ext/DynaLoader/dl_dllload.xs  ext/DynaLoader/dl_dyld.xs    ext/DynaLoader/dl_hpux.xs      ext/DynaLoader/dl_symbian.xs  ext/DynaLoader/dl_win32.xs
Source file to use for dynamic loading [ext/DynaLoader/dl_dlopen.xs]

Some systems may require passing special flags to cc -c to
compile modules that will be used to create a shared library.
To use no flags, say "none".

Any special flags to pass to cc -c to compile shared library modules?
[-fpic]

Some systems use ld to create libraries that can be dynamically loaded,
while other systems (such as those using ELF) use cc.

I'll use ld to build dynamic libraries.
What command should be used to create dynamic libraries? [ld]

Some systems may require passing special flags to ld to create a
library that can be dynamically loaded.  If your ld flags include
-L/other/path options to locate libraries outside your loader's normal
search path, you may need to specify those -L options here as well.  To
use no flags, say "none".

Any special flags to pass to ld to create a dynamically loaded library?
[none -fstack-protector-strong]

Some systems may require passing special flags to cc to indicate that
the resulting executable will use dynamic linking.  To use no flags,
say "none".

Any special flags to pass to cc to use dynamic linking? [none]

The perl executable is normally obtained by linking perlmain.c with
libperl.a, any static extensions (usually just DynaLoader), and
any other libraries needed on this system (such as -lm, etc.).  Since
your system supports dynamic loading, it is probably possible to build
a shared libperl.so.  If you will have more than one executable linked
to libperl.so, this will significantly reduce the size of each
executable, but it may have a noticeable effect on performance.  The
default is probably sensible for your system.

Build a shared libperl.so (y/n) [n]

System manual is in /usr/share/man/man1.

Perl5 has manual pages available in source form.
If you don't want the manual sources installed, answer 'none'.

Where do the main Perl5 manual pages (source) go? (~name ok) [none]

You can have filenames longer than 14 characters.

Perl5 has manual pages for many of the library modules.
If you don't want the manual sources installed, answer 'none'.

Where do the perl5 library man pages (source) go? (~name ok) [none]

Figuring out host name...
Maybe "hostname" will work...
Your host name appears to be "DESKTOP-43CR0B8". Right? [y]
(Normalizing case in your host name)
(You do not have fully-qualified names in the hosts database)
(No help from resolv.conf either -- attempting clever guess)
(Lost all hope -- silly guess then)

What is your domain name? [.nonet]
(Normalizing case in your domain name)

I need to get your e-mail address in Internet format if possible, i.e.
something like user@host.domain. Please answer accurately since I have
no easy means to double check it. The default value provided below
is most probably close to reality but may not be valid from outside
your organization...

What is your e-mail address? [hakon@desktop-43cr0b8.nonet]

If you or somebody else will be maintaining perl at your site, please
fill in the correct e-mail address here so that they may be contacted
if necessary. Currently, the "perlbug" program included with perl
will send mail to this address in addition to perlbug@perl.org. You may
enter "none" for no administrator.

Perl administrator e-mail address [hakon@desktop-43cr0b8.nonet]

Do you want to use a version number suffix for installed binaries? This
will install 'perl5.32.0' instead of 'perl', and likewise for other
binaries like 'perldoc' and 'cpan'. This allows many versions of perl
to be installed side-by-side. Unless you are a developer, you probably
do *not* want to do this.
Do you want to use a version number suffix for installed binaries? [n]

I can use the #! construct to start perl on your system. This will
make startup of perl scripts faster, but may cause problems if you
want to share those scripts and perl is not in a standard place
(/home/hakon/myperl/bin/perl) on all your platforms. The alternative
is to force a shell by starting the script with a single ':' character.

What shall I put after the #! to start up perl ("none" to not use #!)?
[/home/hakon/myperl/bin/perl]
I'll use #!/home/hakon/myperl/bin/perl to start perl scripts.

Some installations have a separate directory just for executable scripts so
that they can mount it across multiple architectures but keep the scripts in
one spot.  You might, for example, have a subdirectory of /usr/share for this.
Or you might just lump your scripts in with all your other executables.

Where do you keep publicly executable scripts? (~name ok)
[/home/hakon/myperl/bin]
Directory /home/hakon/myperl/bin doesn't exist.  Use that name anyway? [y]
Pathname where the add-on public executables should be installed? (~name ok)
[/home/hakon/myperl/bin]
Directory /home/hakon/myperl/bin doesn't exist.  Use that name anyway? [y]
Pathname where the site-specific html pages should be installed? (~name ok)
[none]
Pathname where the site-specific library html pages should be installed? (~name ok)
[none]
Pathname where the site-specific manual pages should be installed? (~name ok)
[none]
Pathname where the site-specific library manual pages should be installed? (~name ok)
[none]
Pathname where add-on public executable scripts should be installed? (~name ok)
[/home/hakon/myperl/bin]

backtrace() NOT found.

Perl can be built to use 'fast stdio', which means using the stdio
library but also directly manipulating the stdio buffers to enable
faster I/O.  Using stdio is better for backward compatibility (especially
for Perl extensions), but on the other hand since Perl 5.8 the 'perlio'
interface has been preferred instead of stdio.

If this doesn't make any sense to you, just accept the default 'n'.
Use the "fast stdio" if available? [n]

Looking for the type used for lseek's offset on this system.
off_t found.

Checking to see how big your file offsets are...
Your file offsets are 8 bytes long.

Looking for the type for file position used by fsetpos().
fpos_t found.

Checking the size of fpos_t...
Your fpos_t is 8 bytes long.

You can have files larger than 2 gigabytes.

qgcvt() NOT found.
Checking the kind of doubles you have...
You have IEEE 754 64-bit little endian doubles.

Checking how to print long doubles...
We will use %Lf.

Checking for an efficient way to convert floats to strings.
Trying gconvert...
gconvert NOT found.
Trying gcvt...
gcvt() found.
gcvt oddity:  Expected 0.0001, got 1e-04
...But gcvt didn't work as I expected.
Trying sprintf...
sprintf() found.
I'll use sprintf to convert floats into a string.

fwalk() NOT found.

accept4() found.

access() found.

<unistd.h> defines the *_OK access constants.

accessx() NOT found.

acosh() found.

aintl() NOT found.

alarm() found.

ctime64() NOT found.

localtime64() NOT found.

gmtime64() NOT found.

mktime64() NOT found.

difftime64() NOT found.

asctime64() NOT found.

<pthread.h> found.

<sys/types.h> found.

<sys/select.h> found.

Testing to see if we should include <sys/time.h>.
I'm now running the test program....
Succeeded with -DI_SYSTIME -DS_TIMEVAL
We'll include <sys/time.h>.

Checking to see if your struct tm has tm_zone field...
Yes, it does.

Checking to see if your struct tm has tm_gmtoff field...
Yes, it does.

asctime_r() found.

asinh() found.

atanh() found.

atolf() NOT found.

atoll() found.

Checking whether your compiler can handle __attribute__((format)) ...
Your C compiler supports __attribute__((format)).

Checking whether your compiler allows __printf__ format to be null ...
Your C compiler allows __printf__ format to be null.

Checking whether your compiler can handle __attribute__((malloc)) ...
Your C compiler supports __attribute__((malloc)).

Checking whether your compiler can handle __attribute__((nonnull(1))) ...
Your C compiler supports __attribute__((nonnull)).

Checking whether your compiler can handle __attribute__((noreturn)) ...
Your C compiler supports __attribute__((noreturn)).

Checking whether your compiler can handle __attribute__((pure)) ...
Your C compiler supports __attribute__((pure)).

Checking whether your compiler can handle __attribute__((unused)) ...
Your C compiler supports __attribute__((unused)).

Checking whether your compiler can handle __attribute__((deprecated)) ...
Your C compiler supports __attribute__((deprecated)).

Checking whether your compiler can handle __attribute__((warn_unused_result)) ...
Your C compiler supports __attribute__((warn_unused_result)).

Checking whether your compiler can handle __attribute__((always_inline)) ...
Your C compiler supports __attribute__((always_inline)).

getpgrp() found.

Checking to see which flavor of getpgrp is in use...
You have to use getpgrp() instead of getpgrp(pid).

setpgrp() found.

Checking to see which flavor of setpgrp is in use...
You have to use setpgrp() instead of setpgrp(pid,pgrp).

Checking whether your compiler can handle __builtin_add_overflow ...
Your C compiler supports __builtin_add_overflow.

Checking whether your compiler can handle __builtin_sub_overflow ...
Your C compiler supports __builtin_sub_overflow.

Checking whether your compiler can handle __builtin_mul_overflow ...
Your C compiler supports __builtin_mul_overflow.

Checking whether your compiler can handle __builtin_choose_expr ...
All good!
Your C compiler supports __builtin_choose_expr.

Checking whether your compiler can handle __builtin_expect ...
Your C compiler supports __builtin_expect.
Checking for C99 variadic macros.
You have C99 variadic macros.

You have void (*signal())().

Checking whether your C compiler can cast large floats to int32.
Nope, it can't.

Checking whether your C compiler can cast negative float to unsigned.
Yup, it can.

cbrt() found.

chown() found.

chroot() found.

chsize() NOT found.

class() NOT found.

clearenv() found.

Hmm... Looks like you have Berkeley networking support.

socketpair() found.
Checking the availability sa_len in the sock struct ...
Checking the availability struct sockaddr_in6 ...
Checking the availability struct sockaddr_storage ...
Checking the availability sin6_scope_id in struct sockaddr_in6 ...
Checking the availability struct ip_mreq ...
Checking the availability struct ip_mreq_source ...
Checking the availability struct ipv6_mreq ...
Checking the availability struct ipv6_mreq_source ...
Checking the availability of certain socket constants...

<sys/uio.h> found.

Checking to see if your system supports struct cmsghdr...
Yes, it does.

copysign() found.

copysignl() found.

crypt() found.

<crypt.h> found.

crypt_r() NOT found.

ctermid() found.

ctermid_r() NOT found.

ctime_r() found.

cuserid() found.

dbmclose() NOT found.
We won't be including <dbm.h>

dbminit() prototype NOT found.

difftime() found.

<dirent.h> found.

Your directory entries are struct dirent.

Your directory entry does not know about the d_namlen field.
Checking to see if DIR has a dd_fd member variable
No, it does not.

<sys/dir.h> found.

<sys/ndir.h> NOT found.

dirfd() found.

dladdr() found.

dlerror() found.

<dlfcn.h> found.

On a few systems, the dynamically loaded modules that perl generates and uses
will need a different extension than shared libs. The default will probably
be appropriate.

What is the extension of dynamically loaded modules [so]

Checking whether your dlsym() needs a leading underscore ...
I can't compile and run the test program.
I'm guessing that dlsym doesn't need a leading underscore.

drand48_r() NOT found.

drand48() prototype found.

dup2() found.

dup3() found.

<xlocale.h> NOT found.

newlocale() found.

freelocale() found.

uselocale() found.

duplocale() found.

querylocale() NOT found.

eaccess() found.

endgrent() found.

<grp.h> found.

endgrent_r() NOT found.

endhostent() found.

<netdb.h> found.

endhostent_r() NOT found.

endnetent() NOT found.

endnetent_r() NOT found.

endprotoent() found.

endprotoent_r() NOT found.

endpwent() found.

<pwd.h> found.

endpwent_r() NOT found.

endservent() found.

endservent_r() NOT found.

<sys/file.h> defines the O_* constants...
and you have the 3 argument form of open().

<sys/file.h> found.

We'll be including <sys/file.h>.

<fcntl.h> found.

We don't need to include <fcntl.h> if we include <sys/file.h>.

fork() found.

pipe() found.

Figuring out the flag used by open() for non-blocking I/O...
Seems like we can use O_NONBLOCK.

Let's see what value errno gets from read() on a O_NONBLOCK file...
A read() system call with no data present returns -1.
Your read() sets errno to EAGAIN when no data is available.
And it correctly returns 0 to signal EOF.

erf() found.

erfc() found.

exp2() found.

expm1() found.

(Looks like you have stdio.h from BSD.)
Checking how std your stdio is...
Your stdio acts pretty std.
Checking to see what happens if we set the stdio ptr...
Increasing ptr in your stdio leaves cnt unchanged.  Good.
And its _base field acts std.
You seem to have 'fast stdio' to directly manipulate the stdio buffers.

fchdir() found.

fchmod() found.

openat() found.

unlinkat() found.

renameat() found.

linkat() found.

fchmodat() found.

fchown() found.

fcntl() found.

Checking if fcntl-based file locking works...
Yes, it seems to work.

Checking to see how well your C compiler handles fd_set and friends ...
Well, your system knows about the normal fd_set typedef...
and you have the normal fd_set macros (just as I'd expect).

fdclose() NOT found.

fdim() found.

fegetround() found.

fgetpos() found.

finite() found.

finitel() found.

flock() found.

flock() prototype found.

fma() found.

fmax() found.

fmin() found.

fp_class() NOT found.
Checking to see if you have fpclassify...
You have fpclassify.

fp_classify() NOT found.

fp_classl() NOT found.

pathconf() found.

fpathconf() found.

fpclass() NOT found.

fpclassl() NOT found.

fpgetround() NOT found.

Checking to see if you have fpos64_t...
You do not have fpos64_t.
(Your fpos_t is 64 bits, so you could use that.)

frexpl() found.

<sys/param.h> found.

<sys/mount.h> found.

Checking to see if your system supports struct fs_data...
No, it doesn't.

fseeko() found.
(Your long is 64 bits, so you could use fseek.)

fsetpos() found.

fstatfs() found.

statvfs() found.

fstatvfs() found.

fsync() found.

ftello() found.
(Your long is 64 bits, so you could use ftell.)

Checking if you have a working futimes()
Yes, you have

A working gai_strerror() found.

<ndbm.h> found.

<gdbm/ndbm.h> NOT found.

<gdbm-ndbm.h> NOT found.

dbm_open() found.
Checking if your <ndbm.h> uses prototypes...
Your <ndbm.h> seems to have prototypes

getaddrinfo() found.

getcwd() found.

getespwnam() NOT found.

getfsstat() NOT found.

getgrent() found.

getgrent_r() NOT found.

getgrgid_r() found.

getgrnam_r() found.

gethostbyaddr() found.

gethostbyname() found.

gethostent() NOT found.

gethostname() found.
uname() found.

Every now and then someone has a gethostname() that lies about the hostname
but can't be fixed for political or economic reasons.  If you wish, I can
pretend gethostname() isn't there and maybe compute hostname at run-time
thanks to the 'hostname' command.

Shall I ignore gethostname() from now on? [n]

gethostbyaddr_r() NOT found.

gethostbyname_r() NOT found.

gethostent_r() NOT found.

gethostent() prototype found.

getitimer() found.

getlogin() found.

getlogin_r() found.

getmnt() NOT found.

getmntent() found.

getnameinfo() found.

getnetbyaddr() NOT found.

getnetbyname() NOT found.

getnetent() NOT found.

getnetbyaddr_r() NOT found.

getnetbyname_r() NOT found.

getnetent_r() NOT found.

getnetent() prototype found.

getpagesize() found.

getprotobyname() found.

getprotobynumber() found.

getprotoent() found.

getpgid() found.

getpgrp2() NOT found.

getppid() found.

getpriority() found.

getprotobyname_r() NOT found.

getprotobynumber_r() NOT found.

getprotoent_r() NOT found.

getprotoent() prototype found.

getprpwnam() NOT found.

getpwent() found.

getpwent_r() NOT found.

getpwnam_r() found.

getpwuid_r() found.

getservbyname() found.

getservbyport() found.

getservent() found.

getservbyname_r() NOT found.

getservbyport_r() NOT found.

getservent_r() NOT found.

getservent() prototype found.

getspnam() NOT found.

<shadow.h> NOT found.

getspnam_r() NOT found.

gettimeofday() found.

gmtime_r() found.

hasmntopt() NOT found.

<netinet/in.h> found.

<arpa/inet.h> found.

htonl() found.

hypot() found.

ilogb() found.

ilogbl() found.

inet_aton() found.

inet_ntop() found.

inet_pton() found.

isascii() found.

isblank() found.
Checking to see if you have isfinite...
You have isfinite.

isfinitel() NOT found.
Checking to see if you have isinf...
You have isinf.

isinfl() found.
Checking to see if you have isless...
You have isless.
Checking to see if you have isnan...
You have isnan.

isnanl() found.
Checking to see if you have isnormal...
You have isnormal.

j0() found.

j0l() NOT found.

killpg() found.

localeconv() found.

lchown() found.

LDBL_DIG found.

lgamma() found.

lgamma_r() found.

Checking to see if your libm supports _LIB_VERSION...
No, it does not (probably harmless)

link() found.

llrint() found.

llrintl() found.

llround() found.

llroundl() found.

localeconv_l() NOT found.

localtime_r() found.

lockf() found.

log1p() found.

log2() found.

logb() found.

lrint() found.

lrintl() found.

lround() found.

lroundl() found.

lseek() prototype found.

lstat() found.

madvise() found.

malloc_size() NOT found.

malloc_good_size() NOT found.

malloc_usable_size() found.

mblen() found.

mbrlen() found.

mbrtowc() found.

mbstowcs() found.

mbtowc() found.

memmem() prototype NOT found.

memrchr() prototype NOT found.

mkdir() found.

mkdtemp() found.

mkfifo() found.

mkostemp() found.

mkstemp() found.

mkstemps() found.

mktime() found.

<sys/mman.h> found.

mmap() found.
and it returns (void *).

sqrtl() found.

scalbnl() found.

truncl() found.

modfl() found.

modfl() prototype found.

mprotect() found.

msgctl() found.

msgget() found.

msgsnd() found.

msgrcv() found.

You have the full msg*(2) library.

Checking to see if your system supports struct msghdr...
Yes, it does.

msync() found.

munmap() found.

nan() found.

nanosleep() found.

nearbyint() found.

nextafter() found.

nexttoward() found.

nice() found.

<langinfo.h> found.

nl_langinfo() found.

<quadmath.h> found.

Choosing the C types to be used for Perl's internal types...
(IV will be long, 8 bytes)
(UV will be unsigned long, 8 bytes)
(NV will be double, 8 bytes)
Checking how many bits of your UVs your NVs can preserve...
Your NVs can preserve only 53 bits of your UVs.
Checking to find the largest integer value your NVs can hold...
The largest integer your NVs can preserve is equal to 256.0*256.0*256.0*256.0*256.0*256.0*2.0*2.0*2.0*2.0*2.0
Checking whether NV 0.0 is all bits zero in memory...
0.0 is represented as all bits zero in memory

Checking to see if you have off64_t...
You do not have off64_t.
(Your off_t is 64 bits, so you could use that.)

pause() found.

pipe2() found.

poll() found.

prctl() NOT found.

readlink() found.

Configure: line 17072: /proc/curproc/exe: No such file or directory

More detailed system information:

$ uname -a
MSYS_NT-10.0-18363 DESKTOP-43CR0B8 3.1.5-340.x86_64 2020-06-06 09:16 UTC x86_64 Msys
Leont commented 3 years ago

The crucial bit is here:

Symbolic links are supported.

Checking how to test for symbolic links...
/usr/bin/ln: failed to create symbolic link 'sym': No such file or directory
Your builtin 'test -h' may be broken.
Trying external '/usr/bin/test -h'.
External '/usr/bin/test -h' is broken, too.
I do not know how you can test for symbolic links.

On an OS with symbolic links, it's apparently assuming there is a way to check for them, but somehow test -h fails.

Then it later fails with an invalid shell command because $issymlink isn't set. Possibly that should be set to false (the executable) if it can't be found?

hakonhagland commented 3 years ago

Some more information: According to this blog symlinks are available on MSYS2 if you are running Windows 10 Creators Update or above and have enabled "Developer mode" in the Windows "Settings" app. Which are is the case for my machine. In this case symlinks are “emulated” by copying files and directories unless you set the enviroment variable MSYS to winsymlinks:nativestrict, which I have done by editing the file C:\msys64\home\hakon\.bashrc and appending the line export MSYS=winsymlinks:nativestrict.

I tested ln -s and it worked as expected for the cases I tried, except for creating a broken symlink (which works fine on Linux) but errors on MSYS2, e.g. if foo.txt does not exist, this command fails on MSYS2:

$ ln -s foo.txt bar.txt
ln: failed to create symbolic link 'bar.txt': No such file or directory
hakonhagland commented 3 years ago

It seems like test -h works fine in the MSYS2 terminal window:

$ touch a.txt
$ ln -s a.txt b.txt
$ test -h b.txt && echo ok
ok
$ test -h a.txt && echo ok
[no output]
hakonhagland commented 3 years ago

I tested ln -s and it worked as expected for the cases I tried, except for creating a broken symlink (which works fine on Linux) but errors on MSYS2, e.g. if foo.txt does not exist, this command fails on MSYS2:

I think this is the problem, on line 2845 it tries to create a broken symlink:

$lns blurfl sym

This fails on MSYS2. I made a quick fix by adding the following code on the line before the test:

    if $test "X$unameosname" = XMsys ; then
       # MSYS2 cannot create broken symlinks, so we need make sure blurfl exists
       $touch blurfl
    fi

and I set the $unameosname before using

if uname --help >/dev/null 2>&1; then 
    unameosname=`uname -o`
fi

After this change to Configure, I reran and it worked fine:

$ sh Configure -de

Beginning of configuration questions for perl5.

Checking echo to see how to suppress newlines...
...using -n.
The star should be here-->*

First let's make sure your kit is complete.  Checking...
Looks good...

Would you like to see the instructions? [n]
[...]
Symbolic links are supported.

Checking how to test for symbolic links...
You can test for symbolic links with 'test -h'.
Checking for cross-compile
No targethost for running compiler tests against defined, running locally
[...]
Doing variable substitutions on .SH files...
Extracting config.h (with variable substitutions)
cflags.SH: Adding -Werror=pointer-arith.
cflags.SH: Adding -Wextra.
cflags.SH: Adding -Wc++-compat.
cflags.SH: Adding -Wwrite-strings.
cflags.SH: Adding -Werror=declaration-after-statement.
cflags.SH: cc       = cc
cflags.SH: ccflags  = -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2
cflags.SH: stdflags =
cflags.SH: optimize = -O
cflags.SH: warn     =  -Wall -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -Werror=declaration-after-statement
Extracting cflags (with variable substitutions)
Not re-extracting config.h
Extracting makedepend (with variable substitutions)
Extracting Makefile (with variable substitutions)
Extracting myconfig (with variable substitutions)
Extracting pod/Makefile (with variable substitutions)
Extracting Policy.sh (with variable substitutions)
Extracting runtests (with variable substitutions)
Configure done.

If you compile perl5 on a different machine or from a different object
directory, copy the Policy.sh file from this object directory to the
new one before you run Configure -- this will help you with most of
the policy defaults.