darlinghq / darling

Darwin/macOS emulation layer for Linux
http://www.darlinghq.org
GNU General Public License v3.0
11.45k stars 445 forks source link

Failed build: ../src/external/objc4/runtime/objc-runtime.mm:124:2: error: mismatch in debug-ness macros #1017

Closed JCWasmx86 closed 3 years ago

JCWasmx86 commented 3 years ago

Build Log What is the build error? - ../src/external/objc4/runtime/objc-runtime.mm:124:2: error: mismatch in debug-ness macros

See file
[build.log](https://github.com/darlinghq/darling/files/7046512/build.log)

System Information What system are you building with?

Software Version
Clang Fedora 12.0.1-1.fc34
CMake 3.20.5
Linux Kernel 5.13.9-200.fc34.x86_64
Darling 9393db2c6ed530acaa2a4a933c391f1363fea1e8

cmake commands:

cmake -DCMAKE_BUILD_TYPE=Release -DFULL_BUILD=ON -DADDITIONAL_PACKAGES=ON -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/darling ..
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFULL_BUILD=ON -DADDITIONAL_PACKAGES=ON -G Ninja -DCMAKE_INSTALL_PREFIX=/opt/darling ..

Both fail with the same error. It doesn't matter, whether I use ninja or make

LubosD commented 3 years ago

Then don't pass CMAKE_BUILD_TYPE=Release to the build...

JCWasmx86 commented 3 years ago

Removing CMAKE_BUILD_TYPE solved it

TheBrokenRail commented 3 years ago

IMO Darling should be able to build in Release mode for any potential size or performance benefits.

LubosD commented 3 years ago

IMO Darling should be able to build in Release mode for any potential size or performance benefits.

It's quite problematic, we'd have to implement various CFLAGS filters in different packages. We know that certain optimizations cause linker errors in libc and weird crashes in objc :-(