ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

[MacOS Sequioa 15.0.1 M1 Pro] Build fails when building fontconfig

Open nikolalukovic opened this issue 1 year ago • 3 comments

Both

CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ ./Meta/ladybird.sh run ladybird

and

./Meta/ladybird.sh run ladybird

fail with the same error:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /opt/homebrew/bin/ninja install -v
    Working Directory: /Users/nikola/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/fontconfig/arm64-osx-rel
    Error code: 1
    See logs for more information:
      /Users/nikola/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/fontconfig/package-arm64-osx-rel-out.log

Call Stack (most recent call first):
  /Users/nikola/src/ladybird/Build/ladybird/vcpkg_installed/arm64-osx/share/vcpkg-tool-meson/vcpkg_install_meson.cmake:33 (vcpkg_execute_required_process)
  buildtrees/versioning_/versions/fontconfig/de73339d579963e68fed652ed2e206b307a0c03f/portfile.cmake:40 (vcpkg_install_meson)
  scripts/ports.cmake:192 (include)


error: building fontconfig:arm64-osx failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle fontconfig:arm64-osx: 7 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+fontconfig
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[fontconfig]+Build+error+on+arm64-osx&body=Copy+issue+body+from+%2FUsers%2Fnikola%2Fsrc%2Fladybird%2FBuild%2Fladybird%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md

-- Running vcpkg install - failed
CMake Error at Toolchain/Tarballs/vcpkg/scripts/buildsystems/vcpkg.cmake:904 (message):
  vcpkg install failed.  See logs for more information:
  /Users/nikola/src/ladybird/Build/ladybird/vcpkg-manifest-install.log
Call Stack (most recent call first):
  /opt/homebrew/Cellar/cmake/3.30.5/share/cmake/Modules/CMakeDetermineSystem.cmake:146 (include)
  CMakeLists.txt:15 (project)


CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!

The log from: /Users/nikola/src/ladybird/Toolchain/Tarballs/vcpkg/buildtrees/fontconfig/package-arm64-osx-rel-out.log is attached as log.txt. It complains about Undefined symbols for architecture arm64 for:

  • fc-list/fc-list
  • fc-cache/fc-cache
  • fc-cat/fc-cat
  • fc-pattern/fc-pattern
  • fc-scan/fc-scan
  • fc-validate/fc-validate
  • fc-query/fc-query
  • fc-match/fc-match
  • fc-conflist/fc-conflist

I'm not sure if I should create an issue in vcpkg repo instead?

log.txt

nikolalukovic avatar Oct 10 '24 10:10 nikolalukovic

The build log you posted is about libpng. There was some issue with libpng a while ago. What ladybird commit and vcpkg commit are you pulling from? We clone vcpkg into Toolchain/Tarballs/vcpkg from Toolchain/BuildVcpkg.sh

ADKaster avatar Oct 10 '24 16:10 ADKaster

Ladybird commit: d6a8fc00c3435bd9b4e61edeb364dec5c1bf65ea vcpkg commit: 2960d7d80e8d09c84ae8abf15c12196c2ca7d39a

nikolalukovic avatar Oct 10 '24 16:10 nikolalukovic

Doesn't fail for me.

ChaseKnowlden avatar Oct 14 '24 23:10 ChaseKnowlden

I got desperate so I nuked my whole system. Reinstalled and set up everything from scratch. And now it works ¯\(ツ)/¯. The only thing I didn't do is install llvm. So I suppose I did something stupid with env after installing llvm previously which caused this breakage.

nikolalukovic avatar Oct 17 '24 16:10 nikolalukovic

Well, i installed llvm and i'm still having the same issue.

Please note, I'm not a C++ / Systems Engineering expert 😃

struckchure avatar May 06 '25 17:05 struckchure

@struckchure have you tried installing llvm@19 and running CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ ./Meta/ladybird.sh run? That seems to have fixed it for me.

I found it in https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/BuildInstructionsLadybird.md#using-ladybirdsh

osalbahr avatar May 06 '25 19:05 osalbahr

@struckchure have you tried installing llvm@19 and running CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ ./Meta/ladybird.sh run? That seems to have fixed it for me.

I found it in https://github.com/LadybirdBrowser/ladybird/blob/master/Documentation/BuildInstructionsLadybird.md#using-ladybirdsh

Yes I have llvm@19 installed, but I'm still getting this 👇

error: building libjxl:arm64-osx-dynamic failed with: BUILD_FAILED
See https://learn.microsoft.com/vcpkg/troubleshoot/build-failures?WT.mc_id=vcpkg_inproduct_cli for more information.
Elapsed time to handle libjxl:arm64-osx-dynamic: 15 s
Please ensure you're using the latest port files with `git pull` and `vcpkg update`.
Then check for known issues at:
  https://github.com/microsoft/vcpkg/issues?q=is%3Aissue+is%3Aopen+in%3Atitle+libjxl
You can submit a new issue at:
  https://github.com/microsoft/vcpkg/issues/new?title=[libjxl]+Build+error+on+arm64-osx-dynamic&body=Copy%20issue%20body%20from%20%2FUsers%2Fmohammed%2Fladybird%2FBuild%2Frelease%2Fvcpkg_installed%2Fvcpkg%2Fissue_body.md
You can also submit an issue by running (GitHub CLI must be installed):
  /opt/homebrew/bin/gh issue create -R microsoft/vcpkg --title "[libjxl] Build failure on arm64-osx-dynamic" --body-file /Users/mohammed/ladybird/Build/release/vcpkg_installed/vcpkg/issue_body.md
Completed submission of highway:[email protected] to 1 binary cache(s) in 96.5 ms
-- Running vcpkg install - failed
CMake Error at Build/vcpkg/scripts/buildsystems/vcpkg.cmake:938 (message):
  vcpkg install failed.  See logs for more information:
  /Users/mohammed/ladybird/Build/release/vcpkg-manifest-install.log
Call Stack (most recent call first):
  /opt/homebrew/share/cmake/Modules/CMakeDetermineSystem.cmake:146 (include)
  CMakeLists.txt:22 (project)


CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!

struckchure avatar May 06 '25 20:05 struckchure

Strange. It works on my end (M2 Pro). I recommend asking in the Ladybird Discord server or opening a new issue.

osalbahr avatar May 06 '25 21:05 osalbahr

If the issue is libjxl, I just got a PR merged there to fix this.

Assuming you don't have some new bug, the fix is to entirely clear out your $LDFLAGS before running our script.

ADKaster avatar May 06 '25 22:05 ADKaster

But also, this issue was closed 7 months ago. The first place to look for build support should be #build-problems on our discord. If you really have a strong reason not to do that, a new issue would be better than zombie posting.

ADKaster avatar May 06 '25 22:05 ADKaster

Thanks

struckchure avatar May 07 '25 04:05 struckchure