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

[BUG] Build fails on Gentoo Linux, gcc 14.2.1, and clang 19.1.3 #254

Open
NuLL3rr0r opened this issue Nov 20, 2024 · 2 comments
Open

[BUG] Build fails on Gentoo Linux, gcc 14.2.1, and clang 19.1.3 #254

NuLL3rr0r opened this issue Nov 20, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@NuLL3rr0r
Copy link

Describe the bug
I clone the code run build.sh then it immediately fails:

./build-release.sh 
Building for Linux...
Building everything on linux (release)...
--- Performing kohi.tools.versiongen release build ---
kohi.tools.versiongen/src/main.c...
kohi.tools.versiongen/src/main.c:45:17: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
   45 |                 fread(read_version, fsize, 1, f);
      |                 ^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile.executable.mak:144: obj/kohi.tools.versiongen/src/main.c.o] Error 1
error:

To Reproduce
Steps to reproduce the behavior:

  1. Clone
  2. make
  3. See error

Expected behavior
The code should built.

Desktop (please complete the following information):

  • OS: Gentoo Linux
  • Browser Brave
  • Version : Latest
$ uname -a                                 
Linux mamadou-dev-pc 6.6.59 #24 SMP PREEMPT_DYNAMIC Sun Nov  3 02:01:04 CET 2024 x86_64 AMD Ryzen Threadripper 3960X 24-Core Processor AuthenticAMD GNU/Linux
@NuLL3rr0r NuLL3rr0r added the bug Something isn't working label Nov 20, 2024
@NuLL3rr0r
Copy link
Author

Interesting part is if I rung with CC=gcc CXX=g++ ./build-debug.sh or CC=clang CXX=clang++ ./build-debug.sh it moves forward but still fails.

$ CC=gcc CXX=g++ ./build-debug.sh
Building for Linux...
Building everything on linux (debug)...
--- Performing kohi.tools.versiongen debug build ---
kohi.tools.versiongen/src/main.c...
Linking kohi.tools.versiongen...
--- Performing kohi.core debug build ---
kohi.core/src/identifiers/uuid.c...
kohi.core/src/identifiers/identifier.c...
kohi.core/src/identifiers/khandle.c...
kohi.core/src/time/kclock.c...
kohi.core/src/logger.c...
kohi.core/src/memory/allocators/dynamic_allocator.c...
kohi.core/src/memory/allocators/linear_allocator.c...
kohi.core/src/memory/kmemory.c...
kohi.core/src/threads/worker_thread.c...
kohi.core/src/threads/threadpool.c...
kohi.core/src/strings/kstring.c...
kohi.core/src/platform/filesystem.c...
kohi.core/src/platform/platform_linux.c...
kohi.core/src/platform/platform_win32.c...
kohi.core/src/platform/platform_nix.c...
kohi.core/src/math/geometry.c...
kohi.core/src/math/kmath.c...
kohi.core/src/math/geometry_3d.c...
kohi.core/src/math/mtwister.c...
kohi.core/src/containers/queue.c...
kohi.core/src/containers/hashtable.c...
kohi.core/src/containers/stack.c...
kohi.core/src/containers/ring_queue.c...
kohi.core/src/containers/freelist.c...
kohi.core/src/containers/registry.c...
kohi.core/src/containers/darray.c...
kohi.core/src/utils/ksort.c...
kohi.core/src/parsers/kson_parser.c...
Linking kohi.core...
�[0;31merror�[0m:

@NuLL3rr0r
Copy link
Author

Sorry, my bad it was with the debug builds that move forward, with the release it's the same error as the original report.

CC=gcc CXX=g++ ./build-release.sh
Building for Linux...
Building everything on linux (release)...
--- Performing kohi.tools.versiongen release build ---
kohi.tools.versiongen/src/main.c...
kohi.tools.versiongen/src/main.c:45:17: error: ignoring return value of function declared with 'warn_unused_result' attribute [-Werror,-Wunused-result]
   45 |                 fread(read_version, fsize, 1, f);
      |                 ^~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
make: *** [Makefile.executable.mak:144: obj/kohi.tools.versiongen/src/main.c.o] Error 1
error:


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants