"Jonathan Worthington" <[EMAIL PROTECTED]> writes:

> Pete sent me some further info off list, here's what happens when he runs
> Configure:-

I assume he runs it with
perl Configure.pl --ask

> Parrot Version 0.0.13 Configure 2.0
> Copyright (C) 2001-2003 The Perl Foundation.  All Rights Reserved.
> 
> Hello, I'm Configure.  My job is to poke and prod your system to figure out
> how to build Parrot.  The process is completely automated, unless you passed
> in
> the `--ask' flag on the command line, in which case it'll prompt you for a
> few
> pieces of info.
> 
> Since you're running this script, you obviously have Perl 5--I'll be pulling
> some defaults from its configuration.
> 
> Checking MANIFEST...done.
> Setting up Configure's data structures...done.
> Checking for --miniparrot...done.
> Loading platform and local hints files...[
> config/init/hints/mswin32.pl ]done.

hintsfile seems to work pretty normal. (This is one of the places were
I already added some debugging output) As there is no --cc=gcc
specifed the win32 default is asummed which is cl

> Enabling optimization...(none requested) done.
> Determinig nongenerated header files...done.
> Determining what C compiler and linker to use...
> 
>     Okay, I'm going to start by asking you a couple questions about your
>     compiler and linker.  Default values are in square brackets; you can
>     hit ENTER to accept them.  If you don't understand a question, the
>     default will usually work--they've been intuited from your Perl 5
>     configuration.
> 
> Bad command or file name
> What C compiler do you want to use? [cl] gcc
> How about your linker? [] gcc
> What program do you want to use to build shared libraries? [] gcc
> What flags should your C compiler receive?
> [-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT ]

This are Visual C options as this is Configures first guess.
Somehow here the default commandline should be run but we are way past
the hints-file in which this is normaly set.

> And your linker? [-nologo -nodefaultlib -release    -machine:x86]
> And your gcc for building shared libraries? [-nologo]
> What libraries should your C compiler use? [oldnames.lib kernel32.lib
> user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib
> ole32.lib oleaut32.lib netapi32.lib uuid.lib wsock32.lib mpr.lib winmm.lib
> version.lib odbc32.lib odbccp32.lib msvcrt.lib]
> Do you want a debugging build of Parrot? [y]
> Do you have a lexical analyzer generator, like flex or lex? [echo]
> Do you have a parser generator, like bison or yacc? [echo]
> Determining what types Parrot should use...
> <big snip>
> gcc.exe: unrecognized option `-nologo'
> gcc.exe: unrecognized option `-nodefaultlib'
> gcc.exe: unrecognized option `-release'
> gcc.exe: unrecognized option `-Fetest.exe'
> gcc.exe: no input files
> Bad command or file name
> gcc.exe: unrecognized option `-nologo'
> test.c: In function `main':
> test.c:15: warning: left shift count >= width of type
> gcc.exe: test.obj: No such file or directory (ENOENT)
> gcc.exe: oldnames.lib: No such file or directory (ENOENT)
> gcc.exe: kernel32.lib: No such file or directory (ENOENT)
> gcc.exe: user32.lib: No such file or directory (ENOENT)
> gcc.exe: gdi32.lib: No such file or directory (ENOENT)
> gcc.exe: winspool.l: No such file or directory (ENOENT)
> gcc.exe: unrecognized option `-nologo'
> gcc.exe: unrecognized option `-nodefaultlib'
> gcc.exe: unrecognized option `-release'
> gcc.exe: unrecognized option `-Fetest.exe'
> gcc.exe: no input files
> Bad command or file name
> Can't run the byteorder testing program: No such file or directory at
> config/aut
> o/byteorder.pl line 13.
> ========

gcc fails badly because wrong options and nonexisting files are passed
in.

> The Bad command or filename error is referring to the compiler, rather than
> Perl.

Even that is wrong. It fails to start the not build executable. 

> He is attempting to compile with gcc, but Configure detects his
> compiler as cl, probably because that's what it gets from Perl's Configure
> module.  This is a real issue on Win32, given that people usually use
> binaries and rarely compile stuff.  So there's a decent chance the compiler
> used to compile Perl won't be the same as the one they wish to use to
> compile Parrot.

The problem is that --ask option of has not the knowledge to change
the options according to the compiler. I don't know a simple fix for
this.

A workaround solution to this is: Don't use --ask. Put the Compiler
directly to the commandline

perl Configure --cc=gcc    # for MinGW
perl Configure --cc=bcc32  # for Borland C++-Builder

Maybe you need to add --jitcapable=0 or --cgoto=0 as well.

> Of course, when Parrot is "officially" released, I have no doubt that
> various people and organisations will do binary builds for Win32 users, so
> in the long run it won't be an issue for the average Windows user.
> 
> Things don't work out because the compiler and linker flags are incorrect
> for gcc - again, they are pulled from Perl5's config.  Unfortunately, I'm
> not sure what they should be, though someone else may know.

There is already a system for fixing these issue: hints/mswin32.pl.
unfortunatly it is called to early to be useful for the ask option.

> Pete:  I'm guessing you want to compile parrot for yourself.  But if you
> just want a working Win32 parrot, then you can get a reasonably up to date
> binary build from http://www.jwcs.net/developers/perl/pow/ - latest one is 3
> days old.
> 
> Jonathan

Hope this helps
boe
-- 
Juergen Boemmels                        [EMAIL PROTECTED]
Fachbereich Physik                      Tel: ++49-(0)631-205-2817
Universitaet Kaiserslautern             Fax: ++49-(0)631-205-3906
PGP Key fingerprint = 9F 56 54 3D 45 C1 32 6F  23 F6 C7 2F 85 93 DD 47

Reply via email to