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

gcc-14 build failure #546

Open
Shoegzer opened this issue Jul 30, 2024 · 3 comments
Open

gcc-14 build failure #546

Shoegzer opened this issue Jul 30, 2024 · 3 comments

Comments

@Shoegzer
Copy link

Shoegzer commented Jul 30, 2024

This project builds with gcc-13 but fails with gcc-14. Tested using Linux Mint 22.

custom/dependencies/libzlib/gzlib.c:14:17: error: implicit declaration of function 'lseek'; did you mean 'fseek'? [-Wimplicit-function-declaration]
   14 | #  define LSEEK lseek
      |                 ^~~~~
custom/dependencies/libzlib/gzlib.c:256:24: note: in expansion of macro 'LSEEK'
  256 |         state->start = LSEEK(state->fd, 0, SEEK_CUR);
      |                        ^~~~~
make: *** [Makefile:690: custom/dependencies/libzlib/gzlib.o] Error 1
make: *** Waiting for unfinished jobs....
custom/dependencies/libzlib/gzwrite.c: In function 'gz_comp':
custom/dependencies/libzlib/gzwrite.c:84:15: error: implicit declaration of function 'write'; did you mean 'fwrite'? [-Wimplicit-function-declaration]
   84 |         got = write(state->fd, strm->next_in, strm->avail_in);
      |               ^~~~~
      |               fwrite
custom/dependencies/libzlib/gzwrite.c: In function 'gzclose_w':
custom/dependencies/libzlib/gzwrite.c:573:9: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
  573 |     if (close(state->fd) == -1)
      |         ^~~~~
      |         pclose
make: *** [Makefile:690: custom/dependencies/libzlib/gzwrite.o] Error 1
custom/dependencies/libzlib/gzread.c: In function 'gz_load':
custom/dependencies/libzlib/gzread.c:30:15: error: implicit declaration of function 'read'; did you mean 'fread'? [-Wimplicit-function-declaration]
   30 |         ret = read(state->fd, buf + *have, len - *have);
      |               ^~~~
      |               fread
custom/dependencies/libzlib/gzread.c: In function 'gzclose_r':
custom/dependencies/libzlib/gzread.c:591:11: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Wimplicit-function-declaration]
  591 |     ret = close(state->fd);
      |           ^~~~~
      |           pclose
make: *** [Makefile:690: custom/dependencies/libzlib/gzread.o] Error 1

@fmahnke hoping you have some ideas here since you fixed gcc-13?

@m4xw
Copy link
Collaborator

m4xw commented Jul 30, 2024

https://gcc.gnu.org/gcc-14/porting_to.html I guess thats what is going on

@gouchi
Copy link
Member

gouchi commented Aug 13, 2024

You may try to make some test with this PR.

@vanfanel
Copy link

Seeing the same problem here with GCC version 14.2.0 on Debian

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

No branches or pull requests

4 participants