binutils-esp32ulp icon indicating copy to clipboard operation
binutils-esp32ulp copied to clipboard

Compilation Error

Open jshnaidman opened this issue 3 years ago • 0 comments

gcc -c -DHAVE_CONFIG_H -g -O2 -D__USE_MINGW_ACCESS  -I. -I./../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic  -D_GNU_SOURCE ./pex-win32.c -o pex-win32.o
./pex-win32.c: In function ‘pex_win32_open_read’:
./pex-win32.c:121:10: warning: implicit declaration of function ‘_open’; did you mean ‘open’? [-Wimplicit-function-declaration]
  121 |   return _open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
      |          ^~~~~
      |          open
./pex-win32.c:121:23: error: ‘_O_RDONLY’ undeclared (first use in this function); did you mean ‘O_RDONLY’?
  121 |   return _open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
      |                       ^~~~~~~~~
      |                       O_RDONLY
./pex-win32.c:121:23: note: each undeclared identifier is reported only once for each function it appears in
./pex-win32.c:121:45: error: ‘_O_BINARY’ undeclared (first use in this function); did you mean ‘O_BINARY’?
  121 |   return _open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
      |                                             ^~~~~~~~~
      |                                             O_BINARY
./pex-win32.c:121:57: error: ‘_O_TEXT’ undeclared (first use in this function); did you mean ‘O_TEXT’?
  121 |   return _open (name, _O_RDONLY | (binary ? _O_BINARY : _O_TEXT));
      |                                                         ^~~~~~~
      |                                                         O_TEXT
./pex-win32.c: In function ‘pex_win32_open_write’:
./pex-win32.c:135:4: error: ‘_O_WRONLY’ undeclared (first use in this function); did you mean ‘O_WRONLY’?
  135 |   (_O_WRONLY | _O_CREAT | _O_TRUNC
      |    ^~~~~~~~~
      |    O_WRONLY
./pex-win32.c:135:16: error: ‘_O_CREAT’ undeclared (first use in this function); did you mean ‘O_CREAT’?
  135 |   (_O_WRONLY | _O_CREAT | _O_TRUNC
      |                ^~~~~~~~
      |                O_CREAT
./pex-win32.c:135:27: error: ‘_O_TRUNC’ undeclared (first use in this function); did you mean ‘O_TRUNC’?
  135 |   (_O_WRONLY | _O_CREAT | _O_TRUNC
      |                           ^~~~~~~~
      |                           O_TRUNC
./pex-win32.c:136:16: error: ‘_O_BINARY’ undeclared (first use in this function); did you mean ‘O_BINARY’?
  136 |    | (binary ? _O_BINARY : _O_TEXT)),
      |                ^~~~~~~~~
      |                O_BINARY
./pex-win32.c:136:28: error: ‘_O_TEXT’ undeclared (first use in this function); did you mean ‘O_TEXT’?
  136 |    | (binary ? _O_BINARY : _O_TEXT)),
      |                            ^~~~~~~
      |                            O_TEXT
./pex-win32.c:137:3: error: ‘_S_IREAD’ undeclared (first use in this function); did you mean ‘S_IREAD’?
  137 |   _S_IREAD | _S_IWRITE);
      |   ^~~~~~~~
      |   S_IREAD
./pex-win32.c:137:14: error: ‘_S_IWRITE’ undeclared (first use in this function); did you mean ‘S_IWRITE’?
  137 |   _S_IREAD | _S_IWRITE);
      |              ^~~~~~~~~
      |              S_IWRITE
./pex-win32.c: In function ‘pex_win32_close’:
./pex-win32.c:145:10: warning: implicit declaration of function ‘_close’; did you mean ‘close’? [-Wimplicit-function-declaration]
  145 |   return _close (fd);
      |          ^~~~~~
      |          close
./pex-win32.c: In function ‘win32_spawn’:
./pex-win32.c:652:10: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  652 |   return (pid_t) pi->hProcess;
      |          ^
./pex-win32.c: In function ‘spawn_script’:
./pex-win32.c:674:31: error: ‘_O_RDONLY’ undeclared (first use in this function); did you mean ‘O_RDONLY’?
  674 |   int fd = _open (executable, _O_RDONLY);
      |                               ^~~~~~~~~
      |                               O_RDONLY
./pex-win32.c:681:17: warning: implicit declaration of function ‘_read’; did you mean ‘read’? [-Wimplicit-function-declaration]
  681 |       int len = _read (fd, buf, sizeof (buf) - 1);
      |                 ^~~~~
      |                 read
./pex-win32.c: In function ‘pex_win32_exec_child’:
./pex-win32.c:779:8: warning: implicit declaration of function ‘_dup’; did you mean ‘dup’? [-Wimplicit-function-declaration]
  779 |   in = _dup (orig_in);
      |        ^~~~
      |        dup
./pex-win32.c: In function ‘pex_win32_wait’:
./pex-win32.c:911:7: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  911 |   h = (HANDLE) pid;
      |       ^
./pex-win32.c: In function ‘pex_win32_pipe’:
./pex-win32.c:943:10: warning: implicit declaration of function ‘_pipe’; did you mean ‘pipe’? [-Wimplicit-function-declaration]
  943 |   return _pipe (p, 256, (binary ? _O_BINARY : _O_TEXT) | _O_NOINHERIT);
      |          ^~~~~
      |          pipe
./pex-win32.c:943:35: error: ‘_O_BINARY’ undeclared (first use in this function); did you mean ‘O_BINARY’?
  943 |   return _pipe (p, 256, (binary ? _O_BINARY : _O_TEXT) | _O_NOINHERIT);
      |                                   ^~~~~~~~~
      |                                   O_BINARY
./pex-win32.c:943:47: error: ‘_O_TEXT’ undeclared (first use in this function); did you mean ‘O_TEXT’?
  943 |   return _pipe (p, 256, (binary ? _O_BINARY : _O_TEXT) | _O_NOINHERIT);
      |                                               ^~~~~~~
      |                                               O_TEXT
./pex-win32.c:943:58: error: ‘_O_NOINHERIT’ undeclared (first use in this function)
  943 |   return _pipe (p, 256, (binary ? _O_BINARY : _O_TEXT) | _O_NOINHERIT);
      |                                                          ^~~~~~~~~~~~
./pex-win32.c:944:1: warning: control reaches end of non-void function [-Wreturn-type]
  944 | }
      | ^
./pex-win32.c: In function ‘pex_win32_open_write’:
./pex-win32.c:138:1: warning: control reaches end of non-void function [-Wreturn-type]
  138 | }
      | ^
./pex-win32.c: In function ‘pex_win32_open_read’:
./pex-win32.c:122:1: warning: control reaches end of non-void function [-Wreturn-type]
  122 | }
      | ^
make[2]: *** [Makefile:1121: pex-win32.o] Error 1
make[2]: Leaving directory '/home/jacob/esp/esp-idf/binutils-esp32ulp/libiberty'
make[1]: *** [Makefile:8376: all-libiberty] Error 2
make[1]: Leaving directory '/home/jacob/esp/esp-idf/binutils-esp32ulp'
make: *** [Makefile:858: all] Error 2
$ gcc --version
gcc (GCC) 10.2.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Building on windows 10 doing:

CC=gcc ./configure
make

jshnaidman avatar Jul 11 '21 22:07 jshnaidman