BrowserWorks / Waterfox

The official Waterfox 💧 source code repository
https://www.waterfox.net
Other
3.57k stars 327 forks source link

build system not guessing the host triplet right? #3462

Open formula-spectre opened 3 weeks ago

formula-spectre commented 3 weeks ago

What happened?

I was trying to build manually Waterfox since there is no gentoo ebuild for it, but when I try launch mach build I get the following error:

 0:10.83 ERROR: Don't know how to translate x86_64-pc-linux-musl for rustc
*** Fix above errors and then restart with "./mach build"

while my triplet should be x86_64-unknown-linux-musl; how can I override this? I tried to set the envvar RUST_TARGET but it ignored it..

Reproducible?

Version

G6

What platform are you seeing the problem on?

Linux

Relevant log output

./mach build
 0:01.41 Clobber not needed.
 Config object not found by mach.
 0:01.84 Using Python 3.11.9 from /home/formula/workspace/Waterfox/obj-Linux-x86_64/_virtualenvs/build/bin/python
 0:01.84 Adding configure options from /home/formula/workspace/Waterfox/.mozconfig
 0:01.84   --target=x86_64-pc-linux-gnu
 0:01.84   --disable-crashreporter
 0:01.84   --disable-debug
 0:01.84   --disable-dmd
 0:01.84   --disable-geckodriver
 0:01.84   --disable-jprof
 0:01.84   --disable-profiling
 0:01.84   --disable-updater
 0:01.84   --enable-application=browser
 0:01.84   --disable-bootstrap
 0:01.84   --enable-jxl
 0:01.84   --enable-optimize=-Os -w
 0:01.84   --enable-tests
 0:01.84   --enable-unverified-updates
 0:01.84   --with-app-basename=Waterfox
 0:01.84   --with-app-name=waterfox
 0:01.84   --with-branding=waterfox/browser/branding
 0:01.84   --with-distribution-id=net.waterfox
 0:01.85   --with-l10n-base=/home/formula/workspace/Waterfox/waterfox/browser/locales
 0:01.85   CXX=clang++
 0:01.85   MOZ_TELEMETRY_REPORTING=
 0:01.85   CC=clang
 0:01.85   MOZ_REQUIRE_SIGNING=
 0:01.85 checking for vcs source checkout... git
 0:01.95 checking for a shell... /usr/bin/sh
 0:02.08 checking for host system type... x86_64-pc-linux-musl
 0:02.09 checking for target system type... x86_64-pc-linux-gnu
 0:03.15 checking whether cross compiling... yes
 0:03.74 checking for Python 3... /home/formula/workspace/Waterfox/obj-Linux-x86_64/_virtualenvs/build/bin/python (3.11.9)
 0:03.74 checking for git... /usr/bin/git
 0:03.74 checking for Git version... 2.45.1
 0:03.77 checking for sparse checkout... no
 0:03.77 checking for wget... /usr/bin/wget
 0:03.78 checking for ccache... not found
 0:03.78 checking for the target C compiler... /usr/lib/llvm/18/bin/clang
 0:03.87 checking whether the target C compiler can be used... yes
 0:03.87 checking the target C compiler version... 18.1.4
 0:03.90 checking the target C compiler works... yes
 0:03.91 checking for the target C++ compiler... /usr/lib/llvm/18/bin/clang++
 0:03.96 checking whether the target C++ compiler can be used... yes
 0:03.96 checking the target C++ compiler version... 18.1.4
 0:04.00 checking the target C++ compiler works... yes
 0:04.00 checking for the host C compiler... /usr/lib/llvm/18/bin/clang
 0:04.00 checking whether the host C compiler can be used... yes
 0:04.00 checking the host C compiler version... 18.1.4
 0:04.00 checking the host C compiler works... yes
 0:04.00 checking for the host C++ compiler... /usr/lib/llvm/18/bin/clang++
 0:04.00 checking whether the host C++ compiler can be used... yes
 0:04.00 checking the host C++ compiler version... 18.1.4
 0:04.01 checking the host C++ compiler works... yes
 0:04.05 checking for target linker... lld
 0:04.09 checking for host linker... lld
 0:04.13 checking for 64-bit OS... yes
 0:04.17 checking for new enough STL headers from libstdc++... yes
 0:04.19 checking for the assembler... /usr/lib/llvm/18/bin/clang
 0:04.22 checking for ar... /usr/lib/llvm/18/bin/llvm-ar
 0:04.25 checking for host_ar... /usr/lib/llvm/18/bin/llvm-ar
 0:04.27 checking for nm... /usr/lib/llvm/18/bin/llvm-nm
 0:04.27 checking for pkg_config... /usr/bin/pkg-config
 0:04.27 checking for pkg-config version... 2.2.0
 0:04.28 checking whether pkg-config is pkgconf... yes
 0:04.36 checking for strndup... yes
 0:04.43 checking for posix_memalign... yes
 0:04.50 checking for memalign... yes
 0:04.58 checking for malloc_usable_size... yes
 0:04.62 checking for stdint.h... yes
 0:04.66 checking for inttypes.h... yes
 0:04.69 checking for malloc.h... yes
 0:04.72 checking for alloca.h... yes
 0:04.75 checking for sys/byteorder.h... no
 0:04.78 checking for getopt.h... yes
 0:04.81 checking for unistd.h... yes
 0:04.84 checking for nl_types.h... yes
 0:04.88 checking for cpuid.h... yes
 0:04.91 checking for fts.h... yes
 0:04.94 checking for sys/statvfs.h... yes
 0:04.98 checking for sys/statfs.h... yes
 0:05.01 checking for sys/vfs.h... yes
 0:05.04 checking for sys/mount.h... yes
 0:05.07 checking for sys/quota.h... no
 0:05.11 checking for linux/quota.h... yes
 0:05.15 checking for linux/if_addr.h... yes
 0:05.19 checking for linux/rtnetlink.h... yes
 0:05.22 checking for sys/queue.h... yes
 0:05.26 checking for sys/types.h... yes
 0:05.29 checking for netinet/in.h... yes
 0:05.33 checking for byteswap.h... yes
 0:05.36 checking for memfd_create in sys/mman.h... yes
 0:05.40 checking for linux/perf_event.h... yes
 0:05.44 checking for perf_event_open system call... yes
 0:05.47 checking whether the C compiler supports -Wbitfield-enum-conversion... yes
 0:05.50 checking whether the C++ compiler supports -Wbitfield-enum-conversion... yes
 0:05.53 checking whether the C++ compiler supports -Wdeprecated-this-capture... yes
 0:05.56 checking whether the C compiler supports -Wformat-type-confusion... yes
 0:05.60 checking whether the C++ compiler supports -Wformat-type-confusion... yes
 0:05.63 checking whether the C compiler supports -Wshadow-field-in-constructor-modified... yes
 0:05.66 checking whether the C++ compiler supports -Wshadow-field-in-constructor-modified... yes
 0:05.69 checking whether the C compiler supports -Wtautological-constant-in-range-compare... yes
 0:05.73 checking whether the C++ compiler supports -Wtautological-constant-in-range-compare... yes
 0:05.76 checking whether the C compiler supports -Wno-error=tautological-type-limit-compare... yes
 0:05.79 checking whether the C++ compiler supports -Wno-error=tautological-type-limit-compare... yes
 0:05.82 checking whether the C compiler supports -Wunreachable-code-return... yes
 0:05.85 checking whether the C++ compiler supports -Wunreachable-code-return... yes
 0:05.89 checking whether the C compiler supports -Wunused-but-set-parameter... yes
 0:05.92 checking whether the C++ compiler supports -Wunused-but-set-parameter... yes
 0:05.95 checking whether the C compiler supports -Wclass-varargs... yes
 0:05.98 checking whether the C++ compiler supports -Wclass-varargs... yes
 0:06.01 checking whether the C++ compiler supports -Wempty-init-stmt... yes
 0:06.04 checking whether the C compiler supports -Wfloat-overflow-conversion... yes
 0:06.08 checking whether the C++ compiler supports -Wfloat-overflow-conversion... yes
 0:06.11 checking whether the C compiler supports -Wfloat-zero-conversion... yes
 0:06.14 checking whether the C++ compiler supports -Wfloat-zero-conversion... yes
 0:06.17 checking whether the C compiler supports -Wloop-analysis... yes
 0:06.20 checking whether the C++ compiler supports -Wloop-analysis... yes
 0:06.23 checking whether the C compiler supports -Wno-range-loop-analysis... yes
 0:06.26 checking whether the C++ compiler supports -Wno-range-loop-analysis... yes
 0:06.29 checking whether the C++ compiler supports -Wc++2a-compat... yes
 0:06.32 checking whether the C++ compiler supports -Wcomma-subscript... no
 0:06.35 checking whether the C compiler supports -Wenum-compare-conditional... yes
 0:06.38 checking whether the C++ compiler supports -Wenum-compare-conditional... yes
 0:06.41 checking whether the C compiler supports -Wenum-float-conversion... yes
 0:06.44 checking whether the C++ compiler supports -Wenum-float-conversion... yes
 0:06.47 checking whether the C++ compiler supports -Wvolatile... no
 0:06.50 checking whether the C++ compiler supports -Wno-error=deprecated... yes
 0:06.53 checking whether the C++ compiler supports -Wno-error=deprecated-anon-enum-enum-conversion... yes
 0:06.56 checking whether the C++ compiler supports -Wno-error=deprecated-enum-enum-conversion... yes
 0:06.59 checking whether the C++ compiler supports -Wno-error=deprecated-pragma... yes
 0:06.63 checking whether the C++ compiler supports -Wno-error=deprecated-this-capture... yes
 0:06.66 checking whether the C++ compiler supports -Wcomma... yes
 0:06.69 checking whether the C compiler supports -Wduplicated-cond... no
 0:06.72 checking whether the C++ compiler supports -Wduplicated-cond... no
 0:06.75 checking whether the C++ compiler supports -Wimplicit-fallthrough... yes
 0:06.77 checking whether the C compiler supports -Wlogical-op... no
 0:06.80 checking whether the C++ compiler supports -Wlogical-op... no
 0:06.84 checking whether the C compiler supports -Wstring-conversion... yes
 0:06.88 checking whether the C++ compiler supports -Wstring-conversion... yes
 0:06.91 checking whether the C++ compiler supports -Wno-inline-new-delete... yes
 0:06.94 checking whether the C compiler supports -Wno-error=maybe-uninitialized... no
 0:06.97 checking whether the C++ compiler supports -Wno-error=maybe-uninitialized... no
 0:07.00 checking whether the C compiler supports -Wno-error=deprecated-declarations... yes
 0:07.04 checking whether the C++ compiler supports -Wno-error=deprecated-declarations... yes
 0:07.07 checking whether the C compiler supports -Wno-error=array-bounds... yes
 0:07.10 checking whether the C++ compiler supports -Wno-error=array-bounds... yes
 0:07.13 checking whether the C compiler supports -Wno-error=free-nonheap-object... yes
 0:07.16 checking whether the C++ compiler supports -Wno-error=free-nonheap-object... yes
 0:07.19 checking whether the C compiler supports -Wno-multistatement-macros... no
 0:07.21 checking whether the C++ compiler supports -Wno-multistatement-macros... no
 0:07.24 checking whether the C compiler supports -Wno-error=class-memaccess... no
 0:07.27 checking whether the C++ compiler supports -Wno-error=class-memaccess... no
 0:07.30 checking whether the C compiler supports -Wno-error=atomic-alignment... yes
 0:07.33 checking whether the C++ compiler supports -Wno-error=atomic-alignment... yes
 0:07.36 checking whether the C compiler supports -Wno-error=deprecated-builtins... yes
 0:07.39 checking whether the C++ compiler supports -Wno-error=deprecated-builtins... yes
 0:07.42 checking whether the C compiler supports -Wformat... yes
 0:07.45 checking whether the C++ compiler supports -Wformat... yes
 0:07.48 checking whether the C compiler supports -Wformat-security... yes
 0:07.51 checking whether the C++ compiler supports -Wformat-security... yes
 0:07.54 checking whether the C compiler supports -Wformat-overflow=2... no
 0:07.57 checking whether the C++ compiler supports -Wformat-overflow=2... no
 0:07.62 checking whether the C compiler supports -Werror=implicit-function-declaration... yes
 0:07.65 checking whether the C compiler supports -Wno-psabi... yes
 0:07.68 checking whether the C++ compiler supports -Wno-psabi... yes
 0:07.72 checking whether the C compiler supports -Wthread-safety... yes
 0:07.75 checking whether the C++ compiler supports -Wthread-safety... yes
 0:07.78 checking whether the C compiler supports -Wno-error=builtin-macro-redefined... yes
 0:07.81 checking whether the C++ compiler supports -Wno-error=builtin-macro-redefined... yes
 0:07.84 checking whether the C compiler supports -Wno-unknown-warning-option... yes
 0:07.88 checking whether the C++ compiler supports -Wno-unknown-warning-option... yes
 0:07.91 checking whether the C++ compiler supports -fno-sized-deallocation... yes
 0:07.94 checking whether the C++ compiler supports -fno-aligned-new... yes
 0:07.94 checking for llvm_profdata... /usr/lib/llvm/18/bin/llvm-profdata
 0:07.97 checking for alsa... yes
 0:07.97 checking MOZ_ALSA_CFLAGS...
 0:07.97 checking MOZ_ALSA_LIBS... -lasound
 0:07.98 checking for libpulse... yes
 0:07.98 checking MOZ_PULSEAUDIO_CFLAGS... -D_REENTRANT
 0:07.99 checking MOZ_PULSEAUDIO_LIBS... -lpulse -pthread
 0:07.99 checking for rustc... /usr/bin/rustc
 0:07.99 checking for cargo... /usr/bin/cargo
 0:08.07 checking rustc version... 1.77.1
 0:08.09 checking cargo version... 1.77.1
 0:08.16 checking for rust host triplet...
 0:08.16 ERROR: Don't know how to translate x86_64-pc-linux-musl for rustc
*** Fix above errors and then restart with "./mach build"
MrAlex94 commented 3 weeks ago

Seems similar to https://bugs.gentoo.org/915651. What distro are you on? A workaround would be to add export RUST_TARGET='x86_64-unknown-linux-musl' to .mozconfig.

formula-spectre commented 3 weeks ago

Seems similar to https://bugs.gentoo.org/915651. What distro are you on?

I am on gentoo indeed. I tried to look at gentoo's ebuild for vanilla firefox but honestly i could not figure it out..

add export RUST_TARGET='x86_64-unknown-linux-musl' to .mozconfig.

I tried to add that line to every .mozconfig, I even tried to change every ac_add_options --target to x86_unkown_linux_musl, but ./mach build or make (which do the same thing really lol) still says that it cannot translate it. I even tried to rename .mozconfig-x86_64-pc-linux-gnu to .mozconfig-x86_64-unkown-linux-musl, but still does not work