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

Werror failing due to _LARGEFILE64_SOURCE #291

Closed
nh2 opened this issue May 29, 2024 · 2 comments · Fixed by #301
Closed

Werror failing due to _LARGEFILE64_SOURCE #291

nh2 opened this issue May 29, 2024 · 2 comments · Fixed by #301

Comments

@nh2
Copy link
Contributor

nh2 commented May 29, 2024

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

?

@asmaloney
Copy link
Owner

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...

nh2 added a commit to nh2/libE57Format that referenced this issue Jun 23, 2024
The warning I got was "_LARGEFILE64_SOURCE" redefined".

Most likely, the same issue can exist for "__LARGE64_FILES";
applying the same fix it for that one as well even though I can't test
it.
@nh2
Copy link
Contributor Author

nh2 commented Jun 23, 2024

The immediate workaround is provided by merged PR #299 which disables -Werror.

Full warning fix at my PR #301

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

Successfully merging a pull request may close this issue.

2 participants