Skip to content

Conversation

@konchunas
Copy link

Two changes:

First one forces latest libpng dependency version to fix missing "fp.h" include on Mac: libpng/pull/529

Second one omits AVX and SSE flags for ARM64 since those extensions are unsupported.

This allows me to generate the .xcodeproj and build it, but it fails on linking phase due to kubazip and miniz conflict (possibly?). I get 115 duplicate symbols in Xcode and the following log (shortened):

ld: warning: ignoring duplicate libraries: '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libjasper.a', '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libjpeg.a', '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libjpegxr.a', '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libjxrglue.a', '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/liblzma.a', '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libtiff.a', '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libz.a', '/Users/julian/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/manual-link/libraw.a'
duplicate symbol '_mz_zip_reader_extract_iter_read' in:
    /Users/user/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libminiz.a[3](miniz_zip.c.o)
    /Users/user/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libkubazip.a[2](zip.c.o)
...
duplicate symbol '_mz_zip_clear_last_error' in:
    /Users/user/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libminiz.a[3](miniz_zip.c.o)
    /Users/user/Projects/TrenchBroomBFG/build-xcode/vcpkg_installed/arm64-osx/lib/libkubazip.a[2](zip.c.o)

A help would be appreciated.
Thanks!

@konchunas
Copy link
Author

Alright, I have fixed that 115 duplicate symbols by linking miniz::miniz privately in CMakeLists.txt in third commit.

Now it compiles and launches into main window.
But I can not create a new map as it crashes on TrenchBroom::View::GLContextManager::initialize. Both GLRenderer and GLVendor contain "unknown".
I would say it might be related to pool OpenGL support on MacOS, but mainline TrenchBroom works just fine.

Do you have an idea how to fix that?

@RobertBeckebans
Copy link
Owner

Your branch compiles on Fedora 42 but when I try to make a new map I get the following error:

Bildschirmfoto_20250530_163730

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

Successfully merging this pull request may close these issues.

2 participants