SONIC3D / gendev-macos

Genesis/MegaDrive Development Environment for Mac OS X
BSD 3-Clause "New" or "Revised" License
70 stars 8 forks source link

Error with two compiler #10

Closed cutie-lyta closed 3 years ago

cutie-lyta commented 3 years ago

I'm trying to build gendev-macos, but I have an issue

When I tried to build with the current Xcode Command Line Tools for OSX 10.4 (11.3), I get this error while building

g++ -fno-PIE -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE   -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc-6.3.0/gcc -I../../gcc-6.3.0/gcc/. -I../../gcc-6.3.0/gcc/../include -I../../gcc-6.3.0/gcc/../libcpp/include -I/Users/muzi/gendev-macos/toolchain/work/build-gcc/./gmp -I/Users/muzi/gendev-macos/toolchain/work/gcc-6.3.0/gmp -I/Users/muzi/gendev-macos/toolchain/work/build-gcc/./mpfr -I/Users/muzi/gendev-macos/toolchain/work/gcc-6.3.0/mpfr -I/Users/muzi/gendev-macos/toolchain/work/gcc-6.3.0/mpc/src  -I../../gcc-6.3.0/gcc/../libdecnumber -I../../gcc-6.3.0/gcc/../libdecnumber/dpd -I../libdecnumber -I../../gcc-6.3.0/gcc/../libbacktrace -I/Users/muzi/gendev-macos/toolchain/work/build-gcc/./isl/include -I/Users/muzi/gendev-macos/toolchain/work/gcc-6.3.0/isl/include  -o ubsan.o -MT ubsan.o -MMD -MP -MF ./.deps/ubsan.TPo ../../gcc-6.3.0/gcc/ubsan.c
../../gcc-6.3.0/gcc/ubsan.c: In function 'tree_node* ubsan_type_descriptor(tree, ubsan_print_style)':
../../gcc-6.3.0/gcc/ubsan.c:385:33: warning: unterminated quote character ''' in format [-Wformat-diag]
  385 |       pp_printf (&pretty_name, "'%s%s%s%s%s%s%s",
      |                                 ^
../../gcc-6.3.0/gcc/ubsan.c:404:36: warning: spurious trailing space in format -Wformat-diag]
  404 |       pp_printf (&pretty_name, "'%s ", tname);
      |                                    ^
../../gcc-6.3.0/gcc/ubsan.c:404:33: warning: unterminated quote character ''' in format [-Wformat-diag]
  404 |       pp_printf (&pretty_name, "'%s ", tname);
      |                                 ^
../../gcc-6.3.0/gcc/ubsan.c: In function 'bool ubsan_use_new_style_p(location_t':
../../gcc-6.3.0/gcc/ubsan.c:1474:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
 1474 |       || xloc.file == '\0' || xloc.file[0] == '\xff'
      |          ~~~~~~~~~~^~~~~~~
make[3]: *** [ubsan.o] Error 1
make[2]: *** [all-gcc] Error 2
make[1]: *** [all] Error 2
make: *** [build-gcc-2] Error 2

while making the toolchains

But on clang 6.1.0 with xcode 6.4.0, the error is the following :

cd toolchain && make download-prerequisite-files && make toolchain_build
Prerequisite files are all ready now.
mkdir -p /Users/muzi/gendev-macos/toolchain/../build
mkdir -p /Users/muzi/gendev-macos/toolchain/../toolchain/work
# Will extract /Users/muzi/gendev-macos/toolchain/../toolchain/files/newlib-1.19.0(*.tar.gz or *.tar.bz2)
cd /Users/muzi/gendev-macos/toolchain/../toolchain/work && \
    tar xf /Users/muzi/gendev-macos/toolchain/../toolchain/files/newlib-1.19.0.*
# Will extract /Users/muzi/gendev-macos/toolchain/../toolchain/files/binutils-2.24(*.tar.gz or *.tar.bz2)
cd /Users/muzi/gendev-macos/toolchain/../toolchain/work && \
    tar xf /Users/muzi/gendev-macos/toolchain/../toolchain/files/binutils-2.24.*
# Will extract /Users/muzi/gendev-macos/toolchain/../toolchain/files/gcc-6.3.0(*.tar.gz or *.tar.bz2)
cd /Users/muzi/gendev-macos/toolchain/../toolchain/work && \
    tar xf /Users/muzi/gendev-macos/toolchain/../toolchain/files/gcc-6.3.0.*
echo /Users/muzi/gendev-macos/toolchain/../toolchain/work setup
/Users/muzi/gendev-macos/toolchain/../toolchain/work setup
Setup done
mkdir -p /Users/muzi/gendev-macos/toolchain/../toolchain/work/build-binutils
cd /Users/muzi/gendev-macos/toolchain/../toolchain/work/build-binutils && ../binutils-2.24/configure --target=m68k-elf --prefix=/Users/muzi/gendev-macos/toolchain/../build --enable-install-libbfd --disable-werror
checking build system type... x86_64-apple-darwin18.7.0
checking host system type... x86_64-apple-darwin18.7.0
checking target system type... m68k-unknown-elf
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: in `/Users/muzi/gendev-macos/toolchain/work/build-binutils':
configure: error: C compiler cannot create executables
See `config.log' for more details.
make[1]: *** [/Users/muzi/gendev-macos/toolchain/../toolchain/work/build-binutils] Error 77
make: *** [toolchain_build] Error 2

EDIT : I didn't notice, but the issue was that I had macports gcc, even if I thought I didn't, so it seems to work better without it, I'm duuumb