Skip to content

Fix Linux build and compilation errors#223

Draft
google-labs-jules[bot] wants to merge 317 commits intomainfrom
build-fix-linux
Draft

Fix Linux build and compilation errors#223
google-labs-jules[bot] wants to merge 317 commits intomainfrom
build-fix-linux

Conversation

@google-labs-jules
Copy link
Contributor

This PR fixes the build process for Linux by introducing a CMakeLists.txt file and resolving several compilation errors.

Key changes:

  1. Build System: Added CMakeLists.txt to compile the game DLL (libgame.so).
  2. Dependencies: Configured fmt to use header-only mode with local headers. Included specific jsoncpp source files from the local vcpkg cache because system libraries were missing or incompatible, and the repo lacks a full jsoncpp source tree.
  3. Code Fixes:
    • Replaced isnan and isinf with std::isnan and std::isinf in various files (g_ai_new.cpp, g_phys.cpp, g_save.cpp, monsters/m_move.cpp, monsters/m_stalker.cpp) to comply with standard C++.
    • Fixed function redefinition errors where static functions were declared extern or redefined (g_func.cpp, g_items.cpp, g_target.cpp).
    • Fixed G_Fmt macro in q_std.h using ##__VA_ARGS__ to correctly handle cases with no variadic arguments.
  4. Cleanup: Removed conflicting/broken local fmt source files (src/fmt.cc, src/format.cc, src/os.cc) as we are using the header-only approach.

The project now compiles successfully on Linux using CMake.


PR created automatically by Jules for task 4541939545878393982 started by @themuffinator

…-in-cmd_setmap_f Improve map list validation in setmap command
…ms-for-round-management Defer team balance during rounds
…licate-entries-in-initsave Handle duplicate save registry entries
…ctivator-in-g_printactivationmessage Handle null trigger activators safely
…oice-buffer-with-dynamic-container Use dynamic choice list for target selection
…-for-last-segment Fix JSON stack pop handling
…_t-fetch-error-handling Handle invalid save data lookups
…n-pickup_doppelganger Add doppelganger pickup limits
…se-half-open-range Fix stuck object sorting range and add harness
…awn-initialization Add CTF spawn initialization and checks
…owscores-reset Ensure deathmatch intermission retains scoreboard
…ng-determination-for-all-game-modes Implement victor string builder and HUD tests
…ngth-buffers Handle COM_ParseEx buffer edge cases
…ndex-to-client-state Make pain animation cycle per-client
themuffinator and others added 27 commits November 25, 2025 21:35
…n-g_save-and-g_utils Fix MSVC compilation errors
…,-std-max,-std-clamp Fix damage indicator clamp type
…uffer-to-std-array Refactor token buffer to std array
…age-to-std-array Use array for pushed stack and index tracking
…t-to-use-std-array Use local buffers for vector and color parsing
…se-std-array-or-std-string Refactor menu text buffers
…nk-path-points Use std::array for monster debug path points
…-safer-containers-409112 Replace menu text buffers with bounded strings
…or-index-array Add capacity guard to TeamBalance index population
…tion-before-allocation Improve JSON serialization size safety
…-static_assert-checks Tighten stat bound checks
…-for-game-menu-commands Add vote logic for additional callvote menu options
…d-error Fix menu text bounds and admin menu definition
- Create CMakeLists.txt to build libgame.so. - Use local fmt headers and jsoncpp sources from vcpkg cache (due to broken system/vcpkg libs). - Fix `isnan` to `std::isnan` in C++ sources. - Fix redefinition errors in `src/g_func.cpp`, `src/g_items.cpp`, `src/g_target.cpp`. - Fix `G_Fmt` macro in `src/q_std.h` to handle empty variadic arguments. - Address multiple narrowing conversion warnings (non-fatal). - Use header-only mode for fmt.
@google-labs-jules
Copy link
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

@ozy24 ozy24 force-pushed the main branch 2 times, most recently from e51338e to c2adaf5 Compare December 27, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant