Opened 2 years ago

Last modified 12 months ago

#57032 assigned defect

mozjs52 @52.6.0, mozjs60 @60.1.0: Target C compiler target CPU (unknown) does not match --target CPU (powerpc)

Reported by: ballapete (Peter Dyballa) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: powerpc Cc: udbraumann, ryandesign (Ryan Schmidt)
Port: mozjs52, mozjs60

Description

By some reason mozjs52 wants to get installed and fails:

checking for the target C compiler... /opt/local/bin/gcc-mp-6
checking whether the target C compiler can be used... no
DEBUG: <truncated - see config.log for full output>
DEBUG: | #elif __linux__
DEBUG: | %KERNEL "Linux"
DEBUG: | #elif _WIN32 || __CYGWIN__
DEBUG: | %KERNEL "WINNT"
DEBUG: | #elif __NetBSD__
DEBUG: | %KERNEL "NetBSD"
DEBUG: | #elif __APPLE__
DEBUG: | %KERNEL "Darwin"
DEBUG: | #endif
DEBUG: | #if _MSC_VER || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
DEBUG: | %ENDIANNESS "little"
DEBUG: | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
DEBUG: | %ENDIANNESS "big"
DEBUG: | #endif
DEBUG: Executing: `/opt/local/bin/gcc-mp-6 -std=gnu99 -E /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_mozjs52/mozjs52/work/.tmp/conftest.CpnwOJ.c`
DEBUG: COMPILER = gcc
DEBUG: VERSION = 6.4.0
DEBUG: STDC_VERSION = 199901L
DEBUG: KERNEL = Darwin
DEBUG: ENDIANNESS = big
ERROR: Target C compiler target CPU (unknown) does not match --target CPU (powerpc)
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj" && ../configure --prefix=/opt/local --with-system-icu --with-system-nspr --disable-readline --enable-threadsafe 
Exit code: 1
Error: Failed to configure mozjs52, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/config.log
Error: Failed to configure mozjs52: configure failure: command execution failed
DEBUG: Error code: NONE

Attachments (5)

main.log (16.3 KB) - added by ballapete (Peter Dyballa) 2 years ago.
Main.log from PPC Leopard
config.log (6.2 KB) - added by ballapete (Peter Dyballa) 2 years ago.
/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/config.log
patch-mozjs52-portfile.diff (919 bytes) - added by kencu (Ken) 14 months ago.
patch-mozjs52-tiger-ppc-notfixedyetfully.diff (18.0 KB) - added by kencu (Ken) 14 months ago.
mozjs52-fail-tigerppc-end-of-log.log (7.7 KB) - added by kencu (Ken) 14 months ago.

Download all attachments as: .zip

Change History (32)

Changed 2 years ago by ballapete (Peter Dyballa)

Attachment: main.log added

Main.log from PPC Leopard

Changed 2 years ago by ballapete (Peter Dyballa)

Attachment: config.log added

/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/config.log

comment:1 Changed 2 years ago by ballapete (Peter Dyballa)

GCC 6.4 knows these upper case #defines:

#define _ARCH_PPC 1
#define _ARCH_PPCGR 1
#define _BIG_ENDIAN 1
#define _Bool _Bool
#define _CALL_DARWIN 1
#define __ALTIVEC__ 1
#define __APPLE_ALTIVEC__ 1
#define __APPLE_CC__ 1
#define __APPLE__ 1
#define __ATOMIC_ACQUIRE 2
#define __ATOMIC_ACQ_REL 4
#define __ATOMIC_CONSUME 1
#define __ATOMIC_RELAXED 0
#define __ATOMIC_RELEASE 3
#define __ATOMIC_SEQ_CST 5
#define __BIGGEST_ALIGNMENT__ 16
#define __BIG_ENDIAN__ 1
#define __BYTE_ORDER__ __ORDER_BIG_ENDIAN__
#define __CHAR16_TYPE__ short unsigned int
#define __CHAR32_TYPE__ unsigned int
#define __CHAR_BIT__ 8
#define __CONSTANT_CFSTRINGS__ 1
#define __DBL_DECIMAL_DIG__ 17
#define __DBL_DENORM_MIN__ ((double)4.94065645841246544176568792868221e-324L)
#define __DBL_DIG__ 15
#define __DBL_EPSILON__ ((double)2.22044604925031308084726333618164e-16L)
#define __DBL_HAS_DENORM__ 1
#define __DBL_HAS_INFINITY__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DBL_MANT_DIG__ 53
#define __DBL_MAX_10_EXP__ 308
#define __DBL_MAX_EXP__ 1024
#define __DBL_MAX__ ((double)1.79769313486231570814527423731704e+308L)
#define __DBL_MIN_10_EXP__ (-307)
#define __DBL_MIN_EXP__ (-1021)
#define __DBL_MIN__ ((double)2.22507385850720138309023271733240e-308L)
#define __DEC128_EPSILON__ 1E-33DL
#define __DEC128_MANT_DIG__ 34
#define __DEC128_MAX_EXP__ 6145
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __DEC128_MIN_EXP__ (-6142)
#define __DEC128_MIN__ 1E-6143DL
#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL
#define __DEC32_EPSILON__ 1E-6DF
#define __DEC32_MANT_DIG__ 7
#define __DEC32_MAX_EXP__ 97
#define __DEC32_MAX__ 9.999999E96DF
#define __DEC32_MIN_EXP__ (-94)
#define __DEC32_MIN__ 1E-95DF
#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC64_MANT_DIG__ 16
#define __DEC64_MAX_EXP__ 385
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_MIN_EXP__ (-382)
#define __DEC64_MIN__ 1E-383DD
#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD
#define __DECIMAL_DIG__ 33
#define __DEC_EVAL_METHOD__ 2
#define __DYNAMIC__ 1
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1058
#define __FINITE_MATH_ONLY__ 0
#define __FLOAT_WORD_ORDER__ __ORDER_BIG_ENDIAN__
#define __FLT_DECIMAL_DIG__ 9
#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328992e-45F
#define __FLT_DIG__ 6
#define __FLT_EPSILON__ 1.19209289550781250000000000000000e-7F
#define __FLT_EVAL_METHOD__ 0
#define __FLT_HAS_DENORM__ 1
#define __FLT_HAS_INFINITY__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MANT_DIG__ 24
#define __FLT_MAX_10_EXP__ 38
#define __FLT_MAX_EXP__ 128
#define __FLT_MAX__ 3.40282346638528859811704183484517e+38F
#define __FLT_MIN_10_EXP__ (-37)
#define __FLT_MIN_EXP__ (-125)
#define __FLT_MIN__ 1.17549435082228750796873653722225e-38F
#define __FLT_RADIX__ 2
#define __FP_FAST_FMA 1
#define __FP_FAST_FMAF 1
#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
#define __GCC_ATOMIC_INT_LOCK_FREE 2
#define __GCC_ATOMIC_LLONG_LOCK_FREE 1
#define __GCC_ATOMIC_LONG_LOCK_FREE 2
#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1
#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
#define __GCC_IEC_559 2
#define __GCC_IEC_559_COMPLEX 2
#define __GNUC_MINOR__ 4
#define __GNUC_PATCHLEVEL__ 0
#define __GNUC_STDC_INLINE__ 1
#define __GNUC__ 6
#define __GXX_ABI_VERSION 1010
#define __HAVE_BSWAP__ 1
#define __INT16_C(c) c
#define __INT16_MAX__ 0x7fff
#define __INT16_TYPE__ short int
#define __INT32_C(c) c
#define __INT32_MAX__ 0x7fffffff
#define __INT32_TYPE__ int
#define __INT64_C(c) c ## LL
#define __INT64_MAX__ 0x7fffffffffffffffLL
#define __INT64_TYPE__ long long int
#define __INT8_C(c) c
#define __INT8_MAX__ 0x7f
#define __INT8_TYPE__ signed char
#define __INTMAX_C(c) c ## LL
#define __INTMAX_MAX__ 0x7fffffffffffffffLL
#define __INTMAX_TYPE__ long long int
#define __INTPTR_MAX__ 0x7fffffffL
#define __INTPTR_TYPE__ long int
#define __INT_FAST16_MAX__ 0x7fff
#define __INT_FAST16_TYPE__ short int
#define __INT_FAST32_MAX__ 0x7fffffff
#define __INT_FAST32_TYPE__ int
#define __INT_FAST64_MAX__ 0x7fffffffffffffffLL
#define __INT_FAST64_TYPE__ long long int
#define __INT_FAST8_MAX__ 0x7f
#define __INT_FAST8_TYPE__ signed char
#define __INT_LEAST16_MAX__ 0x7fff
#define __INT_LEAST16_TYPE__ short int
#define __INT_LEAST32_MAX__ 0x7fffffff
#define __INT_LEAST32_TYPE__ int
#define __INT_LEAST64_MAX__ 0x7fffffffffffffffLL
#define __INT_LEAST64_TYPE__ long long int
#define __INT_LEAST8_MAX__ 0x7f
#define __INT_LEAST8_TYPE__ signed char
#define __INT_MAX__ 0x7fffffff
#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
#define __LDBL_DIG__ 31
#define __LDBL_EPSILON__ 4.94065645841246544176568792868221e-324L
#define __LDBL_HAS_DENORM__ 1
#define __LDBL_HAS_INFINITY__ 1
#define __LDBL_HAS_QUIET_NAN__ 1
#define __LDBL_MANT_DIG__ 106
#define __LDBL_MAX_10_EXP__ 308
#define __LDBL_MAX_EXP__ 1024
#define __LDBL_MAX__ 1.79769313486231580793728971405301e+308L
#define __LDBL_MIN_10_EXP__ (-291)
#define __LDBL_MIN_EXP__ (-968)
#define __LDBL_MIN__ 2.00416836000897277799610805135016e-292L
#define __LONGDOUBLE128 1
#define __LONG_DOUBLE_128__ 1
#define __LONG_DOUBLE_IBM128__ 1
#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL
#define __LONG_MAX__ 0x7fffffffL
#define __MACH__ 1
#define __NATURAL_ALIGNMENT__ 1
#define __NO_INLINE__ 1
#define __ORDER_BIG_ENDIAN__ 4321
#define __ORDER_LITTLE_ENDIAN__ 1234
#define __ORDER_PDP_ENDIAN__ 3412
#define __PIC__ 2
#define __POWERPC__ 1
#define __PRAGMA_REDEFINE_EXTNAME 1
#define __PTRDIFF_MAX__ 0x7fffffff
#define __PTRDIFF_TYPE__ int
#define __RECIPF__ 1
#define __REGISTER_PREFIX__ 
#define __RSQRTE__ 1
#define __SCHAR_MAX__ 0x7f
#define __SHRT_MAX__ 0x7fff
#define __SIG_ATOMIC_MAX__ 0x7fffffff
#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1)
#define __SIG_ATOMIC_TYPE__ int
#define __SIZEOF_DOUBLE__ 8
#define __SIZEOF_FLOAT__ 4
#define __SIZEOF_INT__ 4
#define __SIZEOF_LONG_DOUBLE__ 16
#define __SIZEOF_LONG_LONG__ 8
#define __SIZEOF_LONG__ 4
#define __SIZEOF_POINTER__ 4
#define __SIZEOF_PTRDIFF_T__ 4
#define __SIZEOF_SHORT__ 2
#define __SIZEOF_SIZE_T__ 4
#define __SIZEOF_WCHAR_T__ 4
#define __SIZEOF_WINT_T__ 4
#define __SIZE_MAX__ 0xffffffffUL
#define __SIZE_TYPE__ long unsigned int
#define __STDC_HOSTED__ 1
#define __STDC_UTF_16__ 1
#define __STDC_UTF_32__ 1
#define __STDC_VERSION__ 199901L
#define __STDC__ 1
#define __UINT16_C(c) c
#define __UINT16_MAX__ 0xffff
#define __UINT16_TYPE__ short unsigned int
#define __UINT32_C(c) c ## U
#define __UINT32_MAX__ 0xffffffffU
#define __UINT32_TYPE__ unsigned int
#define __UINT64_C(c) c ## ULL
#define __UINT64_MAX__ 0xffffffffffffffffULL
#define __UINT64_TYPE__ long long unsigned int
#define __UINT8_C(c) c
#define __UINT8_MAX__ 0xff
#define __UINT8_TYPE__ unsigned char
#define __UINTMAX_C(c) c ## ULL
#define __UINTMAX_MAX__ 0xffffffffffffffffULL
#define __UINTMAX_TYPE__ long long unsigned int
#define __UINTPTR_MAX__ 0xffffffffUL
#define __UINTPTR_TYPE__ long unsigned int
#define __UINT_FAST16_MAX__ 0xffff
#define __UINT_FAST16_TYPE__ short unsigned int
#define __UINT_FAST32_MAX__ 0xffffffffU
#define __UINT_FAST32_TYPE__ unsigned int
#define __UINT_FAST64_MAX__ 0xffffffffffffffffULL
#define __UINT_FAST64_TYPE__ long long unsigned int
#define __UINT_FAST8_MAX__ 0xff
#define __UINT_FAST8_TYPE__ unsigned char
#define __UINT_LEAST16_MAX__ 0xffff
#define __UINT_LEAST16_TYPE__ short unsigned int
#define __UINT_LEAST32_MAX__ 0xffffffffU
#define __UINT_LEAST32_TYPE__ unsigned int
#define __UINT_LEAST64_MAX__ 0xffffffffffffffffULL
#define __UINT_LEAST64_TYPE__ long long unsigned int
#define __UINT_LEAST8_MAX__ 0xff
#define __UINT_LEAST8_TYPE__ unsigned char
#define __USER_LABEL_PREFIX__ _
#define __VEC_ELEMENT_REG_ORDER__ __ORDER_BIG_ENDIAN__
#define __VEC__ 10206
#define __VERSION__ "6.4.0"
#define __WCHAR_MAX__ 0x7fffffff
#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1)
#define __WCHAR_TYPE__ int
#define __WINT_MAX__ 0x7fffffff
#define __WINT_MIN__ (-__WINT_MAX__ - 1)
#define __WINT_TYPE__ int

comment:2 Changed 2 years ago by jmroot (Joshua Root)

Cc: devans@… removed
Owner: set to dbevans
Status: newassigned
Summary: mozjs52 @52.6.0mozjs52 @52.6.0 configure failure

comment:3 Changed 2 years ago by ballapete (Peter Dyballa)

configure reports this option:

  --enable-macos-target     Set the minimum MacOS version needed at runtime [10.7]

Could be mozjs52 does not build on Snow Leopard and older…

comment:4 Changed 2 years ago by kencu (Ken)

Snow Leopard is OK, at least.

$ port -v installed mozjs52
The following ports are currently installed:
  mozjs52 @52.6.0_0+universal (active) platform='darwin 10' archs='i386 x86_64' date='2018-08-24T20:12:27-0700'

comment:5 Changed 2 years ago by ballapete (Peter Dyballa)

Could be he problem comes from these lines in config.log:

DEBUG: | #elif __powerpc64__
DEBUG: | %CPU "ppc64"
DEBUG: | #elif __powerpc__
DEBUG: | %CPU "ppc"

These are tests on lower case strings, but GCC defines UPPER CASE STRINGS. So configure has to state: ERROR: Target C compiler target CPU (unknown) does not match --target CPU (powerpc). Some more files seem to think it's FORTRAN time in reverse:

./js/src/ctypes/CTypes.cpp:#if defined(SPARC) || defined(__powerpc__)
./js/src/jit/arm/llvm-compiler-rt/assembly.h:#if defined(__POWERPC__) || defined(__powerpc__) || defined(__ppc__)
./js/src/vm/TraceLogging.cpp:#elif defined(__powerpc__)
./memory/jemalloc/src/include/jemalloc/internal/jemalloc_internal.h.in:#  ifdef __powerpc__
./memory/jemalloc/src/include/jemalloc/internal/mb.h:#elif defined(__powerpc__)
./memory/mozjemalloc/jemalloc.c:#ifdef __powerpc__
./mfbt/EndianUtils.h:#elif defined(__APPLE__) || defined(__powerpc__) || defined(__ppc__)
./mfbt/double-conversion/utils.h:    defined(__powerpc__) || defined(__ppc__) || defined(__ppc64__) || \
./mfbt/lz4.c:   || defined(__powerpc__) || defined(__ppc__) || defined(__PPC__) \
./nsprpub/pr/include/md/_beos.cfg:#ifdef __powerpc__
./nsprpub/pr/include/md/_beos.h:#ifdef __powerpc__
./nsprpub/pr/include/md/_freebsd.cfg:#elif defined(__powerpc__)
./nsprpub/pr/include/md/_freebsd.h:#elif defined(__powerpc__)
./nsprpub/pr/include/md/_linux.cfg:#elif defined(__powerpc__)
./nsprpub/pr/include/md/_linux.h:#elif defined(__powerpc__)
./nsprpub/pr/include/md/_linux.h:#if defined(__powerpc__) && !defined(__powerpc64__)
./nsprpub/pr/include/md/_linux.h:#ifdef __powerpc__
./nsprpub/pr/include/md/_linux.h:#endif /*__powerpc__*/
./nsprpub/pr/include/md/_linux.h:#ifdef __powerpc__
./nsprpub/pr/include/md/_linux.h:#endif /*__powerpc__*/
./nsprpub/pr/include/md/_netbsd.cfg:#elif defined(__powerpc__) || defined(__m68k__)
./nsprpub/pr/include/md/_netbsd.h:#elif defined(__powerpc__)
./nsprpub/pr/include/md/_netbsd.h:#if defined(__i386__) || defined(__sparc__) || defined(__m68k__) || defined(__powerpc__)
./nsprpub/pr/include/md/_openbsd.cfg:#elif defined(__powerpc__) || defined(__m68k__)
./nsprpub/pr/include/md/_openbsd.h:#elif defined(__powerpc__)
./nsprpub/pr/include/md/_openbsd.h:#elif defined(__powerpc__)
./nsprpub/pr/include/pratom.h:           defined(__powerpc__) || \
./python/mozbuild/mozbuild/configure/constants.py:    ('ppc', '__powerpc__'),
Übereinstimmungen in Binärdatei ./python/mozbuild/mozbuild/configure/constants.pyc
./python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py:                '__powerpc__': 1,
./python/mozbuild/mozbuild/test/configure/test_toolchain_configure.py:                '__powerpc__': 1,

Since my tongue is more like that of a snail (Anglo-German insiders joke) *I* have no idea where to start patching because I do not speak Python…

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

Summary: mozjs52 @52.6.0 configure failuremozjs52 @52.6.0 configure failure on PPC

comment:7 Changed 2 years ago by ballapete (Peter Dyballa)

Clang 3.3 and 3.4 both define:

#define __POWERPC__ 1
#define __powerpc__ 1

comment:8 Changed 2 years ago by udbraumann

Cc: udbraumann added

comment:9 in reply to:  4 ; Changed 2 years ago by udbraumann

Replying to kencu:

Snow Leopard is OK, at least.

Can you tell which compiler is being used under 10.6?

comment:10 in reply to:  9 Changed 2 years ago by ballapete (Peter Dyballa)

Replying to udbraumann:

Replying to kencu:

Snow Leopard is OK, at least.

Can you tell which compiler is being used under 10.6?

checking for the target C compiler... /opt/local/bin/gcc-mp-6

comment:11 Changed 2 years ago by ballapete (Peter Dyballa)

Looking in Leopard into mozjs-52.6.0gnome1/js/src/obj/config.log it seems rather that GCC has #defined lower case strings, but not ppc or __powerpc__. Instead it has __ppc__:

pete 238 /\ echo | g++-apple-4.2 -dM -E - | egrep -i 'ppc|cpu|app|darwin|gnu|plus'
#define _ARCH_PPCGR 1
#define __GNUC_PATCHLEVEL__ 4
#define __APPLE_CC__ 5666
#define __ppc__ 1
#define __APPLE__ 1
#define __GNUC__ 4
#define _ARCH_PPC 1
#define __VERSION__ "4.2.4 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42 5666.3_15+gpl3)"
#define __GNUC_MINOR__ 2
#define __GNUC_GNU_INLINE__ 1
pete 239 /\ g++-mp-6 -dM -E - < /dev/null | egrep -i 'ppc|cpu|app|darwin|gnu|plus'
#define _ARCH_PPCGR 1
#define __GNUC_PATCHLEVEL__ 0
#define _ARCH_PPC 1
#define __APPLE_CC__ 1
#define __ppc__ 1
#define __APPLE__ 1
#define __GNUC__ 6
#define _CALL_DARWIN 1
#define __GNUC_STDC_INLINE__ 1
#define __APPLE_ALTIVEC__ 1
#define __GNUC_MINOR__ 4

comment:12 Changed 2 years ago by ballapete (Peter Dyballa)

I created a bug report on the bugzilla site: https://bugzilla.mozilla.org/show_bug.cgi?id=1489839.

comment:13 Changed 2 years ago by ballapete (Peter Dyballa)

On Tiger I tried an "improved" command:

pete 228 /\ g++-mp-6 -dM -E - < /dev/null | egrep -i 'ppc|power|cpu|app|darwin|gnu|plus'
#define _ARCH_PPCGR 1
#define __GNUC_PATCHLEVEL__ 0
#define _ARCH_PPC 1
#define __APPLE_CC__ 1
#define __ppc__ 1
#define __APPLE__ 1
#define __GNUC__ 6
#define _CALL_DARWIN 1
#define __GNUC_STDC_INLINE__ 1
#define __GNUC_MINOR__ 4
#define __POWERPC__ 1

Similarly Apple's GCC 4.2.1 has also #defined the string __POWERPC__.

Last edited 14 months ago by ryandesign (Ryan Schmidt) (previous) (diff)

comment:14 in reply to:  9 Changed 2 years ago by kencu (Ken)

Replying to udbraumann:

Replying to kencu:

Snow Leopard is OK, at least.

Can you tell which compiler is being used under 10.6?

I force 10.6 to build everything with clang-3.9 by setting the default_compilers in macports.conf.

checking for the target C compiler... /opt/local/bin/clang-mp-3.9
checking whether the target C compiler can be used... yes
checking the target C compiler version... 3.9.1
checking the target C compiler works... yes
checking for the target C++ compiler... /opt/local/bin/clang++-mp-3.9
checking whether the target C++ compiler can be used... yes
checking the target C++ compiler version... 3.9.1
checking the target C++ compiler works... yes
checking for the host C compiler... /opt/local/bin/clang-mp-3.9
checking whether the host C compiler can be used... yes
checking the host C compiler version... 3.9.1
checking the host C compiler works... yes
checking for the host C++ compiler... /opt/local/bin/clang++-mp-3.9
checking whether the host C++ compiler can be used... yes
checking the host C++ compiler version... 3.9.1
checking the host C++ compiler works... yes

comment:15 Changed 2 years ago by ballapete (Peter Dyballa)

The Mozilla folks recommend to use mozjs60 because version 52 is not maintained anymore. (And their support starts with macOS 10.9. Of course.)

The option to patch file is beyond my knowledge. I have no how idea how Python works and how I could debug to see which files are used, that might need a patch or two…

comment:16 Changed 2 years ago by kencu (Ken)

I don't know if there will be much luck getting this to build on 10.4 or 10.5 PPC. It's not easy to do, I suspect.

A fairly recent (45, I think) version of mozjs is built in TenFourFox but that took some serious attention.

May I ask if you have narrowed down what you're trying to install (or upgrade) that is pulling this in? Maybe we could figure out how to get around the dependency instead.

comment:17 in reply to:  16 Changed 2 years ago by ballapete (Peter Dyballa)

Replying to kencu:

May I ask if you have narrowed down what you're trying to install (or upgrade) that is pulling this in? Maybe we could figure out how to get around the dependency instead.

It's policykit.

comment:18 Changed 2 years ago by kencu (Ken)

Yeah -- for now you will need to roll back to the last version before the update to 0.115, because it appears 0.115 needs mozjs52.

And you'll need to peg at that version, maybe forever, on PPC.

comment:19 in reply to:  15 Changed 14 months ago by ryandesign (Ryan Schmidt)

Cc: ryandesign added
Keywords: powerpc added; leopard removed
Port: mozjs60 added
Summary: mozjs52 @52.6.0 configure failure on PPCmozjs52 @52.6.0, mozjs60 @60.1.0: Target C compiler target CPU (unknown) does not match --target CPU (powerpc)

Replying to ballapete:

The Mozilla folks recommend to use mozjs60 because version 52 is not maintained anymore.

mozjs60 has the same problem. I've updated the upstream bug report with this information and some hints about how they might solve it.

comment:20 Changed 14 months ago by khepler

Update: Clang defined those macros, not Python. Sorry for the noise.

Original message follows:


The config script detects arch fine when run outside of Macports:

[xserve:mozjs-52.6.0gnome1/js/src] kris% sudo -u macports ./configure
Creating Python environment
New python executable in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/_virtualenv/bin/python
Installing setuptools, pip, wheel...done.
running build_ext
copying build/lib.macosx-10.5-ppc-2.7/psutil/_psutil_osx.so -> psutil
copying build/lib.macosx-10.5-ppc-2.7/psutil/_psutil_posix.so -> psutil

Reexecuting in the virtualenv
checking for a shell... /bin/sh
checking for host system type... powerpc-apple-darwin9.8.0
checking for target system type... powerpc-apple-darwin9.8.0
checking for the Android toolchain directory... not found
checking whether cross compiling... no
checking for pkg_config... /opt/local/bin/pkg-config
checking for pkg-config version... 0.29.2
checking for yasm... not found
checking for android platform directory... no
checking for the target C compiler... /opt/local/bin/clang
checking whether the target C compiler can be used... yes
checking the target C compiler version... 3.4.2
checking the target C compiler works... yes
checking for the target C++ compiler... /opt/local/bin/clang++
checking whether the target C++ compiler can be used... no
DEBUG: <truncated - see config.log for full output>
DEBUG: | #elif __linux__
DEBUG: | %KERNEL "Linux"
DEBUG: | #elif _WIN32 || __CYGWIN__
DEBUG: | %KERNEL "WINNT"
DEBUG: | #elif __NetBSD__
DEBUG: | %KERNEL "NetBSD"
DEBUG: | #elif __APPLE__
DEBUG: | %KERNEL "Darwin"
DEBUG: | #endif
DEBUG: | #if _MSC_VER || __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
DEBUG: | %ENDIANNESS "little"
DEBUG: | #elif __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
DEBUG: | %ENDIANNESS "big"
DEBUG: | #endif
DEBUG: Executing: `/opt/local/bin/clang++ -std=gnu++11 -E /tmp/conftest.PmEJ4p.cpp`
DEBUG: COMPILER = clang
DEBUG: cplusplus = 201103L
DEBUG: CPU = ppc
DEBUG: KERNEL = Darwin
DEBUG: ENDIANNESS = big
ERROR: Only clang/llvm 3.6 or newer is supported.
[xserve:mozjs-52.6.0gnome1/js/src] kris%

I don't believe the macros the script looks for are GCC macros; they seem to be defined by python. I tested GCC v4.2-apple, v4.9-mp, v5-mp, v6-mp and v7-mp and none of them defined those macros. I'm still investigating, but right now it looks like there's no issue with Mozilla's configure script, but there's an incompatibility with Apple's python2.7 while Macports' python2.7 works.

Last edited 14 months ago by khepler (previous) (diff)

comment:21 Changed 14 months ago by khepler

For what it's worth, the pre-processor macros to be checked are defined on lines 80 and 81 of mozjs-52.6.0gnome1/python/mozbuild/mozbuild/configure/constants.py:

 71: # The order of those checks matter
 72: CPU_preprocessor_checks = OrderedDict((
 73:     ('x86', '__i386__ || _M_IX86'),
 74:     ('x86_64', '__x86_64__ || _M_X64'),
 75:     ('arm', '__arm__ || _M_ARM'),
 76:     ('aarch64', '__aarch64__'),
 77:     ('ia64', '__ia64__'),
 78:     ('s390x', '__s390x__'),
 79:     ('s390', '__s390__'),
 80:     ('ppc64', '__powerpc64__'),
 81:     ('ppc', '__powerpc__'),
 82:     ('Alpha', '__alpha__'),
 83:     ('hppa', '__hppa__'),
 84:     ('sparc64', '__sparc__ && __arch64__'),
 85:     ('sparc', '__sparc__'),
 86:     ('mips64', '__mips64'),
 87:     ('mips32', '__mips__'),
 88: ))

Setting the 'ppc64' and 'ppc' values to '__powerpc64__ || __POWERPC64__' and '__powerpc__ || __POWERPC__' allows the configure script to succeed, but the build later fails trying to pass -stdlib=libc++ to g++-mp-6:

...
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/m
ozjs52/work/mozjs-52.6.0gnome1/js/src/obj'
make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/m
ozjs52/work/mozjs-52.6.0gnome1/js/src/obj/mozglue/misc'
mkdir -p '.deps/'
make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/m
ozjs52/work/mozjs-52.6.0gnome1/js/src/obj/memory/mozalloc'
mkdir -p '.deps/'
/opt/local/bin/g++-mp-6 -std=gnu++11 -o StackWalk.o -c  -fvisibility=hidden -fvisibility-inlines-hidden -DNDEBUG=1 -DTRIMMED=1 -DIMPL_MFBT -DMOZ_HA
S_MOZGLUE -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs
-52.6.0gnome1/mozglue/misc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/m
ozjs52/work/mozjs-52.6.0gnome1/js/src/obj/mozglue/misc  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_
tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/dist/include  -I/opt/local/include/nspr        -fPIC  -DMOZILLA_CLIENT -incl
ude /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0g
nome1/js/src/obj/js/src/js-confdefs.h -MD -MP -MF .deps/StackWalk.o.pp -I/opt/local/include -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers
-Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wc++14-compat -Wno-erro
r=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-lifetime-dse -pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -m32 -fno-c
ommon -stdlib=libc++ -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe  -g -O3 -fno-stack-protector -fomit-frame-pointer    /opt/local/var/m
acports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/mozglue/misc/S
tackWalk.cpp
/opt/local/bin/g++-mp-6 -std=gnu++11 -o Unified_cpp_memory_mozalloc0.o -c   -DNDEBUG=1 -DTRIMMED=1 -D_GNU_SOURCE -DIMPL_MFBT -DMOZ_HAS_MOZGLUE -I/o
pt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/
memory/mozalloc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work
/mozjs-52.6.0gnome1/js/src/obj/memory/mozalloc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_
ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/xpcom -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.
org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/memory/build -I/opt/local/var/macports/build/_opt_local_var_macports_source
s_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/dist/include  -I/opt/local/include/nspr
-fPIC  -DMOZILLA_CLIENT -include /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs
52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/js/src/js-confdefs.h -MD -MP -MF .deps/Unified_cpp_memory_mozalloc0.o.pp -I/opt/local/include -Wall -
Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-string
s -Wno-invalid-offsetof -Wc++14-compat -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -fno-lifetime-dse
-pipe -Os -D_GLIBCXX_USE_CXX11_ABI=0 -m32 -fno-common -stdlib=libc++ -fno-rtti -fno-exceptions -fno-math-errno -pthread -pipe  -g -O3 -fno-stack-pr
otector -fomit-frame-pointer    /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs5
2/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/memory/mozalloc/Unified_cpp_memory_mozalloc0.cpp
g++-mp-6: error: unrecognized command line option '-stdlib=libc++'
g++-mp-6: error: unrecognized command line option '-stdlib=libc++'
make[3]: *** [Unified_cpp_memory_mozalloc0.o] Error 1
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mo
zjs52/work/mozjs-52.6.0gnome1/js/src/obj/memory/mozalloc'
make[3]: *** [StackWalk.o] Error 1
make[2]: *** [memory/mozalloc/target] Error 2
make[2]: make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_m
ozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/obj/mozglue/misc'
*** Waiting for unfinished jobs....
make[2]: *** [mozglue/misc/target] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mo
zjs52/work/mozjs-52.6.0gnome1/js/src/obj'
make[1]: *** [compile] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mo
zjs52/work/mozjs-52.6.0gnome1/js/src/obj'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs
52/work/mozjs-52.6.0gnome1/js/src/obj'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/w
ork/mozjs-52.6.0gnome1/js/src/obj" && /usr/bin/make -j2 -w all
Exit code: 2
Error: Failed to build mozjs52: command execution failed
DEBUG: Error code: CHILDSTATUS 99258 2
DEBUG: Backtrace: command execution failed
DEBUG:     while executing
DEBUG: "system {*}$notty {*}$nice $fullcmdstring"
DEBUG:     invoked from within
DEBUG: "command_exec build"
DEBUG:     (procedure "portbuild::build_main" line 8)
DEBUG:     invoked from within
DEBUG: "$procedure $targetname"
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/main.log for
 details.

comment:22 Changed 14 months ago by kencu (Ken)

I have some progress to report on getting this to build on Tiger PPC, but it's not yet working to build through to the end (and nothing is actually tested yet, of course). But if you're motivated and have some skills and interest, this will probably be helpful. I'll upload my WIP to date. The error at the moment comes because code to handle PPC on Darwin is not written for

js/src/wasm/WasmSignalHandlers.cpp

and will need to be added.

Error:

:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_mozjs52/mozjs52/work/mozjs-52.6.0gnome1/js/src/wasm/WasmSignalHandlers.cpp:379:4: error: #error Unsupported architecture
:info:build  #  error Unsupported architecture

Changed 14 months ago by kencu (Ken)

Attachment: patch-mozjs52-portfile.diff added

Changed 14 months ago by kencu (Ken)

Changed 14 months ago by kencu (Ken)

comment:23 in reply to:  22 Changed 14 months ago by ballapete (Peter Dyballa)

I do not have that much time right now.

comment:24 Changed 12 months ago by ballapete (Peter Dyballa)

The memalign problem seems to be well known, because a few patch files for this problem exist: /opt/mports/trunk/dports/devel/jemalloc/files/patch-memalign.diff /opt/mports/trunk/dports/math/fftw-3/files/leopard-no-memalign.patch /opt/mports/trunk/dports/net/libtorrent/files/no_posix_memalign.patch /opt/mports/trunk/dports/net/libtorrent-devel/files/no_posix_memalign.patch. Maybe they contain something useful. (I do not understand the problem.)

comment:25 Changed 12 months ago by dbevans (David B. Evans)

Owner: dbevans deleted

Will leave this to the various powerpc devotees to work out. Seems like @kencu has isolated the problem at least. But I'm afraid a solution is not likely to be forthcoming in the near future unless someone with access to the target hardware is able to put some time into this.

comment:26 Changed 12 months ago by dbevans (David B. Evans)

By the way, newer GNOME ports that use this port are indeed moving to mozjs60. Updating dependents of mozjs52 may be the best solution.

comment:27 in reply to:  25 Changed 12 months ago by ballapete (Peter Dyballa)

Replying to dbevans:

Times has come! (Who said this?) The weather motivates to stay at home instead of exploring the world of creeks for Wikipedia. And my harvest (apple®s and walnaut®s) is almost brought in. So I can perform a lot of tests. On PPC hardware (7447A) in Leopard (Mac OS X 10.5.8) and Tiger (Mac OS X 10.4.11).

Note: See TracTickets for help on using tickets.