Build fails with error: failed to run custom build command for `glslopt v0.1.7`
Categories
(Firefox Build System :: General, defect, P4)
Tracking
(Not tracked)
People
(Reporter: agi, Unassigned)
Details
Host OS: MacOSx 10.15
Target: Android x86_64
Full log: https://paste.mozilla.org/c9qwkacs
mozconfig:
ac_add_options --enable-application=mobile/android
ac_add_options --target=x86_64
mk_add_options MOZ_OBJDIR=./objdir
ac_add_options --with-macos-sdk=/Users/asferro/workspace/MacOSX-SDKs/MacOSX10.14.sdk
# ICECC
ac_add_options --with-compiler-wrapper="/usr/local/bin/icecc"
CC="/Users/asferro/.mozbuild/clang/bin/clang"
CXX="/Users/asferro/.mozbuild/clang/bin/clang++"
mk_add_options MOZ_MAKE_FLAGS="-j40"
Comment 1•5 years ago
|
||
Relevant error:
6:08.33 warning: /Users/asferro/.mozbuild/clang/bin/../include/c++/v1/new:244:12: error: aligned allocation function of type 'void *(std::size_t, std::align_val_t)' is only available on macOS 10.14 or newer
Probable workaround: --enable-macos-target=10.14
| Reporter | ||
Comment 2•5 years ago
|
||
This is an Android build though, where that is not available: https://searchfox.org/mozilla-central/rev/d25eb00ab4e90cc0130cd18f303a04cc2a2f8409/build/moz.configure/toolchain.configure#105-124
or should it be available?
Comment 3•5 years ago
•
|
||
Try export MACOSX_DEPLOYMENT_TARGET=10.14.
| Reporter | ||
Comment 4•5 years ago
|
||
(In reply to Mike Hommey [:glandium] from comment #3)
Try
export MACOSX_DEPLOYMENT_TARGET=10.14.
Does not seem to help, do I need to put that somewhere in my mozconfig? (I just exported it in my shell)
| Reporter | ||
Comment 5•5 years ago
|
||
Looking at the log again, isn't this wrong?
TARGET = Some("x86_64-apple-darwin")
This should be x86_64-linux-android or whatever not darwin, could it be that we're trying to build this library for mac instead of android?
| Reporter | ||
Comment 6•5 years ago
|
||
Oh I see it's a build-dependency so I guess it's expected that's building for my host OS.
| Reporter | ||
Comment 7•5 years ago
|
||
Looks like removing CC and CXX from my mozconfig fixed this compile error. Not sure if that's expected or not.
| Reporter | ||
Comment 8•5 years ago
•
|
||
Actually this is broken again on my machine and I don't know why.
| Reporter | ||
Comment 9•5 years ago
|
||
Setting this fixes the problem:
export HOST_CC="/Users/asferro/.mozbuild/clang/bin/clang --target=x86_64-apple-darwin19.5.0"
export HOST_CXX="/Users/asferro/.mozbuild/clang/bin/clang --target=x86_64-apple-darwin19.5.0"
I guess this only breaks when glslopt is build remotely and that's why it worked before and stopped working now.
From what I can see we don't pass a macOS version in here: https://searchfox.org/mozilla-central/source/config/makefiles/rust.mk
and cc doesn't either, so MACOSX_DEPLOYMENT_TARGET doesn't really affect this?
Comment 10•5 years ago
|
||
Any particular reason you're using icecc rather than sccache-dist? We'd probably be more able to identify and repair issues with distributed compilation with sccache-dist.
I ran into this locally also building Android (armv7 though) on macOS:
12:14.76 error: failed to run custom build command for `glslopt v0.1.9`
My mozconfig:
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-gv2
ac_add_options --enable-application=mobile/android
ac_add_options --enable-debug
#ac_add_options --with-ccache=sccache
# Use the same Java binary that was specified in bootstrap. This way, if the default system
# Java is different than what Firefox needs, users should just need to override it (with
# $JAVA_HOME) when running bootstrap, rather than when interacting with the build.
ac_add_options --with-java-bin-path="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin"
ac_add_options --with-android-ndk="/Users/mcomella/Library/Android/sdk/ndk/21.3.6528147/"
# Default: ac_add_options --target=arm-linux-androideabi
#ac_add_options --target=aarch64 # arm64
#ac_add_options --target=i686 # x86
#ac_add_options --target=x86_64 # x86-64
Here is the part of the logs with warnings:
12:14.75 warning: glsl-optimizer/src/util/softfloat.c:214:42: warning: result of comparison of constant 32768 with expression of type 'int16_t' (aka 'short') is always false [-Wta
utological-constant-out-of-range-compare]
12:14.75 warning: } else if ((e > 0x1d) || (0x8000 <= m)) {
12:14.75 warning: ~~~~~~ ^ ~
12:14.75 warning: 1 warning generated.
12:14.75 warning: clang-12: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcx
x-not-found]
12:14.75 warning: In file included from glsl-optimizer/src/compiler/glsl_types.cpp:26:
12:14.75 warning: In file included from glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h:34:
12:14.75 warning: glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h:28:10: fatal error: 'new' file not found
12:14.75 warning: #include <new>
12:14.75 warning: ^~~~~
12:14.75 warning: 1 error generated.
12:14.75 warning: clang-12: warning: include path for libstdc++ headers not found; pass '-stdlib=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcx
x-not-found]
12:14.75 warning: In file included from glsl-optimizer/src/compiler/glsl/ast_array_index.cpp:24:
12:14.75 warning: In file included from glsl-optimizer/src/compiler/glsl/ast.h:29:
12:14.76 warning: In file included from glsl-optimizer/src/compiler/glsl/glsl_parser_extras.h:34:
12:14.76 warning: glsl-optimizer/src/compiler/glsl/glsl_symbol_table.h:28:10: fatal error: 'new' file not found
12:14.76 warning: #include <new>
12:14.76 warning: ^~~~~
12:14.76 warning: 1 error generated.
12:14.76 error: failed to run custom build command for `glslopt v0.1.9`
12:14.76 Caused by:
12:14.76 process didn't exit successfully: `/Users/mcomella/dev/mozilla-central/obj-gv2/debug/build/glslopt-8ce3806fc3542e13/build-script-build` (exit code: 1)
12:14.76 --- stdout
12:14.76 TARGET = Some("x86_64-apple-darwin")
12:14.76 OPT_LEVEL = Some("1") 12:14.76 HOST = Some("x86_64-apple-darwin")
12:14.76 CC_x86_64-apple-darwin = None
12:14.76 CC_x86_64_apple_darwin = Some("/Users/mcomella/.mozbuild/clang/bin/clang")
12:14.76 CFLAGS_x86_64-apple-darwin = None
12:14.76 CFLAGS_x86_64_apple_darwin = Some("--sysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=gnu99 -DMOZILLA_CONFIG
_H")
12:14.76 CRATE_CC_NO_DEFAULTS = None
Building was working fine with a different mozconfig with only the objdir changed until I tried to build a parent revision hg up -r .^ and ctrl-C'd it in the middle, realizing it was rebuilding the whole tree. I played around with sccache in the middle, hoping to speed up the rebuilds but I figured it might get in the way so I disabled it.
What I saw might be bug 1729760.
Description
•