Opened 14 years ago

Closed 14 years ago

Last modified 5 years ago

#4858 closed defect (fixed)

AMIGAOS4: Compiler errors on ./configure

Reported by: raziel- Owned by: salty-horse
Priority: normal Component: Port: AmigaOS4
Version: Keywords: build
Cc: Game:

Description

Somewhere between r48599 and 48603 /the configure changes) my build broke

Running ScummVM configure... Looking for C++ compiler... g++ Checking for compiler version... assertion "cached == 0" failed: file "../../gcc/libcpp/line-map.c", line 277 cc1: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.sf.net/projects/adtools/> for instructions. SDK:Local/C/head: `-1' option is obsolete; use `-n 1' Try `SDK:Local/C/head --help' for more information. assertion "cached == 0" failed: file "../../gcc/libcpp/line-map.c", line 277 cc1: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.sf.net/projects/adtools/> for instructions. SDK:Local/C/head: `-1' option is obsolete; use `-n 1' Try `SDK:Local/C/head --help' for more information. assertion "cached == 0" failed: file "../../gcc/libcpp/line-map.c", line 277 cc1: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.sf.net/projects/adtools/> for instructions. SDK:Local/C/head: `-1' option is obsolete; use `-n 1' Try `SDK:Local/C/head --help' for more information. 4.2.4, bad

The version of your compiler is not supported at this time Please ensure you are using GCC >= 2.95 Running ./configure with the last specified parameters LDFLAGS="" CXX="" \ CXXFLAGS="" CPPFLAGS="" \ ASFLAGS="" WINDRESFLAGS="" \ ./configure Running ScummVM configure... Looking for C++ compiler... g++ Checking for compiler version... assertion "cached == 0" failed: file "../../gcc/libcpp/line-map.c", line 277 cc1: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.sf.net/projects/adtools/> for instructions. SDK:Local/C/head: `-1' option is obsolete; use `-n 1' Try `SDK:Local/C/head --help' for more information. assertion "cached == 0" failed: file "../../gcc/libcpp/line-map.c", line 277 cc1: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.sf.net/projects/adtools/> for instructions. SDK:Local/C/head: `-1' option is obsolete; use `-n 1' Try `SDK:Local/C/head --help' for more information. assertion "cached == 0" failed: file "../../gcc/libcpp/line-map.c", line 277 cc1: internal compiler error: Aborted Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://www.sf.net/projects/adtools/> for instructions. SDK:Local/C/head: `-1' option is obsolete; use `-n 1' Try `SDK:Local/C/head --help' for more information. 4.2.4, bad

The version of your compiler is not supported at this time Please ensure you are using GCC >= 2.95 gmake: *** [config.h] Error 1

Ticket imported from: #2985480. Ticket imported from: bugs/4858.

Attachments (2)

config.log (159 bytes ) - added by raziel- 14 years ago.
Not much there
verbose-config_.log (5.0 KB ) - added by raziel- 14 years ago.

Download all attachments as: .zip

Change History (19)

comment:1 by salty-horse, 14 years ago

Owner: set to salty-horse

comment:2 by fingolfin, 14 years ago

I just committed a change which should address the "head -1" part of the error.

Could you please re-run configure and attach the config.log file it produced?

by raziel-, 14 years ago

Attachment: config.log added

Not much there

comment:3 by raziel-, 14 years ago

With pleasure, attached

comment:4 by fingolfin, 14 years ago

Thanks. Can you please cut&paste the C code from the log file (lines 3 to 8) into a new test.cpp file, then compile it using

g++ ./test.cpp -o ./test -c

Then once again with

g++ ./test.cpp -c

FInally, if both produce the same crash, could you change the text "syntax error" to "#error not gcc"

Thanks!

comment:5 by raziel-, 14 years ago

Both do not produce any errors and build fine

comment:6 by fingolfin, 14 years ago

They don't ? But configure still crashes? Dang.

Can you run sh -x ../configure

and attach the output? I.e. run sh -x ../configure > verbose-config.log and send us verbose-config.log

by raziel-, 14 years ago

Attachment: verbose-config_.log added

comment:7 by raziel-, 14 years ago

Sorry for the delay...too much work here

comment:8 by salty-horse, 14 years ago

After speaking with raziel_, this is the command that crashes: g++ -dM -E - < /dev/null

The compiler is from The Amiga Development Tools (adtools). It seems to try and compile the input file despite the -E flag.

A bug will be filed there, and in the meantime, I will attempt the least-hacky fix to configure depending what the amiga gcc DOES accept.

comment:9 by raziel-, 14 years ago

Thanks for the help salty-horse

Here is the cross reference link: https://sourceforge.net/tracker/?func=detail&aid=2987653&group_id=142043&atid=751301

comment:10 by fingolfin, 14 years ago

Well, it may be due to a bug in g++, but fact is, a compiler that was once working now is not. So this is a regression and should be fixed ASAP.

Can't you just create an empty temporary file as input and use that as input for the compiler?

comment:11 by fingolfin, 14 years ago

Ah I just looked at the other bug report you filed, an empty file does not work either. Serious bug in their compiler, of course, but what about using a file that only contains something like int main(int, char**) { return 0; } or int x; or so?

comment:12 by salty-horse, 14 years ago

I'm thinking of using something like the following, but waiting for confirmation from raziel about the exact behavior. Specifically, whether warnings are printed to stderr that should be silenced

# Handle buggy amiga compiler if test "$_host_os" = amigaos ; then echo "int main(void) { return 0; }" > $TMPC $CXX -dM -E -o $TMPO $TMPC | fgrep "$1" | head -n1 | cut -d ' ' -f 3- rm -f $TMPC $TMPO else $CXX -dM -E - < /dev/null | fgrep "$1" | head -n1 | cut -d ' ' -f 3- fi

comment:13 by fingolfin, 14 years ago

Why make this AmigaOS specific and not just applicable to all systems?

As for warnings, what about adding a simple 2>/dev/null to get rid of any?

comment:14 by salty-horse, 14 years ago

I think it should be AmigaOS-specific in order to stress that it is a hack for a buggy compiler. Correct compilers might exhibit different results.

I'm waiting for raziel to test things. If the compiler is buggy, I'm not sure what goes to stdout and what to stderr.

comment:15 by salty-horse, 14 years ago

Resolution: fixed
Status: newclosed

comment:16 by salty-horse, 14 years ago

Fixed in r48688

comment:17 by digitall, 5 years ago

Component: Port: AmigaOS4
Note: See TracTickets for help on using tickets.