Ticket #2031 (new bug)

Opened 3 years ago

Last modified 3 years ago

Configure.pl bug in Gentoo

Reported by: dukeleto Owned by:
Priority: normal Milestone:
Component: configure Version: 3.1.0
Severity: medium Keywords:
Cc: Language:
Patch status: Platform:

Description

donp@tower ~/src/parrot/parrot-3.1.0 $ perl Configure.pl

auto::byteorder - Compute native byteorder for wordsize.....little-endian.
auto::va_ptr - Test the type of va_ptr...
step auto::va_ptr died during execution: Unknown va_ptr type at config/auto/va_ptr.pm line 41.

 at Configure.pl line 77

auto::format - What formats should be used for sprintf............done.

Related bug?  http://rt.perl.org/rt3//Public/Bug/Display.html?id=47313

Change History

  Changed 3 years ago by jkeenan

  • component changed from none to configure

Could you post the output of: perl Configure.pl --verbose-step=auto::va_ptr?

in reply to: ↑ description   Changed 3 years ago by plobsing

Replying to dukeleto:

{{{ donp@tower ~/src/parrot/parrot-3.1.0 $ perl Configure.pl auto::byteorder - Compute native byteorder for wordsize.....little-endian. auto::va_ptr - Test the type of va_ptr... step auto::va_ptr died during execution: Unknown va_ptr type at config/auto/va_ptr.pm line 41. at Configure.pl line 77 auto::format - What formats should be used for sprintf............done. }}}

There is a lot of context missing here. The original report is documented here at  http://irclog.perlgeek.de/parrot/2011-02-28#i_3340631.

A key point that sticks out is that the processor is not an i686, but very close, and requires special compiler flags (-march=c3). The reporter did not indicate whether this information had been conveyed to Configure.pl (is it possible to convey this information?). If Configure.pl was unaware of this, it is quite possible that gcc generated code that included illegal instructions for this platform, leading to program crashes (which are interpreted as "No, that's not how va_lists work here").

Related bug?  http://rt.perl.org/rt3//Public/Bug/Display.html?id=47313

Highly unlikely. That was a nomenclature issue.

follow-up: ↓ 4   Changed 3 years ago by donpdonp

auto::va_ptr - Test the type of va_ptr... i686-pc-linux-gnu-gcc -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -DVA_TYPE_STACK -I./include -c test_8367.c i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -L/usr/local/lib -Wl,-E test_8367.o -o test_8367 -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt ./test_8367 i686-pc-linux-gnu-gcc -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHASATTRIBUTE_CONST -DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL -DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED -DHASATTRIBUTE_WARN_UNUSED_RESULT -DVA_TYPE_REGISTER -I./include -c test_8367.c i686-pc-linux-gnu-gcc -Wl,-O1 -Wl,--as-needed -L/usr/local/lib -Wl,-E test_8367.o -o test_8367 -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt ./test_8367

step auto::va_ptr died during execution: Unknown va_ptr type at config/auto/va_ptr.pm line 41.

at Configure.pl line 77

auto::format - What formats should be used for sprintf... Setting Configuration Data: (

verbose => undef,

); .........done. --- snip end ---

I think you're probably right about Configure.pl hiding the error message of 'illegal instruction', which is the indicator that gcc is missing the arch flag.

I tried running Configure.pl again with CFLAGS set but the output is the same as above (calling gcc with no -march=c3)

donp@tower ~/src/parrot/parrot-3.1.0 $ CFLAGS=-march=c3 perl Configure.pl --verbose-step=auto::va_ptr

in reply to: ↑ 3   Changed 3 years ago by plobsing

Replying to donpdonp:

You can try to "fool" Configure.pl by setting it such that the C compiler is gcc with the flag. Either use "--cc='gcc -march=c3'" or create a small cc script in your $PATH that does the appropriate thing (and use that as your C compiler).

  Changed 3 years ago by NotFound

You may need to do the same for --link and --ld

  Changed 3 years ago by jkeenan

donp: Does the approach described by plobsing and NotFound work for you?

Thank you very much.

kid51

  Changed 3 years ago by FalseNames

Gentoo supposedly starts all of its m options in the /etc/make.profile file. I say 'supposedly' because it is configurable by the user, and may not be set properly. These are usually symlinks to /usr/portage/profiles/default/linux/* files, separated by architecture and Gentoo build year.

This is what the portage system uses when compiling packages from source. The Configure.pl could be made to check this on Gentoo systems, but being roughly half a day old to parrot, I am not sure how to easily fit this into the code.

extra reference:  http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3&chap=1

Note: See TracTickets for help on using tickets.