Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compilling Macos #48

Open
LaurentGarcia opened this issue Mar 1, 2021 · 11 comments
Open

Error compilling Macos #48

LaurentGarcia opened this issue Mar 1, 2021 · 11 comments
Assignees
Labels

Comments

@LaurentGarcia
Copy link

rm -f readline.o
gcc -c -DHAVE_CONFIG_H -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 /Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/readline.c
rm -f vi_mode.o
gcc -c -DHAVE_CONFIG_H -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 /Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/vi_mode.c
rm -f funmap.o
gcc -c -DHAVE_CONFIG_H -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 /Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/funmap.c
rm -f keymaps.o
gcc -c -DHAVE_CONFIG_H -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 /Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/keymaps.c
rm -f parens.o
gcc -c -DHAVE_CONFIG_H -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 /Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/parens.c
rm -f search.o
gcc -c -DHAVE_CONFIG_H -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 /Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/search.c
rm -f rltty.o
gcc -c -DHAVE_CONFIG_H -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline -DRL_LIBRARY_VERSION='"6.2"' -g -O2 /Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/rltty.c
/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/rltty.c:83:7: error: implicit declaration of function 'ioctl' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
if (ioctl (tty, TIOCGWINSZ, &w) == 0)
^
/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/rltty.c:720:3: error: implicit declaration of function 'ioctl' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
ioctl (fildes, TIOCSTART, 0);
^
/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/toolchain/toolchain/gdb-8.3.1/readline/rltty.c:759:3: error: implicit declaration of function 'ioctl' is invalid in C99
[-Werror,-Wimplicit-function-declaration]
ioctl (fildes, TIOCSTOP, 0);
^
3 errors generated.
make[4]: *** [rltty.o] Error 1
make[3]: *** [all-readline] Error 2
make[2]: *** [all] Error 2
make[1]: *** [/Users/laurenmanuelgarciacarro/Code/repositories/NeoGeo-Devkit/ngdevkit/build/nggdb] Error 2
make: *** [build-toolchain] Error 2

@dciabrin dciabrin self-assigned this Mar 2, 2021
@dciabrin dciabrin added the bug label Mar 2, 2021
@dciabrin
Copy link
Owner

dciabrin commented Mar 2, 2021

This is due to recent clang 12 that doesn't like gdb 8.3.1 anymore due to stricter compilation defaults. I have to change the default build flags in subproject ngdevkit-toolchain to fix that. Meanwhile, I think you might get around it by exporting the following variables before you compile the devkit:

fixflags="-Wno-implicit-function-declaration"
export CFLAGS=$fixflags
export CXXFLAGS=$fixflags
export CPPFLAGS=$fixflags

Also, I just pushed a update to the README this morning regarding the dependencies you need for building on macOS lately. Please make sure that you install sdl2 with brew install sdl2, and also that you install sox if you want to build all example ROMS.

@LaurentGarcia
Copy link
Author

checking for GL/gl.h... yes
checking for compiling a minimal OpenGL program... no
configure: error: Could not find a valid OpenGL implementation
make: *** [Makefile:180: build/gngeo] Error 1

Now seems like yer OpenGL is not being found. Im on BigSur.

Thanks Damien

@dciabrin
Copy link
Owner

dciabrin commented Mar 2, 2021

checking for GL/gl.h... yes
checking for compiling a minimal OpenGL program... no
configure: error: Could not find a valid OpenGL implementation
make: *** [Makefile:180: build/gngeo] Error 1

Hmm I don't have access to BigSur locally unfortunately and the CI environment I'm using are stuck on 10.15...

Could you check in ./build/gngeo/config.log, you should have the output of the autoconf test that failed. On my system, the gl headers come from brew's SDL2 and the compilation succeeds with:

configure:6684: checking for GL/gl.h
configure:6684: result: no
configure:6684: checking OpenGL/gl.h usability
configure:6684: gcc -c  -g -O2 -D_THREAD_SAFE -I/usr/local/include/SDL2  conftest.c >&5
configure:6684: $? = 0
configure:6684: result: yes
configure:6684: checking OpenGL/gl.h presence
configure:6684: gcc -E  conftest.c
configure:6684: $? = 0
configure:6684: result: yes
configure:6684: checking for OpenGL/gl.h
configure:6684: result: yes
configure:6711: checking for compiling a minimal OpenGL program
configure:6757: gcc -c  -g -O2 -D_THREAD_SAFE -I/usr/local/include/SDL2  conftest.c >&5
conftest.c:49:1: warning: 'glCreateProgram' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations]
glCreateProgram()
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:2928:15: note: 'glCreateProgram' has been explicitly marked deprecated here
extern GLuint glCreateProgram (void) OPENGL_DEPRECATED(10.0, 10.14);
              ^
1 warning generated.
configure:6757: $? = 0
configure:6781: result: yes
configure:6789: checking for linking a minimal OpenGL program
configure:6845: gcc -o conftest  -g -O2 -D_THREAD_SAFE -I/usr/local/include/SDL2    conftest.c -framework OpenGL -lz -lm  -L/usr/local/lib -lSDL2 >&5
conftest.c:49:1: warning: 'glCreateProgram' is deprecated: first deprecated in macOS 10.14 - OpenGL API deprecated. (Define GL_SILENCE_DEPRECATION to silence these warnings) [-Wdeprecated-declarations]
glCreateProgram()
^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gl.h:2928:15: note: 'glCreateProgram' has been explicitly marked deprecated here
extern GLuint glCreateProgram (void) OPENGL_DEPRECATED(10.0, 10.14);
              ^
1 warning generated.
configure:6845: $? = 0
configure:6878: result: yes

Hopefully we can understand why your system is different and fix the autodetection accordingly

@LaurentGarcia
Copy link
Author

config.log

warning generated.
configure:6117: $? = 0
configure:6117: result: yes
configure:6684: checking GL/gl.h usability
configure:6684: gcc -c -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/local/include -DGNGEORC="ngdevkit-gngeorc" -D_THREAD_SAFE -I/usr/local/include/SDL2 -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/local/include conftest.c >&5
In file included from :366:
:1:18: warning: missing terminating '"' character [-Winvalid-pp-token]
#define GNGEORC "ngdevkit-gngeorc"
^
1 warning generated.
configure:6684: $? = 0
configure:6684: result: yes
configure:6684: checking GL/gl.h presence
configure:6684: gcc -E -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/local/include conftest.c
configure:6684: $? = 0
configure:6684: result: yes
configure:6684: checking for GL/gl.h
configure:6684: result: yes
configure:6711: checking for compiling a minimal OpenGL program
configure:6757: gcc -c -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/local/include -DGNGEORC="ngdevkit-gngeorc" -D_THREAD_SAFE -I/usr/local/include/SDL2 -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/local/include conftest.c >&5
In file included from :366:
:1:18: warning: missing terminating '"' character [-Winvalid-pp-token]
#define GNGEORC "ngdevkit-gngeorc"
^
conftest.c:49:1: error: implicit declaration of function 'glCreateProgram' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
glCreateProgram()
^
1 warning and 1 error generated.
configure:6757: $? = 1
configure: failed program was:
| /* confdefs.h /
| #define PACKAGE_NAME "gngeo"
| #define PACKAGE_TARNAME "gngeo"
| #define PACKAGE_VERSION "0.8.1"
| #define PACKAGE_STRING "gngeo 0.8.1"
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| #define PACKAGE "gngeo"
| #define VERSION "0.8.1"
| #define HAVE_LIBM 1
| #define HAVE_LIBZ 1
| #define HAVE_GETOPT_LONG 1
| #define HAVE_SCANDIR 1
| #define HAVE_BASENAME 1
| #define HAVE_MMAP 1
| #define USE_GENERATOR68K 1
| #define USE_MAMEZ80 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_GL_GL_H 1
| /
end confdefs.h. */
|
| # if defined(HAVE_WINDOWS_H) && defined(_WIN32)
| # include <windows.h>
| # endif
| # if defined(MINGW)
| # include <GL/glew.h>
| # else
| # ifdef HAVE_GL_GL_H
| # include <GL/gl.h>
| # elif defined(HAVE_OPENGL_GL_H)
| # include <OpenGL/gl.h>
| # else
| # error no gl.h
| # endif
| # endif
|
| int
| main ()
| {
| glCreateProgram()
| ;
| return 0;
| }
configure:6781: result: no
configure:6893: error: Could not find a valid OpenGL implementation

@dciabrin
Copy link
Owner

dciabrin commented Mar 2, 2021

Oh that's apparently the same clang error that you hit with gdb. Maybe the variables that you exported earlier are not passed correctly to gngeo when it's being configured. I'm going to try and reproduce on my macOS 10.15 plus recent clang, this shouldn't be specific to Big Sur.
Meanwhile if you feel courageous, you can temporarily disable gngeo compilation by building the devkit with:

./configure <your-build-flags> --enable-external-gngeo

and rely on mame until I come up with a fix.

@dciabrin
Copy link
Owner

dciabrin commented Mar 2, 2021

So I think I have a fairly recent clang version:

$ clang --version
Apple clang version 12.0.0 (clang-1200.0.32.29)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

But I can't immediately reproduce your issue. I wonder if it could be related to the gl.h file that is being autodetected; maybe that specific one doesn't define glCreateProgram and that is what causes the failure. Do you know what package provides this file on your system?

I'll try to always inject the -Wno-implicit-function-declaration in gngeo's configure script anyway, and hope that the built binary will be able to initialize GLSL.

dciabrin added a commit to dciabrin/ngdevkit-toolchain that referenced this issue Mar 3, 2021
@dciabrin
Copy link
Owner

dciabrin commented Mar 3, 2021

The two commits above should make clang happy. You need to update your local copy of ngdevkit's repo and delete the downloaded copy of gngeo. Tell me if this fixes your compilation woes.

@LaurentGarcia
Copy link
Author

Making all in locale
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/locale'
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/ -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/targ-include -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/include -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/m68k -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/libnosys -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/libgloss/m68k -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="4.0.0" -DPACKAGE_STRING="newlib\ 4.0.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/locale -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD__ -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -g -O2 -g -Os -c -o lib_a-locale.o test -f 'locale.c' || echo '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/locale/'locale.c
/bin/sh: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross: No such file or directory
make[7]: *** [Makefile:380: lib_a-locale.o] Error 127
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/locale'
Making all in sys
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/sys'
Making all in .
make[8]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/sys'
make[8]: Nothing to be done for 'all-am'.
make[8]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/sys'
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/sys'
Making all in reent
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/reent'
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/ -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/targ-include -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/include -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/m68k -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/libnosys -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/libgloss/m68k -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="4.0.0" -DPACKAGE_STRING="newlib\ 4.0.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/reent -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD__ -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -g -O2 -g -Os -c -o lib_a-closer.o test -f 'closer.c' || echo '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/reent/'closer.c
/bin/sh: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross: No such file or directory
make[7]: *** [Makefile:439: lib_a-closer.o] Error 127
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/reent'
Making all in errno
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/errno'
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/ -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/targ-include -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/include -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/m68k -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/libnosys -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/libgloss/m68k -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="4.0.0" -DPACKAGE_STRING="newlib\ 4.0.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/errno -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD__ -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -g -O2 -g -Os -c -o lib_a-errno.o test -f 'errno.c' || echo '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/errno/'errno.c
/bin/sh: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross: No such file or directory
make[7]: *** [Makefile:345: lib_a-errno.o] Error 127
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/errno'
Making all in misc
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/misc'
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/ -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/targ-include -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/include -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/m68k -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/libnosys -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/libgloss/m68k -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="4.0.0" -DPACKAGE_STRING="newlib\ 4.0.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/misc -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD__ -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -g -O2 -g -Os -c -o lib_a-dprintf.o test -f '__dprintf.c' || echo '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/misc/'dprintf.c
/bin/sh: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross: No such file or directory
make[7]: *** [Makefile:354: lib_a-dprintf.o] Error 127
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/misc'
Making all in machine
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/machine'
Making all in m68k
make[8]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/machine/m68k'
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/ -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/targ-include -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/include -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/m68k -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/libnosys -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/libgloss/m68k -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="4.0.0" -DPACKAGE_STRING="newlib\ 4.0.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/machine/m68k -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -g -O2 -g -Os -c -o lib_a-setjmp.o test -f 'setjmp.S' || echo '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/machine/m68k/'setjmp.S
/bin/sh: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross: No such file or directory
make[8]: *** [Makefile:264: lib_a-setjmp.o] Error 127
make[8]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/machine/m68k'
Making all in .
make[8]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/machine'
rm -f lib.a
ln m68k/lib.a lib.a >/dev/null 2>/dev/null ||
cp m68k/lib.a lib.a
cp: m68k/lib.a: No such file or directory
make[8]: *** [Makefile:574: lib.a] Error 1
make[8]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/machine'
make[7]: *** [Makefile:319: all-recursive] Error 1
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/machine'
Making all in ssp
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/ssp'
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/ -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/targ-include -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/include -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/m68k -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/libnosys -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/libgloss/m68k -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="4.0.0" -DPACKAGE_STRING="newlib\ 4.0.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/ssp -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD
-DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -g -O2 -g -Os -c -o lib_a-chk_fail.o test -f 'chk_fail.c' || echo '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/ssp/'chk_fail.c
/bin/sh: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross: No such file or directory
make[7]: *** [Makefile:397: lib_a-chk_fail.o] Error 127
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/ssp'
Making all in .
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc'
rm -f libc.a
rm -rf tmp
mkdir tmp
cd tmp;
for i in argz/lib.a stdlib/lib.a ctype/lib.a search/lib.a stdio/lib.a string/lib.a signal/lib.a time/lib.a locale/lib.a reent/lib.a errno/lib.a misc/lib.a ssp/lib.a machine/lib.a ; do
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar x ../$i;
done;
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar rc ../libc.a *.o
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../argz/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../stdlib/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../ctype/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../search/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../stdio/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../string/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../signal/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../time/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../locale/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../reent/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../errno/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../misc/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../ssp/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: ../machine/lib.a: No such file or directory
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../ngbinutils/binutils/ar: *.o: No such file or directory
make[7]: *** [Makefile:1034: libc.a] Error 1
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc'
make[6]: *** [Makefile:683: all-recursive] Error 1
make[6]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc'
make[5]: *** [Makefile:641: all-recursive] Error 1
make[5]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib'
make[4]: *** [Makefile:452: all] Error 2
make[4]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib'
make[3]: *** [Makefile:8524: all-target-newlib] Error 2
make[3]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib'
make[2]: *** [Makefile:911: all] Error 2
make[2]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib'
make[1]: *** [Makefile:171: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib] Error 2
make[1]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain'
make: *** [Makefile:65: build-toolchain] Error 2

Thanks seems like it's still getting some errors.

@dciabrin
Copy link
Owner

dciabrin commented Mar 4, 2021

Hmm this one is more complex to troubleshoot. It means the gcc cross compiler failed to build, as to why I have no idea yet because ngdevkit-toolchain doesn't produce an easily parseable compilation log.

Did you spot another earlier error when building in ./build/nggcc?
If you don't have any logs available, I shall try to put my hands on a Big Sur env and test the build myself to check whether I can reproduce it easily.

@LaurentGarcia
Copy link
Author

I think the very first error was trying to create two folders here, permissions error to create that folders:

/usr/local/m68k-neogeo-elf/
/usr/local/z80-neogeo-ihx/

And then the very first error I believe it's this one:

Making all in libc
make[6]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc'
Making all in argz
make[7]: Entering directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/argz'
/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/ -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/targ-include -isystem /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/include -B/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/m68k -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/libgloss/libnosys -L/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/libgloss/m68k -DPACKAGE_NAME="newlib" -DPACKAGE_TARNAME="newlib" -DPACKAGE_VERSION="4.0.0" -DPACKAGE_STRING="newlib\ 4.0.0" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -I. -I/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/argz -Os -fno-builtin -DCOMPACT_CTYPE -D__SINGLE_THREAD__ -DMISSING_SYSCALL_NAMES -DHAVE_INIT_FINI -g -O2 -g -Os -c -o lib_a-dummy.o test -f 'dummy.c' || echo '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/toolchain/toolchain/newlib-4.0.0/newlib/libc/argz/'dummy.c
/bin/sh: /Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/../nggcc/gcc/gcc-cross: No such file or directory
make[7]: *** [Makefile:393: lib_a-dummy.o] Error 127
make[7]: Leaving directory '/Users/laurenmanuelgarciacarro/Code/repositories/ngdevkit/build/ngnewlib/m68k-neogeo-elf/newlib/libc/argz'
Making all in stdlib

@dciabrin
Copy link
Owner

dciabrin commented Mar 5, 2021

ok, I have no good means of installing the devkit from source into a directory which doesn't have write permission, because the compilation and the installtion process are somehow intertwined and I don't want to run sudo in the makefile directly.

For now, I'm afraid your best option is to reconfigure the toolkit to deploy into an isolated directory with write permission. By default it's /local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants