Re: configure on windows

2004-01-11 Thread Nicholas Clark
On Tue, Nov 18, 2003 at 09:57:02AM -0500, Dan Sugalski wrote:

 FWIW, with these changes rather than using the literal perl use $^X
 instead. That picks up the perl being used rather than whatever comes
 first in the search path, which may not be the perl being used for
 configure.

There was a time when the first perl in my $PATH was /bin/false
I might make that the case on my tinderbox.

Muahahahahaha.

Nicholas Clark


Re: configure on windows

2003-12-02 Thread Pete Lomax
On 02 Dec 2003 18:37:15 +0100, Juergen Boemmels
[EMAIL PROTECTED] wrote:

Pete Lomax [EMAIL PROTECTED] writes:

 Command line used was:
 $ perl -e open STDERR,'STDOUT'; exec qq{$^X Configure.pl --cc=gcc
 --cgoto=0 --jitcapable=0 --verbose}  conf.out
 
 Output file is attached

[...]

Ok, I looked through this things.
Many thanks, Configure.pl is now running without any warnings or
errors.

However (gulp), make fails with:

Can't use an undefined value as an ARRAY reference at
lib/Parrot/OpsFile.pm line 432.
make: *** [include/parrot/oplib/core_ops.h] Error 255

Any idea what that means?

Regards,
Pete


Re: configure on windows

2003-11-27 Thread Pete Lomax
On 19 Nov 2003 16:03:59 +0100, Juergen Boemmels
[EMAIL PROTECTED] wrote:

 Could you try out the attached patch. 


diff -u -r1.16 mswin32.pl
--- config/init/hints/mswin32.pl15 Oct 2003 12:06:24 -  1.16
+++ config/init/hints/mswin32.pl19 Nov 2003 14:30:26 -
@@ -95,6 +95,19 @@
Configure::Data-set(
link  = 'gcc',
libs  = $libs,
+ccflags= '-DWIN32 -DNO_STRICT -DNDEBUG
-D_CONSOLE',
+cc_o_out   = '-o ',
+cc_exe_out = '-o ',
+cc_debug   = '-g',
+
+ld = ${cc},
+ldflags= '',
+ld_out = '-o ',
+cc_ldflags = '',
+ld_debug   = '-g',
+ld_shared  = '-mdll',
+libs   = '-lmsvcrt'
+   
slash = '\\',
ar= 'ar',
);

Hello again,
I tried that (needed a comma after libs = '-lmsvcrt') and it didn't
seem to make any difference. I also tried changing -DWIN32 to
-DGARBAGEWIN32 but I didn't get any additional errors so my guess
would be it is not figuring out $is_mingw properly (I am using
--cc=gcc). BTW, I ditched djgpp and installed mingw, and got a fresh
snapshot (2003-11-26 16:01) of parrot, and got pretty much the same
results (duplicates removed):

GCC.EXE: unrecognized option `-nologo'
GCC.EXE: unrecognized option `-nodefaultlib'
GCC.EXE: unrecognized option `-release'
test.c:2:21: pthread.h: No such file or directory
GCC.EXE: test.o: No such file or directory
Bad command or file name
test.c:2:23: arpa/inet.h: No such file or directory
test.c:2:21: sysexit.h: No such file or directory
test.c:2:24: sys/socket.h: No such file or directory
test.c: In function `main':
test.c:15: warning: left shift count = width of type
test.c: In function `main':
test.c:11: warning: initialization makes pointer from integer without
a cast
test.o(.text+0x30):test.c: undefined reference to `memalign'
test.o(.text+0x3c):test.c: undefined reference to `posix_memalign'
test.c:12: parse error before set_handler
test.c:12: parse error before __sighandler_t
test.c: In function `set_handler':
test.c:13: `__sighandler_t' undeclared (first use in this function)
test.c:13: (Each undeclared identifier is reported only once
test.c:13: for each function it appears in.)
test.c:13: parse error before numeric constant
test.c: In function `main':
test.c:13: storage size of `old' isn't known
test.c:13: storage size of `new' isn't known
test.c: In function `main':
test.c:17: storage size of `its' isn't known
test.c:17: storage size of `ots' isn't known
test.c:20: `SIGALRM' undeclared (first use in this function)
test.c:20: (Each undeclared identifier is reported only once
test.c:20: for each function it appears in.)
test.c:24: `ITIMER_REAL' undeclared (first use in this function)
test.o(.text+0x49):test.c: undefined reference to `setenv'

Trying to run make after that lot gave me:
$ make
echo Compiling with:
Compiling with:
make: D:Parrotperlbinperl.exe: Command not found
make: *** [flags_dummy] Error 127


Regards,
Pete


Re: configure on windows

2003-11-19 Thread Juergen Boemmels
Pete Lomax [EMAIL PROTECTED] writes:

 On 18 Nov 2003 18:37:57 +0100, Juergen Boemmels
 [EMAIL PROTECTED] wrote:
 
 I assume he runs it with perl Configure.pl --ask
 Yes
 snip
 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.
 
 That certainly moves things in the right direction.
 
 Determining if your C compiler is actually gcc...
 
 I had to laugh when that appeared! ;-)
 
 Some more errors, I still get lots of these three:
 gcc.exe: unrecognized option `-nologo'
 gcc.exe: unrecognized option `-nodefaultlib'
 gcc.exe: unrecognized option `-release'

Are there any people out there building parrot on MinGW?
config/init/hints/mswin32.pl is far from complete.

Could you try out the attached patch. The options are just educated
guesses, so you might have to play a little with them. Don't forget to
rerun Configure to let your changes take effekt.

 test.c:2:21: pthread.h: No such file or directory (ENOENT)
 gcc.exe: test.o: No such file or directory (ENOENT)
 gcc.exe: no input files
 Bad command or file name
 
 test.c:2:23: arpa/inet.h: No such file or directory (ENOENT)
 
 test.c:2:21: sysexit.h: No such file or directory (ENOENT)
 
 test.c:2:24: sys/socket.h: No such file or directory (ENOENT)

gcc is searching some system header files which are not found. Aren't
these probed config/auto/headers.pl?
BTW isn't the file call sysexits.h?

 test.o(.text+0x1b):test.c: undefined reference to `_memalign'
 collect2: ld returned 1 exit status
 test.o(.text+0x23):test.c: undefined reference to `_posix_memalign'
 collect2: ld returned 1 exit status
 test.c:12: error: parse error before set_handler
 test.c:12: error: parse error before __sighandler_t
 test.c: In function `set_handler':
 test.c:13: error: `__sighandler_t' undeclared (first use in this
 function)
 test.c:13: error: (Each undeclared identifier is reported only once
 test.c:13: error: for each function it appears in.)
 test.c:13: error: parse error before numeric constant
 
 It does finish, but this is what make does:
 D:\Parrot\Parrotmake
 echo Compiling with:
 Compiling with:
 Use of uninitialized value in pattern match (m//) at
 tools\dev\cc_flags.pl line
 54, F line 15.
 Use of uninitialized value in pattern match (m//) at
 tools\dev\cc_flags.pl line
 54, F line 15.
 Use of uninitialized value in pattern match (m//) at
 tools\dev\cc_flags.pl line
 54, F line 15.
 Use of uninitialized value in pattern match (m//) at
 tools\dev\cc_flags.pl line
 54, F line 15.
 Use of uninitialized value in pattern match (m//) at
 tools\dev\cc_flags.pl line
 54, F line 15.

What does the file CFLAGS say?

 -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -g
 -Dan_Sugalski -Larry
 -Wall -Ws
 D:\Parrot\perl\bin\perl.exe build_tools\ops2pm.pl ops/core.ops
 ops/bit.ops ops/c
 mp.ops ops/debug.ops ops/dotgnu.ops ops/io.ops ops/math.ops
 ops/object.ops ops/p
 mc.ops ops/rx.ops ops/set.ops ops/stack.ops ops/string.ops ops/sys.ops
 ops/var.o
 ps
 build_tools\ops2pm.pl: Could not find ops file 'ops/object.op'!
 make.exe: *** [lib\Parrot\OpLib\core.pm] Error 2

What make are you using?
Could it be that it has problems with long commandlines?

bye
bö



Re: configure on windows

2003-11-19 Thread Juergen Boemmels
? $_
? languages/befunge/befunge.pbc
? t/src/headers.t
Index: config/init/hints/mswin32.pl
===
RCS file: /cvs/public/parrot/config/init/hints/mswin32.pl,v
retrieving revision 1.16
diff -u -r1.16 mswin32.pl
--- config/init/hints/mswin32.pl	15 Oct 2003 12:06:24 -	1.16
+++ config/init/hints/mswin32.pl	19 Nov 2003 14:30:26 -
@@ -95,6 +95,19 @@
 		Configure::Data-set(
 			link  = 'gcc',
 			libs  = $libs,
+ccflags= '-DWIN32 -DNO_STRICT -DNDEBUG -D_CONSOLE',
+cc_o_out   = '-o ',
+cc_exe_out = '-o ',
+cc_debug   = '-g',
+
+ld = ${cc},
+ldflags= '',
+ld_out = '-o ',
+cc_ldflags = '',
+ld_debug   = '-g',
+ld_shared  = '-mdll',
+libs   = '-lmsvcrt'
+			
 			slash = '\\',
 			ar= 'ar',
 		);


Re: configure on windows

2003-11-19 Thread Pete Lomax
On 19 Nov 2003 16:00:00 +0100, Juergen Boemmels
[EMAIL PROTECTED] wrote:

Are there any people out there building parrot on MinGW?
config/init/hints/mswin32.pl is far from complete.

I'm quite happy to be the first/only testing this

Could you try out the attached patch.

Sorry, no can do this week. Winders just restored my registry (never
seen that before: a screen quite similar to the all-to-familiar
dos-style scandisk) and it won't boot no more with my latest reg
backup so I have to go with the, I dunno, 3 month old, copy.

So I'm going to delete all the compilers, parrot etc I've installed in
the meantime, and start again from scratch.

Plus I'm away the next four days.

Think I'll try mingw+indigostar this time (I was trying djgpp last go)
unless anyone wants to convince me otherwise.

Tuesday,
Pete

Bearing in mind I can no longer reproduce this:
What does the file CFLAGS say?
# DO NOT EDIT THIS FILE
# Generated by lib/Parrot/Configure/Step.pm from
config/gen/cflags/root.in
# [ filename | {regex} ] -{removed options} +{added options} s/// ...
#
# Avoid using non-configure controlled +{} directly in this file, as
# it'll most likely break on other platforms.
#
# Note, empty regex/options are just ignored.
#
spf_render.c -{-Wformat-nonliteral}   # noisy
tsq.c -{} # never optimize tsq.c!

# imcc file settings
{imcc} -{-Wwrite-strings -Wcast-qual} s/-Wno-unused/-Wunused/
-{-Wformat-nonliteral}

What make are you using?
Could it be that it has problems with long commandlines?
as above, I'll reinstall next week  we'll go from there.



Re: configure on windows

2003-11-18 Thread Dan Sugalski
On Tue, 18 Nov 2003, Juergen Boemmels wrote:

 Pete Lomax [EMAIL PROTECTED] writes:

  Hi,
  I've only just installed perl. Running Configure.pl on a windows box,
  I got 'bad command or file name' because line 12 of
  config\init\hints.pl is:
my $hints = config/init/hints/ . lc($^O) . .pl;
  I had to change it to:
my $hints = perl config/init/hints/ . lc($^O) . .pl;
 
  I'll carry on editing lines by hand, just though I should mention it.

 This is very strange. Last time I tested it Configure.pl runs under
 windows without any changes.

And for me as well, though it's been a little while.

FWIW, with these changes rather than using the literal perl use $^X
instead. That picks up the perl being used rather than whatever comes
first in the search path, which may not be the perl being used for
configure.

Dan

--it's like this---
Dan Sugalski  even samurai
[EMAIL PROTECTED] have teddy bears and even
  teddy bears get drunk



RE: configure on windows

2003-11-18 Thread Garrett Goebel
boemmels at physik.uni-kl dot de wrote:
 Pete Lomax writes:
 
  I've only just installed perl. Running Configure.pl on a 
  windows box, I got 'bad command or file name' because line
  12 of config\init\hints.pl is:
my $hints = config/init/hints/ . lc($^O) . .pl;
  I had to change it to:
my $hints = perl config/init/hints/ . lc($^O) . .pl;
  
[...]
 
 Normaly this bad command or file name come form failing
 system calls. 

Could it be something as simple as not having established an file
association for *.pl files? If you compiled and installed perl yourself,
there's a good chance it isn't there. The following instructions walk you
through how to create it. Apologies in advance if I'm completely off-base...

Execute explorer, select 'view', 'options' from the menu, 'file types'
tab... and look for a registered file type for perl scripts. If there isn't
one, select 'new type', and enter the following:

Description of type: Perl
Associated extension: .pl
Content Type (MIME): application/perl

Select the 'new' button to create a new action, and enter the following:

Action: open
Application used to perform action: [path to perl.exe] %1 %*

--
Garrett Goebel
IS Development Specialist 

ScriptPro   Direct: 913.403.5261 
5828 Reeds Road   Main: 913.384.1008 
Mission, KS 66202  Fax: 913.384.2180 
www.scriptpro.com  garrett at scriptpro dot com 
 


Re: configure on windows

2003-11-18 Thread Juergen Boemmels
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 

Re: configure on windows

2003-11-18 Thread Pete Lomax
On 18 Nov 2003 18:37:57 +0100, Juergen Boemmels
[EMAIL PROTECTED] wrote:

I assume he runs it with perl Configure.pl --ask
Yes
snip
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.

That certainly moves things in the right direction.

Determining if your C compiler is actually gcc...

I had to laugh when that appeared! ;-)

Some more errors, I still get lots of these three:
gcc.exe: unrecognized option `-nologo'
gcc.exe: unrecognized option `-nodefaultlib'
gcc.exe: unrecognized option `-release'

test.c:2:21: pthread.h: No such file or directory (ENOENT)
gcc.exe: test.o: No such file or directory (ENOENT)
gcc.exe: no input files
Bad command or file name

test.c:2:23: arpa/inet.h: No such file or directory (ENOENT)

test.c:2:21: sysexit.h: No such file or directory (ENOENT)

test.c:2:24: sys/socket.h: No such file or directory (ENOENT)

test.o(.text+0x1b):test.c: undefined reference to `_memalign'
collect2: ld returned 1 exit status
test.o(.text+0x23):test.c: undefined reference to `_posix_memalign'
collect2: ld returned 1 exit status
test.c:12: error: parse error before set_handler
test.c:12: error: parse error before __sighandler_t
test.c: In function `set_handler':
test.c:13: error: `__sighandler_t' undeclared (first use in this
function)
test.c:13: error: (Each undeclared identifier is reported only once
test.c:13: error: for each function it appears in.)
test.c:13: error: parse error before numeric constant

It does finish, but this is what make does:
D:\Parrot\Parrotmake
echo Compiling with:
Compiling with:
Use of uninitialized value in pattern match (m//) at
tools\dev\cc_flags.pl line
54, F line 15.
Use of uninitialized value in pattern match (m//) at
tools\dev\cc_flags.pl line
54, F line 15.
Use of uninitialized value in pattern match (m//) at
tools\dev\cc_flags.pl line
54, F line 15.
Use of uninitialized value in pattern match (m//) at
tools\dev\cc_flags.pl line
54, F line 15.
Use of uninitialized value in pattern match (m//) at
tools\dev\cc_flags.pl line
54, F line 15.

-nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -g
-Dan_Sugalski -Larry
-Wall -Ws
D:\Parrot\perl\bin\perl.exe build_tools\ops2pm.pl ops/core.ops
ops/bit.ops ops/c
mp.ops ops/debug.ops ops/dotgnu.ops ops/io.ops ops/math.ops
ops/object.ops ops/p
mc.ops ops/rx.ops ops/set.ops ops/stack.ops ops/string.ops ops/sys.ops
ops/var.o
ps
build_tools\ops2pm.pl: Could not find ops file 'ops/object.op'!
make.exe: *** [lib\Parrot\OpLib\core.pm] Error 2

Regards,
Pete


configure on windows

2003-11-17 Thread Pete Lomax
Hi,
I've only just installed perl. Running Configure.pl on a windows box, 
I got 'bad command or file name' because line 12 of
config\init\hints.pl is:
  my $hints = config/init/hints/ . lc($^O) . .pl;
I had to change it to:
  my $hints = perl config/init/hints/ . lc($^O) . .pl;

I'll carry on editing lines by hand, just though I should mention it.

Pete


Re: configure on windows

2003-11-17 Thread Pete Lomax
On Mon, 17 Nov 2003 20:46:32 +, Pete Lomax
[EMAIL PROTECTED] wrote:

I got 'bad command or file name' because line 12 of
config\init\hints.pl is:
  my $hints = config/init/hints/ . lc($^O) . .pl;
PS: that was the dos error, shouldn't there be an and/or die thing
somewhere near it?
Pete
http://palacebuilders.pwp.blueyonder.co.uk/euphoria.html


Re: configure on windows

2003-11-17 Thread Jonathan Worthington
- Original Message - 
From: Pete Lomax [EMAIL PROTECTED]
To: Pete Lomax [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Monday, November 17, 2003 10:20 PM
Subject: Re: configure on windows


 On Mon, 17 Nov 2003 20:46:32 +, Pete Lomax
 [EMAIL PROTECTED] wrote:

 I got 'bad command or file name' because line 12 of
 config\init\hints.pl is:
   my $hints = config/init/hints/ . lc($^O) . .pl;
 PS: that was the dos error, shouldn't there be an and/or die thing
 somewhere near it?
My first guess is that perl or your compiler is not in your path (where your
system looks for stuff to execute).  If the problem is that perl isn't
there, a reboot may be needed if you haven't done one since the install -
paths are sometimes not re-evaluated until a reboot.  If that doesn't do it,
you'll need to add it to the path environment variable manually.

Doing your change just appears to cause the win32 hints file not to be
loaded - which causes configure to fail later.  You can check this by
putting monkey instead of perl before the filename and seeing if you get
the same effect.

The DOS error you get is most likely due to something done in the mswin32.pl
hint file, or something that happens later.  If you're still having fun,
three things that'll help me find the cause are:-

1) Without your changes, do:-
perl Configure.pl
And post the output.

2) Type:-
perl
What happens?

3) What compiler are you planning to use?  Type each of the following:-
cl
bcc32
gcc
If all three of them give Bad Command Or File Name error then the reason is
that you haven't got a C compiler in your system path.

Thanks,

Jonathan