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

Build fails on github macos-latest (MacOS 14.5) runners with "no member named '_rjem_realloc' in namespace 'std'" #12708

Open
andlr opened this issue May 29, 2024 · 4 comments

Comments

@andlr
Copy link
Contributor

andlr commented May 29, 2024

Expected behavior

RocksDB can be built on MacOS

Actual behavior

On updated github runners with MacOS 14.5, build fails with:

warning: [email protected]: In file included from /.../rocksdb/memory/jemalloc_nodump_allocator.cc:1:
warning: [email protected]: In file included from /.../rocksdb/memory/jemalloc_nodump_allocator.cc:13:
warning: [email protected]: In file included from /.../rocksdb/include/rocksdb/convenience.h:13:
warning: [email protected]: In file included from /.../rocksdb/include/rocksdb/db.h:21:
warning: [email protected]: In file included from /.../rocksdb/include/rocksdb/iterator.h:26:
warning: [email protected]: In file included from /.../rocksdb/include/rocksdb/wide_columns.h:8:
warning: [email protected]: In file included from /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/ostream:172:
warning: [email protected]: /Applications/Xcode_15.0.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/locale:2827:22: error: no member named '_rjem_realloc' in namespace 'std'; did you mean simply '_rjem_realloc'?
warning: [email protected]:     _Tp* __t = (_Tp*)std::realloc(__owns ? __b.get() : 0, __new_cap);
warning: [email protected]:                      ^~~~~
warning: [email protected]: /.../jemalloc/jemalloc.h:267:32: note: '_rjem_realloc' declared here
warning: [email protected]:     void JEMALLOC_SYS_NOTHROW   *je_realloc(void *ptr, size_t size)
warning: [email protected]:                                  ^
warning: [email protected]: /.../include/jemalloc/jemalloc.h:86:22: note: expanded from macro 'je_realloc'
warning: [email protected]: #  define je_realloc _rjem_realloc
warning: [email protected]:                      ^
warning: [email protected]: 1 warning and 1 error generated.

Steps to reproduce the behavior

This became an intermittent problem recently. Github rolls out newer build agents with MacOS 14.5 (more than half of the CI/CD runs land on older build agents with MacOS 14.4.1, and build doesn't fail there). macos-latest now can have either MacOS 14.4.1 or MacOS 14.5 installed, and build fails on the latter.

@andlr
Copy link
Contributor Author

andlr commented May 29, 2024

Including "rocksdb/convenience.h" before "port/jemalloc_helper.h" like here fixes the build.
But I am not sure it's the only place which needs a fix, it's only enough to fix RocksDB lib build.
It seems that some utilities / tests may also have this problem

@alanpaxton
Copy link
Contributor

@andlr I am trying to reproduce this. Could you share how you are configuring github actions ? Is there are branch/PR ? facebook/main/.github/workflows/pr-jobs.yml explicitly runs-on: macos-13 and xcode-version: 14.3.1
Have you simply changed to runs-on: macos-latest ? Your log reports that you are using Xcode_15.0.1.app

I can build successfully (make clean; make -j16 all) on my MBP with MacOS 14.5 with XCode 15.4

@andlr
Copy link
Contributor Author

andlr commented Jun 10, 2024

The project where we're using RocksDB uses macos-latest github runners for MacOS builds, and it started failing whenever build lands on a build runner with MacOS 14.5 and Xcode 15.0.1.

And the build uses jemalloc, with these env variables

export ROCKSDB_JEMALLOC
export JEMALLOC_NO_DEMANGLE
make -j16 static_lib

@andlr andlr changed the title MacOS 14.5 build fails with "no member named '_rjem_realloc' in namespace 'std'" Build fails on github macos-latest (MacOS 14.5) runners with "no member named '_rjem_realloc' in namespace 'std'" Jun 10, 2024
@alanpaxton
Copy link
Contributor

Hi @andlr - thanks. Building RocksDB locally with jemalloc on MacOS 14.5 and Xcode 15.0.1 works fine for me. If you could share all the details of how you build RocksDB on github actions, i.e. the contents of the .github/workflows/.yml file you use, I may have a better chance of reproducing the problem by running actions myself.

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

No branches or pull requests

2 participants