Skip to content

[Bug]: conflicting types for je_safety_check_set_abort in jemalloc #1

Description

@natrist

Branch

Both

Bug Description

Building wooly-beast fails with this error (GCC/Clang strict mode, recent Ubuntu):

In file included from .../safety_check.c:1:
/.../jemalloc_preamble.h:20:25: error: conflicting types for ‘je_safety_check_set_abort’;
have ‘void(void (*)(const char *))’ vs previous ‘void(void (*)(void))’

Caused by type mismatch in safety_check_set_abort between safety_check.h (void ()(void)) and safety_check.c (void ()(const char *)).

This is a known jemalloc issue fixed upstream in 5.3.0+ via proper typedef, but TrinityCore's older bundled version doesn't have it.

Workarounds that succeed:

  • -DNOJEM=1 in CMake (disables jemalloc)
  • Manually edit dep/jemalloc/include/jemalloc/internal/safety_check.h line 6 to:
    void safety_check_set_abort(void (*abort_fn)(const char *));

Compiler version:

  • gcc (Ubuntu 15.2.0-4ubuntu4) 15.2.0
  • Ubuntu clang version 20.1.8 (0ubuntu4)

Operating system version:
Ubuntu 25.10 (GNU/Linux 6.17.0-8-generic x86_64)

Current Behavior

The projects do not compile.

Expected Behavior

Compilation should succeed with default installation settings.

Steps to Reproduce

  1. Build the projects on Ubuntu Linux using GCC or Clang with their default settings

TrinityCore Version

N/A

Database Version

N/A

Operating System

Ubuntu 24.04

Additional Context

No response

Confirmation

  • I have searched existing issues and this is not a duplicate
  • I have tested this on a clean TrinityCore installation

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions