Building from source #1

Open
opened 2023-08-05 09:33:14 +00:00 by threadpanic · 1 comment
threadpanic commented 2023-08-05 09:33:14 +00:00 (Migrated from codeberg.org)

build-time dependencies:

To build the source tarball, we need some packages.

  • As root, do:
pkg install bash gmake wget gnupg python3

The Makefile is GNU specific, so we use gmake throughout:

gmake fetch && gmake all

That should yield the latest source tarball, named like so:

  • librewolf-$(version)-$(release).source.tar.gz, and it does have a sha256 checksum file as well.

The next step in the quest is to actually build librewolf using this tarball.

  • As root: pkg install py39-pip. We need to symlink to pip3 for this:
cd /usr/local/bin
ln -s pip pip3
  • Install Rust using pkg install rust
  • Install cbindgen with cargo: cargo install cbindgen
  • Update your PATH to also search in: $HOME/.cargo/bin
  • Extract the tarball somewhere and change to it.
  • Run: ./mach --no-interactive bootstrap --application-choice=browser
  • Run: ./mach build
  • install libclang, pkg install llvm
## build-time dependencies: To build the source tarball, we need some packages. * As root, do: ``` pkg install bash gmake wget gnupg python3 ``` The `Makefile` is GNU specific, so we use `gmake` throughout: ``` gmake fetch && gmake all ``` That should yield the latest source tarball, named like so: * `librewolf-$(version)-$(release).source.tar.gz`, and it does have a sha256 checksum file as well. The next step in the quest is to actually build librewolf using this tarball. * As root: `pkg install py39-pip`. We need to symlink to pip3 for this: ``` cd /usr/local/bin ln -s pip pip3 ``` * Install Rust using `pkg install rust` * Install cbindgen with cargo: `cargo install cbindgen` * Update your PATH to also search in: `$HOME/.cargo/bin` * Extract the tarball somewhere and change to it. * Run: `./mach --no-interactive bootstrap --application-choice=browser` * Run: `./mach build` * install libclang, `pkg install llvm`
threadpanic commented 2023-08-05 09:51:02 +00:00 (Migrated from codeberg.org)

after ./mach build, the build fails with:

 0:25.81 checking whether the C++ compiler supports -fno-aligned-new... yes
 0:25.81 checking for llvm_profdata... /usr/bin/llvm-profdata
 0:25.83 checking for llvm-objdump... /usr/bin/llvm-objdump
 0:25.85 checking for readelf... /usr/bin/llvm-readelf
 0:25.86 checking for objcopy... /usr/bin/llvm-objcopy
 0:25.88 checking for alsa... yes
 0:25.88 checking MOZ_ALSA_CFLAGS... -I/usr/local/include
 0:25.89 checking MOZ_ALSA_LIBS... -L/usr/local/lib -lasound
 0:25.89 checking for rustc... /home/user/.cargo/bin/rustc
 0:25.89 checking for cargo... /home/user/.cargo/bin/cargo
 0:26.00 Actually using '/home/user/.rustup/toolchains/stable-x86_64-unknown-freebsd/bin/rustc'
 0:26.09 Actually using '/home/user/.rustup/toolchains/stable-x86_64-unknown-freebsd/bin/cargo'
 0:26.11 checking rustc version... 1.71.0
 0:26.12 checking cargo version... 1.71.0
 0:26.21 checking for rust host triplet... x86_64-unknown-freebsd
 0:26.26 checking for rust target triplet... x86_64-unknown-freebsd
 0:26.26 checking for rustdoc... /home/user/.cargo/bin/rustdoc
 0:26.27 checking for cbindgen... /home/user/.cargo/bin/cbindgen
 0:26.27 checking for rustfmt... /home/user/.cargo/bin/rustfmt
 0:26.27 checking for clang for bindgen... /usr/bin/clang++
 0:26.28 checking for libclang for bindgen... not found
 0:26.28 ERROR: Could not find libclang to generate rust bindings for C/C++. Please install the necessary packages, 
run `mach bootstrap`, or use --with-libclang-path to give the path containing it.
*** Fix above errors and then restart with "./mach build"
after `./mach build`, the build fails with: ``` 0:25.81 checking whether the C++ compiler supports -fno-aligned-new... yes 0:25.81 checking for llvm_profdata... /usr/bin/llvm-profdata 0:25.83 checking for llvm-objdump... /usr/bin/llvm-objdump 0:25.85 checking for readelf... /usr/bin/llvm-readelf 0:25.86 checking for objcopy... /usr/bin/llvm-objcopy 0:25.88 checking for alsa... yes 0:25.88 checking MOZ_ALSA_CFLAGS... -I/usr/local/include 0:25.89 checking MOZ_ALSA_LIBS... -L/usr/local/lib -lasound 0:25.89 checking for rustc... /home/user/.cargo/bin/rustc 0:25.89 checking for cargo... /home/user/.cargo/bin/cargo 0:26.00 Actually using '/home/user/.rustup/toolchains/stable-x86_64-unknown-freebsd/bin/rustc' 0:26.09 Actually using '/home/user/.rustup/toolchains/stable-x86_64-unknown-freebsd/bin/cargo' 0:26.11 checking rustc version... 1.71.0 0:26.12 checking cargo version... 1.71.0 0:26.21 checking for rust host triplet... x86_64-unknown-freebsd 0:26.26 checking for rust target triplet... x86_64-unknown-freebsd 0:26.26 checking for rustdoc... /home/user/.cargo/bin/rustdoc 0:26.27 checking for cbindgen... /home/user/.cargo/bin/cbindgen 0:26.27 checking for rustfmt... /home/user/.cargo/bin/rustfmt 0:26.27 checking for clang for bindgen... /usr/bin/clang++ 0:26.28 checking for libclang for bindgen... not found 0:26.28 ERROR: Could not find libclang to generate rust bindings for C/C++. Please install the necessary packages, run `mach bootstrap`, or use --with-libclang-path to give the path containing it. *** Fix above errors and then restart with "./mach build" ```
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: librewolf-bot/freebsd#1
No description provided.