Opened 11 months ago

Last modified 5 weeks ago

#68659 new defect

mips-elf-gcc @3.4.6_0: fails to build due to implicit declaration of abort() — at Initial Version

Reported by: nneonneo (Robert Xiao) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: catalina bigsur monterey ventura sonoma Cc:
Port: mips-elf-gcc

Description

mips-elf-gcc fails to build on macOS 13.6.1 (Xcode 15.0.1), x86-64. The problem is an implicit declaration of abort:

In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_mips-elf-gcc/mips-elf-gcc/work/gcc-3.4.6/libiberty/regex.c:649:
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_mips-elf-gcc/mips-elf-gcc/work/gcc-3.4.6/libiberty/regex.c:4898:11: error: call to undeclared library function 'abort' with type 'void (void) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
          abort (); /* We have listed all the cases.  */
          ^
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_mips-elf-gcc/mips-elf-gcc/work/gcc-3.4.6/libiberty/regex.c:4898:11: note: include the header <stdlib.h> or explicitly provide a declaration for 'abort'

The header stdlib.h is not being included because STDC_HEADERS is not defined, and abort is not prototyped for some reason.

Easy fix is probably to just add a prototype for abort(), or to define STDC_HEADERS in config.h.

Full build log attached.

Change History (1)

Changed 11 months ago by nneonneo (Robert Xiao)

Attachment: main.log added

main.log from building mips-elf-gcc: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_cross_mips-elf-gcc/mips-elf-gcc/main.log

Note: See TracTickets for help on using tickets.