Opened 21 years ago

Closed 21 years ago

Last modified 5 years ago

#972 closed defect (fixed)

BeOS compilation

Reported by: SF/kreeblah Owned by: fingolfin
Priority: normal Component: Port: BeOS
Version: Keywords:
Cc: Game:

Description

When attempting to compile the current CVS tree in BeOS, I receive the following errors:

$ make cp backends/sdl/build.rules build.rules mkdir -p common/.deps c++ -Wp,-MMD,"common/.deps/engine.d2" -g -O -Wall -pedantic - Wpointer-arith -Wcast-qual -Wcast-align -Wconversion -Wshadow -Wstrict-prototypes -Wuninitialized -Wimplicit -Wno-long-long -Wno-multichar -Wno-unknown-pragmas -Wno-reorder -Wwrite- strings -Wredundant-decls -Wdisabled-optimization -fcheck-new -Wundef -Wctor-dtor-privacy -Wnon-virtual-dtor -Woverloaded- virtual -Wfloat-equal -DUNIX -I. -Icommon `sdl-config -- cflags` -c common/engine.cpp -o common/engine.o cc1plus: Invalid option `-Wdisabled-optimization' cc1plus: Invalid option `-Wfloat-equal' In file included from /boot/home/ScummVMCVS/1007032113/scummvm /common/stdafx.h:105, from /boot/home/ScummVMCVS/1007032113/scummvm /common/engine.cpp:21: /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:68: warning: redundant redeclaration of `vfprintf(FILE *, const char *, char *)' in same scope /boot/develop/headers/posix/gnu_stdio.h:42: warning: previous declaration of `vfprintf(FILE *, const char *, char *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:69: warning: redundant redeclaration of `vprintf(const char *, char *)' in same scope /boot/develop/headers/posix/gnu_stdio.h:47: warning: previous declaration of `vprintf(const char *, char *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:79: warning: redundant redeclaration of `getchar()' in same scope /boot/develop/headers/posix/gnu_stdio.h:64: warning: previous declaration of `getchar()' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:80: warning: redundant redeclaration of `getc(FILE *)' in same scope /boot/develop/headers/posix/gnu_stdio.h:58: warning: previous declaration of `getc(FILE *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:82: warning: redundant redeclaration of `putchar(int)' in same scope /boot/develop/headers/posix/gnu_stdio.h:81: warning: previous declaration of `putchar(int)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:83: warning: redundant redeclaration of `putc(int, FILE *)' in same scope /boot/develop/headers/posix/gnu_stdio.h:76: warning: previous declaration of `putc(int, FILE *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:90: warning: redundant redeclaration of `fputc(int, FILE *)' in same scope /boot/develop/headers/posix/gnu_stdio.h:75: warning: previous declaration of `fputc(int, FILE *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:102: warning: redundant redeclaration of `fsetpos(FILE *, const fpos_t *)' in same scope /boot/develop/headers/posix/gnu_stdio.h:101: warning: previous declaration of `fsetpos(FILE *, const fpos_t *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:125: warning: redundant redeclaration of `feof(FILE *)' in same scope /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:116: warning: previous declaration of `feof(FILE *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:126: warning: redundant redeclaration of `ferror(FILE *)' in same scope /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:117: warning: previous declaration of `ferror(FILE *)' /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:127: warning: redundant redeclaration of `ungetc(int, FILE *)' in same scope /boot/develop/tools/gnupro/bin/../lib/gcc-lib/i586-beos/2.9- beos-000224/include/stdio.h:93: warning: previous declaration of `ungetc(int, FILE *)' make: *** [common/engine.o] Error 1 $

My compiler version is 2.9-beos-000224 (I believe it's based on the 2.95.3 source; at any rate, it's the most recent working compiler for the OS).

Ticket imported from: #769434. Ticket imported from: bugs/972.

Change History (5)

comment:1 by fingolfin, 21 years ago

I moved -Woverloaded-virtual -Wfloat-equal into the GCC 3.x-only section of the Makefile. As for the many many other warnings you get: try removing this from the Makefile -Wredundant-decls Does it help? It seems to be a bug in the BeOS system headers, they don't properly protect against multiple inclusion, it would seem...

comment:2 by fingolfin, 21 years ago

Owner: set to fingolfin

comment:3 by SF/kreeblah, 21 years ago

That did help, but I also had to remove the -Wdisabled-optimization flag as well. But it compiles now. Thanks.

comment:4 by fingolfin, 21 years ago

Resolution: fixed
Status: newclosed

comment:5 by digitall, 5 years ago

Component: --Unset--Port: BeOS
Note: See TracTickets for help on using tickets.