Opened 3 years ago

Last modified 5 months ago

#63485 assigned defect

mozjs60 @60.8.0: fails due to no i386 atomics available when building with clang-9.0

Reported by: kencu (Ken) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: mozjs60 clang-9.0

Description

https://build.macports.org/builders/ports-10.6_i386-builder/builds/39699/steps/install-port/logs/stdio

fails because the i386 atomics were removed by default from compiler_rt on clang-9.0. I will put those back for i386 hosts at least.

Executing: /opt/local/bin/clang++-mp-9.0 -o jsapi-tests -Qunused-arguments -I/opt/local/include -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wunreachable-code-return -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++1z-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wformat-security -Wno-gnu-zero-variadic-macro-arguments -Wno-noexcept-type -Wno-unknown-warning-option -Wno-return-type-c-linkage -fno-sized-deallocation -pipe -Os -stdlib=libc++ -arch i386 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fno-common -stdlib=libc++ -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -g -O3 -fno-stack-protector -fomit-frame-pointer -Wl,-filelist,/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/js/src/jsapi-tests/tmpyAHKcl.list -L/opt/local/lib -Wl,-headerpad_max_install_names -arch i386 -lobjc -framework ExceptionHandling -Wl,-executable_path,/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/dist/bin -Wl,-dead_strip ../build/libjs_static.a ../../../mozglue/build/libmozglue.dylib -lm -L/opt/local/lib/nspr -lplds4 -lplc4 -lnspr4 -L/opt/local/lib -lz -lm
/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_mozjs60/mozjs60/work/mozjs-60.8.0/js/src/obj/js/src/jsapi-tests/tmpyAHKcl.list:
    hidePointer.o
    testAssemblerBuffer.o
    Unified_cpp_js_src_jsapi-tests0.o
    Unified_cpp_js_src_jsapi-tests1.o
    Unified_cpp_js_src_jsapi-tests2.o
    Unified_cpp_js_src_jsapi-tests3.o
    Unified_cpp_js_src_jsapi-tests4.o
    Unified_cpp_js_src_jsapi-tests5.o
    Unified_cpp_js_src_jsapi-tests6.o

Undefined symbols for architecture i386:
  "___atomic_fetch_xor_8", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_fetch_and_8", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_store", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_compare_exchange", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_exchange", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_fetch_add_8", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_fetch_sub_8", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_fetch_or_8", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
  "___atomic_load", referenced from:
      cls_testAtomicOperationsU64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o
      cls_testAtomicOperationsI64::run(JS::Handle<JSObject*>) in Unified_cpp_js_src_jsapi-tests0.o

Change History (8)

comment:1 Changed 3 years ago by kencu (Ken)

Owner: changed from kencu to macports-tickets@…

comment:2 Changed 3 years ago by evanmiller (Evan Miller)

Cc: evanmiller added

comment:3 Changed 3 years ago by kencu (Ken)

some clangs are fixed, evan

trivial config arg change then revbump.

go nutz.

comment:4 Changed 3 years ago by evanmiller (Evan Miller)

Any hints about the magic config arg? i386 was still failing as of Jan 15:

https://build.macports.org/builders/ports-10.6_i386-builder/builds/53838

comment:5 Changed 3 years ago by kencu (Ken)

I was combining this with other needed fixes, so as to not rebuild all the newer clangs just for this one little thing, so that’s why not all the clangs were done at once. (There are a few other triv fixes needed too in the libc++ config, and to fix the asm-redefinition issue that messes up legacy support on <10.6 with clang that I was combing into one commit.)

I just can’t fix the formatting right on this ipad right now to give the pretty trac code version, so here’s the whole url.

https://github.com/macports/macports-ports/commit/c53a09036eb6c71a52055965b4d300441f22da5a#diff-9c89fd7192470f28599999dc5c30c4d1fb98b49519a2b33d6e860ae43c281dcf

comment:6 Changed 3 years ago by kencu (Ken)

comment:7 Changed 3 years ago by evanmiller (Evan Miller)

Thanks Ken. This issue will be somewhat less pressing (if pressing can ever be the right word for i386) when policykit migrates from mozjs to duktape: https://github.com/macports/macports-ports/pull/13789

That will leave gjs as the only mozjs consumer. Newer gjs requires mozjs78 / 91, which requires Rust, so these systems will likely be left in the cold on that front. Maybe we can peg an old gjs version for PPC and i386.

comment:8 Changed 5 months ago by evanmiller (Evan Miller)

Cc: evanmiller removed
Note: See TracTickets for help on using tickets.