Werror failing due to _LARGEFILE64_SOURCE
nh2 opened this issue · 2 comments
nh2 commented
Trying to package 3.1.1 for nixpkgs:
/build/source/src/CheckedFile.cpp:47: error: "_LARGEFILE64_SOURCE" redefined [-Werror]
47 | #define _LARGEFILE64_SOURCE
|
In file included from /nix/store/14c6s4xzhy14i2b05s00rjns2j93gzz4-gcc-13.2.0/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/os_defines.h:39,
from /nix/store/14c6s4xzhy14i2b05s00rjns2j93gzz4-gcc-13.2.0/include/c++/13.2.0/x86_64-unknown-linux-gnu/bits/c++config.h:679,
from /nix/store/14c6s4xzhy14i2b05s00rjns2j93gzz4-gcc-13.2.0/include/c++/13.2.0/cstdint:38,
from <command-line>:
/nix/store/fwh4fxd747m0py3ib3s5abamia9nrf90-glibc-2.39-52-dev/include/features.h:220: note: this is the location of the previous definition
220 | # define _LARGEFILE64_SOURCE 1
|
The CMakeLists.txt
sets -Werror
here: https://github.com/asmaloney/libE57Format/blob/v3.1.1/CMakeLists.txt#L162
Maybe needs #ifndef
like in
- https://bugs.launchpad.net/stress-ng/+bug/1800828
- https://launchpadlibrarian.net/395441247/0002-stress-ng.h-conditionally-define-_-LARGEFILE-LARGEFI.patch
?
asmaloney commented
Thanks Niklas. I'll accept a PR for the #ifndef
solution.
As I mentioned elsewhere, the whole #ifdef nightmare in this file should be cleaned up since it's been the source of so many problems.
But first someone needs to fix the CI issues...