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

The project doesnt build on macos #2477

Open
alex4o opened this issue Nov 21, 2024 · 15 comments
Open

The project doesnt build on macos #2477

alex4o opened this issue Nov 21, 2024 · 15 comments

Comments

@alex4o
Copy link

alex4o commented Nov 21, 2024

-- Running vcpkg install - done
-- The C compiler identification is AppleClang 15.0.0.15000309
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test LAGOM_LINKER_SUPPORTS_LINKER:--gdb-index
-- Performing Test LAGOM_LINKER_SUPPORTS_LINKER:--gdb-index - Failed
-- Performing Test LAGOM_LINKER_SUPPORTS_LINKER:-Bsymbolic-non-weak-functions
-- Performing Test LAGOM_LINKER_SUPPORTS_LINKER:-Bsymbolic-non-weak-functions - Failed
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include
-- Found ICU: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/include (found suitable version "74.2", minimum required is "74") found components: data i18n uc
-- Found Python3: /opt/homebrew/bin/python3.12 (found version "3.12.7") found components: Interpreter
-- Found PkgConfig: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/tools/pkgconf/pkgconf (found version "2.3.0")
-- Checking for module 'libwoff2dec'
--   Found libwoff2dec, version 1.0.2
-- Found JPEG: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/lib/libjpeg.dylib (found version "62")
-- Found ZLIB: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/lib/libz.dylib (found version "1.3.1")
-- Found PNG: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/lib/libpng16.dylib (found version "1.6.43")
-- Found ICU: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/include (found suitable version "74.2", minimum required is "61") found components: uc
-- Checking for module 'libjxl'
--   Found libjxl, version 0.11.0
-- Checking for module 'libavcodec'
--   Found libavcodec, version 60.31.102
-- Checking for module 'libavformat'
--   Found libavformat, version 60.16.100
-- Checking for module 'libavutil'
--   Found libavutil, version 58.29.100
-- Checking for module 'libpulse'
--   Package 'libpulse' not found
-- Found SQLite3: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/include (found version "3.46.1")
-- Found ZLIB: /Users/alex4o/Projects/ladybird/Build/release/vcpkg_installed/arm64-osx/lib/libz.dylib (found suitable version "1.3.1", minimum required is "1")
-- Checking for module 'libpulse'
--   Package 'libpulse' not found
-- Found Python: /opt/homebrew/bin/python3.12 (found version "3.12.7") found components: Interpreter
-- Configuring done (406.5s)
-- Generating done (1.1s)
-- Build files have been written to: /Users/alex4o/Projects/ladybird/Build/release
ninja: Entering directory `/Users/alex4o/Projects/ladybird/Build/release'
[0/2] Re-checking globbed directories...
[181/2739] Building CXX object Lagom/Libraries/LibGC/CMakeFiles/LibGC.dir/ForeignCell.cpp.o
FAILED: Lagom/Libraries/LibGC/CMakeFiles/LibGC.dir/ForeignCell.cpp.o
/opt/homebrew/bin/ccache /usr/bin/c++ -DENABLE_COMPILETIME_FORMAT_CHECK -DLibGC_EXPORTS -I/Users/alex4o/Projects/ladybird -I/Users/alex4o/Projects/ladybird/Services -I/Users/alex4o/Projects/ladybird/Libraries -I/Users/alex4o/Projects/ladybird/Build/release/Lagom -I/Users/alex4o/Projects/ladybird/Build/release/Lagom/Services -I/Users/alex4o/Projects/ladybird/Build/release/Lagom/Libraries -I/Users/alex4o/Projects/ladybird/Meta/Lagom/../.. -I/Users/alex4o/Projects/ladybird/Meta/Lagom/../../Libraries -I/Users/alex4o/Projects/ladybird/Meta/Lagom/../../Services -I/Users/alex4o/Projects/ladybird/Build/release -O2 -g -DNDEBUG -std=c++2b -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk -mmacosx-version-min=14.4 -fPIC -fcolor-diagnostics -Wall -Wextra -fno-exceptions -ffp-contract=off -Wcast-qual -Wformat=2 -Wimplicit-fallthrough -Wlogical-op -Wmissing-declarations -Wmissing-field-initializers -Wsuggest-override -Wno-invalid-offsetof -Wno-unknown-warning-option -Wno-unused-command-line-argument -Werror -fconstexpr-steps=16777216 -Wmissing-prototypes -Wno-implicit-const-int-float-conversion -Wno-user-defined-literals -Wno-vla-cxx-extension -Wno-unqualified-std-cast-call -fstack-protector-strong -fstrict-flex-arrays=2 -Wno-maybe-uninitialized -Wno-shorten-64-to-32 -fsigned-char -ggnu-pubnames -fPIC -O2 -g1 -Wno-overloaded-virtual -Wno-unused-private-field -MD -MT Lagom/Libraries/LibGC/CMakeFiles/LibGC.dir/ForeignCell.cpp.o -MF Lagom/Libraries/LibGC/CMakeFiles/LibGC.dir/ForeignCell.cpp.o.d -o Lagom/Libraries/LibGC/CMakeFiles/LibGC.dir/ForeignCell.cpp.o -c /Users/alex4o/Projects/ladybird/Libraries/LibGC/ForeignCell.cpp
In file included from /Users/alex4o/Projects/ladybird/Libraries/LibGC/ForeignCell.cpp:7:
/Users/alex4o/Projects/ladybird/Libraries/LibGC/DeferGC.h:29:3: error: no matching constructor for initialization of 'class DeferGC'
} SWIFT_NONCOPYABLE;
  ^
/Users/alex4o/Projects/ladybird/Libraries/LibGC/DeferGC.h:16:14: note: candidate constructor not viable: requires single argument 'heap', but no arguments were provided
    explicit DeferGC(Heap& heap)
             ^
/Users/alex4o/Projects/ladybird/Libraries/LibGC/DeferGC.h:14:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 0 were provided
class DeferGC {
      ^
1 error generated.
[192/2739] Building CXX object Lagom/Libraries/LibIPC/CMakeFiles/LibIPC.dir/Decoder.cpp.o
ninja: build stopped: subcommand failed.

I did a simple ./Meta/ladybird.sh run ladybird

@shlyakpavel
Copy link
Contributor

AppleClang 15

I guess that's the reason

@alex4o
Copy link
Author

alex4o commented Nov 21, 2024

I need a newer/older version?

@shlyakpavel
Copy link
Contributor

@alex4o you need a newer version

@alex4o
Copy link
Author

alex4o commented Nov 21, 2024

Oh thank you, I will revisit this when I update my mac

@alex4o
Copy link
Author

alex4o commented Nov 21, 2024

You can close this issue then

@rmg-x
Copy link
Contributor

rmg-x commented Nov 21, 2024

You can view the build instructions/requirements here: BuildInstructionsLadybird.md

Qt6 development packages, nasm, additional build tools, and a C++23 capable compiler like g++-13 or clang-17 are required.

CMake 3.25 or newer must be available in $PATH.

@ADKaster
Copy link
Member

ADKaster commented Nov 22, 2024

This requirement for Xcode 16 is kind of new. I'll need to document it or work around older apple clang

@circl-lastname
Copy link
Contributor

You can close this issue then

If this is resolved then you can close it manually

@13bdotdev
Copy link

13bdotdev commented Dec 2, 2024

I have AppleClang 16 installed and I'm still running into issues building on macos. Not quite sure what I might be missing?

$ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.4)
Target: arm64-apple-darwin24.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ cmake --version
cmake version 3.31.1

build command: ./Meta/ladybird.sh run

build error:

-- Building libvpx for Release
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /bin/bash --noprofile --norc -c "make -j9"

error log:

In file included from /Users/13b/code/ladybird/Build/vcpkg/buildtrees/libvpx/src/v1.13.1-e2ef06ab13.clean/vp9/ratectrl_rtc.cc:10:
/Users/13b/code/ladybird/Build/vcpkg/buildtrees/libvpx/src/v1.13.1-e2ef06ab13.clean/vp9/ratectrl_rtc.h:14:10: fatal error: 'cstdint' file not found
   14 | #include <cstdint>
1 error generated.
/Users/13b/code/ladybird/Build/vcpkg/buildtrees/libvpx/src/v1.13.1-e2ef06ab13.clean/vp8/vp8_ratectrl_rtc.cc:12:10: fatal error: 'new' file not found
   12 | #include <new>
      |          ^~~~~
1 error generated.
...

even if I run it with clang from brew I get the same error.

$ $(brew --prefix llvm)/bin/clang --version
Homebrew clang version 19.1.4

@circl-lastname

This comment has been minimized.

@ADKaster
Copy link
Member

ADKaster commented Dec 2, 2024

Apple clang 16 from Xcode 16 is not too old. This seems to be a command line tools issue, someone else mentioned it in discord yesterday.

Presumably installing full Xcode.app will resolve the issue? Though we should figure out why just using the command line tools messes things up.

@shlyakpavel
Copy link
Contributor

@ADKaster yesterday I learned that Qt requires Xcode standalone app to build Qt apps...

@13bdotdev
Copy link

@ADKaster thanks for the reply. I got help in the discord build channel. Looks like I needed to just rm my Build directory and start over. I'm guessing because I had tried to build initially but with incorrect versions of things, so once I updated everything it still had stuff cached. It's currently building now still, but taking awhile on my m1 macbook air.

@tristonarmstrong
Copy link

tristonarmstrong commented Dec 4, 2024

Can confirm it builds without issue on Mac (M1 Pro), first try, after following directions.

(unimportant side note): Does take a while. Took a little longer than terminal starwars, for reference.

(side comment): Wild its so alpha, its mind-blowing. In todays age where we expect a browser to behave a certain way, its strange to see a browser that doesn't, with a simple html page like Klectr.dev. Kind of humbling, to say the least. Feels.... good

@zhangzhuang15
Copy link

I have this issue too, and I take 2 steps to build successfully. Before list these steps, take a look at my environment:

  1. M3 Pro MacBook Pro 16, 18GB mem, 512GB disk, 6 performance 6 efficiency cpu cores
  2. clang 19.1.5, clang++ 19.1.5
  3. cc 15.0.0 (just execute cc -v in my terminal)
  4. macOS 14.3.1

Here 2 steps:

  1. remove Build directory
  2. execute CC=$(brew --prefix llvm)/bin/clang CXX=$(brew --prefix llvm)/bin/clang++ ./Meta/ladybird.sh run

When it successes, you can see Build/release/bin/Ladybird.app. Don't close your terminal, click Ladybird.app, there will be a window, you can type any url to take a test. But it seems that there are some unimplements, when I visit an url, terminal gives me some outputs which state that 1954925.446 WebContent(5982): FIXME: Unimplemented IDL interface: 'HTMLElementPrototype.showPopover'. We have made a big progress yet.

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

No branches or pull requests

9 participants