[perl #37455] make hello fails

2005-10-24 Thread Bernhard Schmalhofer via RT
> [leo - So 23. Okt 2005, 12:25:29]:


> > As Parrot_setup_args() is so far only used for passing 'output' to the
> > exec runcore, I propose a quick fix.
> >
> > i. Do not use STRING register for passing options
> > ii. Move interp->imc_info->output to interp->output_file and use
> > interp->output_file for all uses of the 'output' option.
> 
> or use interp->current_file (or rename that) - this is already marked 
> during DOD and otherwise unused. A global current_file doesn't make any 
> sense. The info is also covered by the debug PBC segment.

In r9546 I have removed interp->imc_info->output, interp->current_file
and usage of REG_STR(0). The output info in now in interp->output_file.
Currently this is a plain 'const char *', but I could switch it to a
'STRING *'.

So 'make hello' now creates 'examples/pasm/hello'. But execution still
give a segfault.

CU, Bernhard


-- 
/* [EMAIL PROTECTED] */


Re: [perl #37455] make hello fails

2005-10-23 Thread Leopold Toetsch


On Oct 22, 2005, at 21:02, Bernhard Schmalhofer via RT wrote:


Using registers for passing command line options to a specific runcore
seem hazardous to me. Especially as a 'char *' is put where a 'STRING 
*'

is expected.


Yep. This has always been a hack to pass the outfile along.


As Parrot_setup_args() is so far only used for passing 'output' to the
exec runcore, I propose a quick fix.

i. Do not use STRING register for passing options
ii. Move interp->imc_info->output to interp->output_file and use
interp->output_file for all uses of the 'output' option.


or use interp->current_file (or rename that) - this is already marked 
during DOD and otherwise unused. A global current_file doesn't make any 
sense. The info is also covered by the debug PBC segment.



CU, Bernhard


leo



[perl #37455] make hello fails

2005-10-22 Thread Bernhard Schmalhofer via RT
> [bernhard - Do 20. Okt 2005, 13:35:43]:
> 
> When running 'make test' the command 
> 
>./parrot -o examples/pasm/hello.o examples/pasm/hello.pbc 
> 
> fails to create examples/pasm/hello.o. Instead a file with the name
> 'exex_output.o' is generated. It looks like the name of the output file
> is expected to be in  REG_STR(0), but isn't. So the default file
> 'exec_output.o' is used. Sell line 116 of src/exec.c.
Hi,

I've traced this some more. It looks like the 'output' is stored in the
'0' STRING register of the initial interpreter context. This is done be
calling 'Parrot_setup_opt()'. However when this information is needed, I
assume the register has been cleared or stored in a not current context.
I've traced this only to the first VTABLE_invoke call of runops_args()
in src/inter_runs.c,line 157.

Using registers for passing command line options to a specific runcore
seem hazardous to me. Especially as a 'char *' is put where a 'STRING *'
is expected. 

As Parrot_setup_args() is so far only used for passing 'output' to the
exec runcore, I propose a quick fix.

i. Do not use STRING register for passing options
ii. Move interp->imc_info->output to interp->output_file and use
interp->output_file for all uses of the 'output' option.

Any comments?

> Whem copying 'exec_output.o' to 'examples/pasm/hello.o' manually, then
> 'make test' produces 'examples/pasm/hello'. However when trying to
> execute that executable, I get a segmentation fault.
I have no idea about this.
 
CU, Bernhard  

-- 
/* [EMAIL PROTECTED] */


[perl #37455] make hello fails

2005-10-20 Thread Bernhard Schmalhofer via RT
> [EMAIL PROTECTED] - Di 18. Okt 2005, 02:51:18]:
> 
> This bug is a regression, 'make hello' works with release 0.3.0
> (r9297).

Just some observations. When running 'make test' the command 

   ./parrot -o examples/pasm/hello.o examples/pasm/hello.pbc 

fails to create examples/pasm/hello.o. Instead a file with the name
'exex_output.o' is generated. It looks like the name of the output file
is expected to be in  REG_STR(0), but isn't. So the default file
'exec_output.o' is used. Sell line 116 of src/exec.c.

Whem copying 'exec_output.o' to 'examples/pasm/hello.o' manually, then
'make test' produces 'examples/pasm/hello'. However when trying to
execute that executable, I get a segmentation fault.

CU, Bernhard
 
-- 
/* [EMAIL PROTECTED] */


Re: [perl #37455] make hello fails

2005-10-18 Thread Francois PERRAD

At 07:03 17/10/2005 -0700, you wrote:

"François PERRAD (via RT)" <[EMAIL PROTECTED]> wrote:
>
> $ ./parrot -V
> This is parrot version 0.3.0-devel (r9493) built for i386-linux.
>
> $ make hello
> ./parrot -o examples/assembly/hello.o examples/assembly/hello.pbc
> make EXEC=examples/assembly/hello exec
> c++ -o examples/assembly/hello -L/usr/local/lib
> -Wl,-E   examples/assembly/hello.o src/exec_start.o src/parrot_config.o
> blib/lib/libparrot.a -lpthread -lm -L/usr/lib  -licuuc -licudata -lpthread
> -lm -ldl -lm -lpthread -lcrypt -lrt
> c++: examples/assembly/hello.o: No such file or directory
>
> parrot doesn't produce hello.o from hello.pbc
>
make should probably terminate earlier, though as for why it doesn't produce
the object file, look in myconfig and check if it contains something like
"execcapable=1"; if it does not, Configure doesn't think Parrot can produce
native objects for your platform (which it may be wrong about).


My file myconfig contains :
execcapable=1
My file config_lib.pasm contains :
set P0["execcapable"], "1"
This bug is a regression, 'make hello' works with release 0.3.0 (r9297).

François.


Jonathan





Re: [perl #37455] make hello fails

2005-10-17 Thread Jonathan Worthington

"François PERRAD (via RT)" <[EMAIL PROTECTED]> wrote:


$ ./parrot -V
This is parrot version 0.3.0-devel (r9493) built for i386-linux.

$ make hello
./parrot -o examples/assembly/hello.o examples/assembly/hello.pbc
make EXEC=examples/assembly/hello exec
c++ -o examples/assembly/hello -L/usr/local/lib
-Wl,-E   examples/assembly/hello.o src/exec_start.o src/parrot_config.o
blib/lib/libparrot.a -lpthread -lm -L/usr/lib  -licuuc -licudata -lpthread
-lm -ldl -lm -lpthread -lcrypt -lrt
c++: examples/assembly/hello.o: No such file or directory

parrot doesn't produce hello.o from hello.pbc

make should probably terminate earlier, though as for why it doesn't produce 
the object file, look in myconfig and check if it contains something like 
"execcapable=1"; if it does not, Configure doesn't think Parrot can produce 
native objects for your platform (which it may be wrong about).


Jonathan 



[perl #37455] make hello fails

2005-10-17 Thread François
# New Ticket Created by  François PERRAD 
# Please include the string:  [perl #37455]
# in the subject line of all future correspondence about this issue. 
# https://rt.perl.org/rt3/Ticket/Display.html?id=37455 >



$ ./parrot -V
This is parrot version 0.3.0-devel (r9493) built for i386-linux.

$ make hello
./parrot -o examples/assembly/hello.o examples/assembly/hello.pbc
make EXEC=examples/assembly/hello exec
c++ -o examples/assembly/hello -L/usr/local/lib 
-Wl,-E   examples/assembly/hello.o src/exec_start.o src/parrot_config.o 
blib/lib/libparrot.a -lpthread -lm -L/usr/lib  -licuuc -licudata -lpthread 
-lm -ldl -lm -lpthread -lcrypt -lrt
c++: examples/assembly/hello.o: No such file or directory

parrot doesn't produce hello.o from hello.pbc

François Perrad