Skip to content

Can't compile since mozjs update (Android). #20958

Closed

Description

@paulrouget

Since the mozjs v0.7.1 update (d0cc9d2), I can't compile anymore.

rustc 1.28.0-nightly (524ad9b9e 2018-05-29)
info: component 'rust-std' for target 'armv7-linux-androideabi' is up to date
   Compiling mozjs_sys v0.51.1
   Compiling script v0.0.1 (file:///Users/paul/git/servo/components/script)
   Compiling servo_atoms v0.0.1 (file:///Users/paul/git/servo/components/atoms)
error: failed to run custom build command for `mozjs_sys v0.51.1`
process didn't exit successfully: `/Users/paul/git/servo/target/debug/build/mozjs_sys-a36d1e3b2066723b/build-script-build` (signal: 6, SIGABRT: process abort signal)
--- stdout
[[ /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure -ot /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure.in ]] && touch /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure || true
[[ /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/old-configure -ot /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/old-configure.in ]] && touch /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/old-configure || true
! [[ /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure.in -ot /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure ]] && touch /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure || true
! [[ /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/old-configure.in -ot /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/old-configure ]] && touch /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/old-configure || true
if [[ /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure -nt /Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/config.status ]] ; then \
	  cd /Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out && \
	  PYTHON="" MOZ_TOOLS="" \
	  CC="arm-linux-androideabi-gcc" CPP="arm-linux-androideabi-gcc -E" CXX="arm-linux-androideabi-g++" AR="arm-linux-androideabi-ar" \
	  /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/js/src/configure --disable-jemalloc --disable-js-shell --disable-tests --build-backends=RecursiveMake --with-arch=armv7-a --with-fpu=neon --with-android-ndk=/Users/paul/android-ndk-r12b --with-android-toolchain= --with-android-version=18 --target=arm-linux-androideabi --disable-gold --enable-sm-promise --disable-shared-js || (cat config.log && exit 1) ; \
	fi
cd /Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out && /Applications/Xcode.app/Contents/Developer/usr/bin/make -f Makefile
/Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_pre-export
/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --no-remove dist/include _build_manifests/install/dist_include
/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --no-remove dist/public _build_manifests/install/dist_public
Elapsed: 0.00s; From dist/public: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --no-remove dist/private _build_manifests/install/dist_private
Elapsed: 0.02s; From dist/include: Kept 151 existing; Added/updated 0; Removed 0 files and 0 directories.
/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --no-remove dist/sdk _build_manifests/install/dist_sdk
/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/_virtualenv/bin/python -m mozbuild.action.process_install_manifest --no-remove _tests _build_manifests/install/_tests
Elapsed: 0.00s; From dist/private: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
Elapsed: 0.00s; From dist/sdk: Kept 0 existing; Added/updated 0; Removed 0 files and 0 directories.
Elapsed: 0.00s; From _tests: Kept 1 existing; Added/updated 0; Removed 0 files and 0 directories.
/Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_export
make[4]: Nothing to be done for `host'.
/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/_virtualenv/bin/python -m mozbuild.action.preprocessor -DNDEBUG=1 -DTRIMMED=1 -DANDROID=1 -DASMJS_MAY_USE_SIGNAL_HANDLERS=1 -DASMJS_MAY_USE_SIGNAL_HANDLERS_FOR_UNALIGNED=1 -DBUILD_ARM_NEON=1 -DCPP_THROW_NEW='throw()' -DCROSS_COMPILE=1 -DD_INO=d_ino -DE10S_TESTING_ONLY=1 -DEDITLINE=1 -DENABLE_INTL_API=1 -DEXPOSE_INTL_API=1 -DHAVE_ALLOCA_H=1 -DHAVE_ARM_NEON=1 -DHAVE_ARM_SIMD=1 -DHAVE_CLOCK_MONOTONIC=1 -DHAVE_CPP_AMBIGUITY_RESOLVING_USING=1 -DHAVE_DIRENT_H=1 -DHAVE_DLOPEN=1 -DHAVE_ENDIAN_H=1 -DHAVE_GETC_UNLOCKED=1 -DHAVE_GETOPT_H=1 -DHAVE_GMTIME_R=1 -DHAVE_I18N_LC_MESSAGES=1 -DHAVE_LIBM=1 -DHAVE_LINUX_QUOTA_H=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MACHINE_ENDIAN_H=1 -DHAVE_MALLOC_H=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MBRTOWC=1 -DHAVE_MEMALIGN=1 -DHAVE_MEMORY_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SETLOCALE=1 -DHAVE_SSIZE_T=1 -DHAVE_STRNDUP=1 -DHAVE_SYS_CDEFS_H=1 -DHAVE_SYS_MOUNT_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_TM_ZONE_TM_GMTOFF=1 -DHAVE_UNISTD_H=1 -DHAVE_VALLOC=1 -DHAVE_VA_COPY=1 -DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE_WCRTOMB=1 -DJS_CODEGEN_ARM=1 -DJS_CPU_ARM=1 -DJS_DEFAULT_JITREPORT_GRANULARITY=3 -DJS_HAVE_ENDIAN_H=1 -DJS_HAVE_MACHINE_ENDIAN_H=1 -DJS_NUNBOX32=1 -DJS_POSIX_NSPR=1 -DJS_TRACE_LOGGING=1 -DMALLOC_H='<malloc.h>' -DMALLOC_USABLE_SIZE_CONST_PTR=const -DMOZILLA_UAVERSION='"50.0"' -DMOZILLA_VERSION='"50.0a1"' -DMOZILLA_VERSION_U=50.0a1 -DMOZJS_MAJOR_VERSION=50 -DMOZJS_MINOR_VERSION=0 -DMOZ_BUILD_APP=js -DMOZ_DLL_SUFFIX='".so"' -DMOZ_STATIC_JS=1 -DMOZ_UPDATE_CHANNEL=default -DNIGHTLY_BUILD=1 -DNO_NSPR_10_SUPPORT=1 -DNO_PW_GECOS=1 -DSPIDERMONKEY_PROMISE=1 -DSTATIC_EXPORTABLE_JS_API=1 -DSTDC_HEADERS=1 -DU_STATIC_IMPLEMENTATION=1 -DU_USING_ICU_NAMESPACE=0 -DVA_COPY=va_copy -DXP_LINUX=1 -DXP_UNIX=1 -DX_DISPLAY_MISSING=1 -D_REENTRANT=1 -DAB_CD= \
		-DMOZ_TREE_CAIRO= \
		-DMOZ_TREE_PIXMAN= \
		-DMOZ_SYSTEM_HUNSPELL= \
		-DMOZ_SYSTEM_BZ2= \
		-DMOZ_SYSTEM_ZLIB=1 \
		-DMOZ_SYSTEM_PNG= \
		-DMOZ_SYSTEM_JPEG= \
		-DMOZ_SYSTEM_LIBEVENT= \
		-DMOZ_SYSTEM_LIBVPX= \
		-DMOZ_SYSTEM_ICU= \
		/Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/config/system-headers /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/config/stl-headers | /usr/local/bin/perl /Users/paul/.cargo/registry/src/github.com-1ecc6299db9ec823/mozjs_sys-0.51.1/mozjs/nsprpub/config/make-system-wrappers.pl system_wrappers
../config/nsinstall -R system_wrappers ../dist
make[4]: Nothing to be done for `export'.
make[4]: Nothing to be done for `export'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_compile
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `host'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `host'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
make[4]: Nothing to be done for `target'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_misc
make[3]: Nothing to be done for `recurse_misc'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_libs
make[4]: Nothing to be done for `libs'.
make[4]: Nothing to be done for `libs'.
make[4]: Nothing to be done for `libs'.
/Applications/Xcode.app/Contents/Developer/usr/bin/make recurse_tools
make[3]: Nothing to be done for `recurse_tools'.
cargo:rustc-link-search=native=/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/js/src
cargo:rustc-link-lib=static=js_static
cargo:rustc-link-lib=stdc++
cargo:outdir=/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out
TARGET = Some("armv7-linux-androideabi")
OPT_LEVEL = Some("0")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
TARGET = Some("armv7-linux-androideabi")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
CXX_armv7-linux-androideabi = None
CXX_armv7_linux_androideabi = None
TARGET_CXX = None
CXX = None
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
CXXFLAGS_armv7-linux-androideabi = None
CXXFLAGS_armv7_linux_androideabi = None
TARGET_CXXFLAGS = None
CXXFLAGS = Some("--sysroot /Users/paul/android-ndk-r12b/platforms/android-18/arch-arm -I/Users/paul/android-ndk-r12b/sources/android/support/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
DEBUG = Some("true")
TARGET = Some("armv7-linux-androideabi")
CXX_armv7-linux-androideabi = None
CXX_armv7_linux_androideabi = None
HOST_CXX = None
CXX = None
CXXFLAGS_armv7-linux-androideabi = None
CXXFLAGS_armv7_linux_androideabi = None
HOST_CXXFLAGS = None
CXXFLAGS = Some("--sysroot /Users/paul/android-ndk-r12b/platforms/android-18/arch-arm -I/Users/paul/android-ndk-r12b/sources/android/support/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
TARGET = Some("armv7-linux-androideabi")
CXX_armv7-linux-androideabi = None
CXX_armv7_linux_androideabi = None
HOST_CXX = None
CXX = None
CXXFLAGS_armv7-linux-androideabi = None
CXXFLAGS_armv7_linux_androideabi = None
HOST_CXXFLAGS = None
CXXFLAGS = Some("--sysroot /Users/paul/android-ndk-r12b/platforms/android-18/arch-arm -I/Users/paul/android-ndk-r12b/sources/android/support/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
TARGET = Some("armv7-linux-androideabi")
CXX_armv7-linux-androideabi = None
CXX_armv7_linux_androideabi = None
HOST_CXX = None
CXX = None
CXXFLAGS_armv7-linux-androideabi = None
CXXFLAGS_armv7_linux_androideabi = None
HOST_CXXFLAGS = None
CXXFLAGS = Some("--sysroot /Users/paul/android-ndk-r12b/platforms/android-18/arch-arm -I/Users/paul/android-ndk-r12b/sources/android/support/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
TARGET = Some("armv7-linux-androideabi")
CXX_armv7-linux-androideabi = None
CXX_armv7_linux_androideabi = None
HOST_CXX = None
CXX = None
CXXFLAGS_armv7-linux-androideabi = None
CXXFLAGS_armv7_linux_androideabi = None
HOST_CXXFLAGS = None
CXXFLAGS = Some("--sysroot /Users/paul/android-ndk-r12b/platforms/android-18/arch-arm -I/Users/paul/android-ndk-r12b/sources/android/support/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
TARGET = Some("armv7-linux-androideabi")
CXX_armv7-linux-androideabi = None
CXX_armv7_linux_androideabi = None
HOST_CXX = None
CXX = None
CXXFLAGS_armv7-linux-androideabi = None
CXXFLAGS_armv7_linux_androideabi = None
HOST_CXXFLAGS = None
CXXFLAGS = Some("--sysroot /Users/paul/android-ndk-r12b/platforms/android-18/arch-arm -I/Users/paul/android-ndk-r12b/sources/android/support/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
TARGET = Some("armv7-linux-androideabi")
CXX_armv7-linux-androideabi = None
CXX_armv7_linux_androideabi = None
HOST_CXX = None
CXX = None
CXXFLAGS_armv7-linux-androideabi = None
CXXFLAGS_armv7_linux_androideabi = None
HOST_CXXFLAGS = None
CXXFLAGS = Some("--sysroot /Users/paul/android-ndk-r12b/platforms/android-18/arch-arm -I/Users/paul/android-ndk-r12b/sources/android/support/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include -I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include")
running: "arm-linux-androideabi-g++" "-O0" "-ffunction-sections" "-fdata-sections" "-fPIC" "--sysroot" "/Users/paul/android-ndk-r12b/platforms/android-18/arch-arm" "-I/Users/paul/android-ndk-r12b/sources/android/support/include" "-I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include" "-I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include" "-g" "-march=armv7-a" "-march=armv7-a" "-mthumb" "-mfpu=vfpv3-d16" "-mfloat-abi=softfp" "-I" "/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/dist/include" "-Wall" "-Wextra" "-DRUST_BINDGEN" "-DSTATIC_JS_API" "-std=gnu++11" "-Wno-unused-parameter" "-Wno-invalid-offsetof" "-o" "/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/src/jsglue.o" "-c" "src/jsglue.cpp"
exit code: 0
TARGET = Some("armv7-linux-androideabi")
TARGET = Some("armv7-linux-androideabi")
HOST = Some("x86_64-apple-darwin")
AR_armv7-linux-androideabi = None
AR_armv7_linux_androideabi = None
TARGET_AR = None
AR = None
TARGET = Some("armv7-linux-androideabi")
TARGET = Some("armv7-linux-androideabi")
running: "arm-linux-androideabi-ar" "crs" "/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/libjsglue.a" "/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/src/jsglue.o"
exit code: 0
TARGET = Some("armv7-linux-androideabi")
cargo:rustc-link-lib=static=jsglue
cargo:rustc-link-search=native=/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out
TARGET = Some("armv7-linux-androideabi")
cargo:rustc-link-lib=stdc++
Generting bindings ["./src/jsglue.hpp", "--rust-target", "1.19", "--rustified-enum", ".*", "--no-derive-default", "--enable-cxx-namespaces", "--generate", "function,types,vars", "--ignore-methods", "--", "-I", "/Users/paul/git/servo/target/armv7-linux-androideabi/debug/build/mozjs_sys-4e385210f3da9c93/out/dist/include", "-x", "c++", "--sysroot", "/Users/paul/android-ndk-r12b/platforms/android-18/arch-arm", "-I/Users/paul/android-ndk-r12b/sources/android/support/include", "-I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include", "-I/Users/paul/android-ndk-r12b/sources/cxx-stl/llvm-libc++abi/libcxxabi/include", "-DRUST_BINDGEN", "-DSTATIC_JS_API", "-std=gnu++11", "-fno-sized-deallocation", "-Wno-unused-parameter", "-Wno-invalid-offsetof"].

warning: build failed, waiting for other jobs to finish...
error: build failed
Build FAILED in 0:01:36

Activity

  1. changed the title [-]Can't compile since mozjs update. [/-] [+]Can't compile since mozjs update (Android).[/+] on Jun 6, 2018
  2. added
    P-android
    on Jun 6, 2018
  3. asajeffrey commented on Jun 6, 2018

    @asajeffrey
    Contributor

    Which version of llvm do you have? Have you set your LIBCLANG_PATH?

  4. paulrouget commented on Jun 6, 2018

    @paulrouget
    ContributorAuthor

    Apple LLVM version 9.1.0 (clang-902.0.39.2)

    LIBCLANG_PATH is not set.

  5. CYBAI commented on Jun 6, 2018

    @CYBAI
    Member

    I cannot compile mozjs_sys either.

    On macOS 10.12.6 with latest master (a07c718)

    Here's the error log.

    error: incorrect close delimiter: `]`
         --> /Users/chengyou.bai/Documents/cybai/servo/target/debug/build/mozjs_sys-d4d4cc1e26ce451a/out/jsapi.rs:10722:43
          |
    10722 |             # [ derive ( Copy ) ]; 1usize ] , _bindgen_union_align : u64 , }            # [ test ]
          |                                           ^
          |
    note: unclosed delimiter
         --> /Users/chengyou.bai/Documents/cybai/servo/target/debug/build/mozjs_sys-d4d4cc1e26ce451a/out/jsapi.rs:10465:24
          |
    10465 |         pub mod shadow {
          |                        ^
    
    error: unexpected close delimiter: `}`
         --> /Users/chengyou.bai/Documents/cybai/servo/target/debug/build/mozjs_sys-d4d4cc1e26ce451a/out/jsapi.rs:11882:5
          |
    11882 |     }
          |     ^
    
    error: aborting due to 2 previous errors
    
    The following warnings were emitted during compilation:
    
    warning: In file included from src/jsglue.cpp:7:
    warning: src/jsglue.hpp:86:16: warning: private field 'argv_' is not used [-Wunused-private-field]
    warning:     JS::Value* argv_;
    warning:                ^
    warning: src/jsglue.hpp:87:14: warning: private field 'argc_' is not used [-Wunused-private-field]
    warning:     unsigned argc_;
    warning:              ^
    warning: src/jsglue.hpp:88:10: warning: private field 'constructing_' is not used [-Wunused-private-field]
    warning:     bool constructing_:1;
    warning:          ^
    warning: src/jsglue.hpp:89:10: warning: private field 'ignoresReturnValue_' is not used [-Wunused-private-field]
    warning:     bool ignoresReturnValue_:1;
    warning:          ^
    warning: 4 warnings generated.
    
    error: Could not compile `mozjs_sys`.
    warning: build failed, waiting for other jobs to finish...
    error: build failed
    Build FAILED in 0:22:05

    LLVM version

    → llvm-gcc -v
    Apple LLVM version 9.0.0 (clang-900.0.39.2)
    Target: x86_64-apple-darwin16.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    
  6. asajeffrey commented on Jun 6, 2018

    @asajeffrey
    Contributor

    Oh good, Apple ships it's own llvm? Can you try setting LIBCLANG_PATH to the directory containing libclang and see if that helps? If not, is there a way to install "regular" LLVM rather than Apple's?

  7. paulrouget commented on Jun 6, 2018

    @paulrouget
    ContributorAuthor

    Can you try setting LIBCLANG_PATH to the directory containing libclang and see if that helps?

    Still doesn't work. Clobbering to see if that helps.

    If not, is there a way to install "regular" LLVM rather than Apple's?

    Yes. It's actually installed by brew. It's under /usr/local/Cellar/llvm/6.0.0/ while Apple's llvm is under /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin.

  8. asajeffrey commented on Jun 6, 2018

    @asajeffrey
    Contributor

    Hmm, this even fails with LIBCLANG_PATH set to /usr/local/Cellar/llvm/6.0.0/lib (or wherever brew puts libclang)?

    Do you have llvm-config installed? What is the output of llvm-config --version --libdir?

  9. paulrouget commented on Jun 6, 2018

    @paulrouget
    ContributorAuthor

    Do you have llvm-config installed?

    No.

  10. paulrouget commented on Jun 6, 2018

    @paulrouget
    ContributorAuthor

    This only fails when compiling on MacOS for Android.

  11. asajeffrey commented on Jun 6, 2018

    @asajeffrey
    Contributor

    Unfortunately that's a combination we're not testing on CI, hence the issues :(

    Can you try adding the -v -v flags to ./mach build and see if we can get some more useful warnings / error messages?

  12. asajeffrey commented on Jun 6, 2018

    @asajeffrey
    Contributor

    @CYBAI that looks like a different error, in that bindgen is producing a syntactically invalid jsapi.rs. Are you seeing this consistently from a clean build? Can you try building https://github.com/servo/mozjs by itself and see if you get the same issue?

  13. CYBAI commented on Jun 6, 2018

    @CYBAI
    Member

    @asajeffrey Yes, I pulled the latest master and built it twice with same error output.
    Let me try to build it again and also build the mozjs repo.

  14. asajeffrey commented on Jun 6, 2018

    @asajeffrey
    Contributor

    @CYBAI thanks!

  15. paulrouget commented on Jun 6, 2018

    @paulrouget
    ContributorAuthor

    Logs are very long. I see:

    clang -fno-strict-aliasing -fno-common -dynamic -g -o2 -dndebug -g -fwrapv -o3 -wall -wstrict-prototypes --sysroot /users/paul/android-ndk-r12b/platforms/android-18/arch-arm -dpsutil_version=311 -i/usr/local/cellar/python/2.7.13/frameworks/python.framework/versions/2.7/include/python2.7 -c psutil/_psutil_osx.c -o build/temp.macosx-10.12-x86_64-2.7/psutil/_psutil_osx.o
    psutil/_psutil_osx.c:15:10: fatal error: 'utmpx.h' file not found
    #include <utmpx.h>
             ^~~~~~~~~
    1 error generated.
    error: command 'clang' failed with exit status 1
    
    error processing command. ignoring because optional. (optional:setup.py:python/psutil:build_ext:--inplace)
    
    

    Not sure if that helps.

  16. 5 remaining items

  17. paulrouget commented on Jun 7, 2018

    @paulrouget
    ContributorAuthor

    This is the first log I get after a mach clean && mach build -d --android. When I build again, I see the log as seen in comment 0.

  18. paulrouget commented on Jun 7, 2018

    @paulrouget
    ContributorAuthor

    I'm having a hard time finding exactly what's failing.

  19. paulrouget commented on Jun 7, 2018

    @paulrouget
    ContributorAuthor

    I've updated the logs in comment #20958 (comment)

  20. paulrouget commented on Jun 7, 2018

    @paulrouget
    ContributorAuthor

    I tried to compile with regular llvm.

    clang version 6.0.0 (tags/RELEASE_600/final)
    Target: x86_64-apple-darwin17.5.0
    Thread model: posix
    InstalledDir: /usr/local/opt/llvm/bin
    

    But it still fails: https://transfer.sh/wIuhv/log.txt

  21. asajeffrey commented on Jun 7, 2018

    @asajeffrey
    Contributor

    @jdm was saying on IRC that he tracked this down to a SEGV during library loading (!) https://mozilla.logbot.info/servo/20180606#c14862976

  22. jdm commented on Jun 12, 2018

    @jdm
    Member

    The segfault goes away when I revert nagisa/rust_libloading@d870a38 and use the modified libloading. I'm still working on getting the actual bindgen "compilation" to succeed.

  23. jdm commented on Jun 12, 2018

    @jdm
    Member

    I got a successful compilation of standalone mozjs with some manual intervention. Some issues:

    • if a --sysroot is included in the CXXFLAGS, the jsglue compilation breaks really badly
    • if a --sysroot is not included in the CXXFLAGS, the flag_if_supported check fails because of linking errors, so none of the flags are marked as supported
    • gcc doesn't like the -fno-sized-declaration flag, so we can't just use flag instead of flag_if_supported unmodified

    This script got me a successful build:

    export CFLAGS="--sysroot=/Users/jdm/Downloads/android-ndk-r12b/platforms/android-18/arch-arm/ -B/Users/jdm/Downloads/android-ndk-r12b/platforms/android-18/arch-arm/usr/lib -L/Users/jdm/Downloads/android-ndk-r12b//toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/"
    export CXXFLAGS="-v -D__ANDROID_API__=18 -I/Users/jdm/Downloads/android-ndk-r12b//sources/cxx-stl/llvm-libc++/libcxx/include/ -I/Users/jdm/Downloads/android-ndk-r12b//sources/cxx-stl/system/include/ -I/Users/jdm/Downloads/android-ndk-r12b/sources/android/support/include -I/Users/jdm/Downloads/android-ndk-r12b/platforms/android-18/arch-arm/usr/include "
    export RUST_BACKTRACE=1
    export NDK_ANDROID_VERSION=18
    export ANDROID_NDK=~/Downloads/android-ndk-r12b/
    export PATH=~/Downloads/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin:/Users/jdm/Downloads/android-ndk-r12b//toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/arm-linux-androideabi/bin/:$PATH
    cargo build --target armv7-linux-androideabi
  24. wayling commented on Jun 19, 2018

    @wayling
    Contributor

    Hi all,
    I complie with standalone mozjs-0.7.1 but got many error message.
    https://gist.github.com/wayling/5c37e4cc3cee70267c4414e0eaee4888
    Has someone can help me??

    My compile command.
    export NDK_ANDROID_VERSION=18
    export CXXFLAGS="-v -D__ANDROID_API__=18 -I/home/wayling/android_tool/android-ndk-r12b/sources/cxx-stl/llvm-libc++/libcxx/include/ -I/home/wayling/android_tool/android-ndk-r12b/sources/cxx-stl/system/include/ -I/home/wayling/android_tool/android-ndk-r12b/sources/android/support/include -I/home/wayling/android_tool/android-ndk-r12b/platforms/android-18/arch-arm/usr/include"
    export CFLAGS="--sysroot=/home/wayling/android_tool/android-ndk-r12b/platforms/android-18/arch-arm/ -B/home/wayling/android_tool/android-ndk-r12b/platforms/android-18/arch-arm/usr/lib -L/home/wayling/android_tool/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/"

    cargo build -j 1 -vv --target armv7-linux-androideabi

  25. jdm commented on Jun 19, 2018

    @jdm
    Member

    @wayling That should be fixed if you build the latest master revision.

  26. jdm commented on Jun 19, 2018

    @jdm
    Member

    And these are the latest variables I used to compile:

    export HOST_CFLAGS=""
    export CFLAGS="--sysroot=/Users/jdm/Downloads/android-ndk-r12b/platforms/android-18/arch-arm/ -B/Users/jdm/Downloads/android-ndk-r12b/platforms/android-18/arch-arm/usr/lib -L/Users/jdm/Downloads/android-ndk-r12b//toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/lib/gcc/arm-linux-androideabi/4.9.x/"
    export CXXFLAGS="--sysroot=/Users/jdm/Downloads/android-ndk-r12b/platforms/android-18/arch-arm/ -I/Users/jdm/Downloads/android-ndk-r12b//sources/cxx-stl/llvm-libc++/libcxx/include/ -I/Users/jdm/Downloads/android-ndk-r12b//sources/cxx-stl/system/include/ -I/Users/jdm/Downloads/android-ndk-r12b/sources/android/support/include -I/Users/jdm/Downloads/android-ndk-r12b/platforms/android-18/arch-arm/usr/include"
    export RUST_BACKTRACE=1
    export NDK_ANDROID_VERSION=18
    export ANDROID_NDK=~/Downloads/android-ndk-r12b/
    export PATH=~/Downloads/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/darwin-x86_64/bin:$PATH
    
  27. added a commit that references this issue on Jun 20, 2018
    132bf17
  28. moved this to Done in Androidon Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P-android

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions