Skip to content

Latest commit

 

History

History
69 lines (54 loc) · 3.16 KB

File metadata and controls

69 lines (54 loc) · 3.16 KB

OpenSoF2MP Compilation Issues Investigation

GUID Redefinition Issue (Fixed)

Problem Description

During compilation of the OpenJK SP (Single Player) codebase, we encountered numerous errors related to GUID constant redefinitions in codemp/client/snd_dma.cpp. These errors occurred because the file was defining GUID constants that were already defined in the EAX header files.

Root Cause Analysis

The issue was caused by duplicate GUID definitions in codemp/client/snd_dma.cpp. The code was defining constants like:

  • EAXPROPERTYID_EAX40_FXSlot0
  • EAXPROPERTYID_EAX40_FXSlot1
  • EAXPROPERTYID_EAX40_FXSlot2
  • EAXPROPERTYID_EAX40_FXSlot3
  • EAXPROPERTYID_EAX40_Context
  • EAXPROPERTYID_EAX40_Source
  • EAX_NULL_GUID
  • EAX_PrimaryFXSlotID
  • EAX_REVERB_EFFECT

These constants were already properly defined in codemp/client/eax/eax.h which is included via snd_local.h.

Solution Applied

Removed the duplicate GUID constant definitions from codemp/client/snd_dma.cpp since they are already provided by the EAX header files. The GUIDs are accessible through the proper include chain: snd_dma.cppsnd_local.heax/eax.h

Verification

After removing the duplicate definitions, compilation progressed significantly further, indicating the GUID-related errors were resolved. The compilation now fails at later stages due to unrelated issues (missing game-specific headers and definitions).

Remaining Compilation Issues (Not Fixed)

Overview

While the GUID issue has been resolved, there remain numerous other compilation errors that are unrelated to GUIDs. These include:

  1. Missing type definitions:

    • bgEntity_t
    • material_t
    • saberInfo_t
    • forcePowers_t
    • siegePers_t
  2. Missing constants:

    • Game type constants (GT_TEAM, GT_DUEL, GT_SIEGE, etc.)
    • Weapon constants (WP_BRYAR_PISTOL, WP_SABER, etc.)
    • Force power constants (FP_LEVITATION, NUM_FORCE_POWERS, etc.)
  3. Missing header files:

    • AI.h
    • Various game-specific headers
  4. Missing function declarations:

    • BG_TempAlloc, BG_TempFree, BG_Alloc
    • Various force power and saber-related functions

Analysis

These remaining errors suggest that:

  1. The codebase has missing or incorrect dependencies
  2. There may be missing game modules that should be compiled alongside the client
  3. Some files may be expecting a different version of the game headers
  4. The build configuration may be incomplete or incorrect

Recommendation

To address these remaining issues, further investigation is needed:

  1. Verify that all required game modules and headers are present in the repository
  2. Check the build configuration to ensure all necessary dependencies are included
  3. Investigate whether the single-player branch requires additional game-specific files that are not currently in the repository
  4. Compare against the known working OpenJK codebase to identify missing components

Summary

The GUID redefinition issue has been successfully fixed, allowing compilation to proceed beyond the initial GUID errors. However, additional work is needed to resolve the remaining compilation issues related to missing game-specific definitions and headers.