Opened 7 years ago

Closed 7 years ago

Last modified 21 months ago

#53950 closed defect (fixed)

MoarVM: unrecognized command line option "-Wno-logical-op-parentheses" on 10.5/PPC

Reported by: mojca (Mojca Miklavec) Owned by: mojca (Mojca Miklavec)
Priority: Low Milestone:
Component: ports Version:
Keywords: leopard Cc: coke (Will Coleda)
Port: MoarVM

Description (last modified by mojca (Mojca Miklavec))

Compilation of MoarVM fails on 10.5/PPC (and after fixing #53944 also on 10.6) due to a too old compiler.

See build logs:

make: Entering directory `/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_lang_MoarVM/MoarVM/work/MoarVM-2017.03'
compiling src/main.o
compiling src/core/callsite.o
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"

It's not yet clear whether PPC is even theoretically supported and this has super low priority in case it's fixable at all. I just wanted to mark it somewhere, so that we can take a closer look at some point. In case PPC is not supported, the Portfile should at least say so.

After blacklisting the old apple's gcc in 71e35c11/macports-ports there are new problems when compiling with macports-clang-3.4 as seen in the build log:

/opt/local/include/atomic_ops/sysdeps/gcc/powerpc.h:84:5: error: invalid operand in inline asm: 'lwz${1:U}${1:X} $0,$1
cmpw $0,$0
bne- 1f
1: isync
'
    "lwz%U1%X1 %0,%1\n"
    ^
/opt/local/include/atomic_ops/sysdeps/gcc/powerpc.h:84:5: error: invalid operand in inline asm: 'lwz${1:U}${1:X} $0,$1
cmpw $0,$0
bne- 1f
1: isync
'

Change History (8)

comment:1 Changed 7 years ago by drennanelawar (Daniel Drennan ElAwar)

I have this same error on Snow Leopard. I think it is trying to use /usr/bin/make (3.8.1) and not the version that MacPorts has installed (4.2.1).

Command failed:  cd "/Volumes/DEV0/var/macports/build/_Volumes_DEV0_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_MoarVM/MoarVM/work/MoarVM-2017.03" && /usr/bin/make -j7 -w all

comment:2 Changed 7 years ago by mojca (Mojca Miklavec)

Please try

sudo port build MoarVM configure.compiler=clang

I suspect that gcc on Mac is either too old or at least not properly supported/tested.

This must be new after I fixed #53944. I'll blacklist some compilers.

comment:3 Changed 7 years ago by drennanelawar (Daniel Drennan ElAwar)

That did the trick. Thank you!

comment:4 Changed 7 years ago by mojca (Mojca Miklavec)

In 71e35c1157c3fe055d7772b63f0633114f772f90/macports-ports:

MoarVM: blacklist Apple's GCC

See: #53950

comment:5 Changed 7 years ago by mojca (Mojca Miklavec)

Description: modified (diff)

comment:6 Changed 7 years ago by mojca (Mojca Miklavec)

In e1c281ddbc16cba264cb5df1a7ea559750cb278f/macports-ports:

MoarVM: blacklist clang on PPC

See: #53950

comment:7 Changed 7 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

I don't know if MoarVM is actually functional on PPC, but it compiled, see:

so I'm closing this as fixed.

comment:8 in reply to:  7 Changed 21 months ago by barracuda156

Replying to mojca:

I don't know if MoarVM is actually functional on PPC, but it compiled, see:

so I'm closing this as fixed.

For some reason, this line leads to Rosetta choosing clang for PPC build, which obviously fails:

Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_MoarVM/MoarVM/work/MoarVM-2022.07" && /opt/local/bin/perl Configure.pl --prefix=/opt/local --cc=/usr/bin/clang --has-dyncall --has-libatomic_ops --has-libtommath --has-libuv --no-mimalloc 
Welcome to MoarVM!

Configuring native build environment ................... 
Binary file /usr/bin/clang matches
Binary file /usr/bin/clang matches

GNU tools detected, despite this not being a GNU-oriented build.
 Please correct this and retry. See README.markdown for more details.

    trying to compile a simple C program ............... YES
    probing stdatomic .................................. NO
did not find libzstd; will not use heap snapshot format version 3
OK

    probing whether your compiler thinks that it is gcc  YES
    probing how your compiler does static inline ....... static __inline__
    probing if your compiler offers thread local storage  it doesn't, so falling back to UV's API
    probing if your pow() handles NaN and Inf corner cases  YES
    probing if your log() returns NaN for negative values  YES
    probing if your log10() returns NaN for negative values  YES
    probing if your asin() returns NaN for negative values  YES
    probing if your acos() returns NaN for negative values  YES
    probing if you have isnan .......................... YES
    probing if you have isinf .......................... YES
    probing if you have signbit ........................ YES
    your CPU can read unaligned values for all of int32 int64 num64
    probing the size of pointers ....................... 4
JIT isn't supported on platforms with 4 byte pointers.
    probing C type support for booleans ................ _Bool
    probing computed goto support ...................... YES
    probing pthread_yield support ...................... NO
    probing pthread_setname_np support (optional) ...... NO
    probing existance of optional malloc_trim() ........ NO
    probing support of rdtscp intrinsic ................ NO

        make: /usr/bin/make
     compile: /usr/bin/clang -fno-omit-frame-pointer -fno-optimize-sibling-calls -Werror=vla -O3 -DNDEBUG -Wno-logical-op-parentheses -D_DARWIN_USE_64_BIT_INODE=1  -DWORDS_BIGENDIAN -DMVM_HEAPSNAPSHOT_FORMAT=2 -pipe -Os -I/opt/local/include/libtommath -arch ppc -isystem/opt/local/include/LegacySupport -I/opt/local/include
    includes:  -I/usr/local/include 
        link: /usr/bin/clang  -O3 -DNDEBUG -Wl,-rpath,"/@libdir@" -Wl,-headerpad_max_install_names -L/opt/local/lib -lMacportsLegacySupport -arch ppc
        libs:  -L/usr/local/lib -ldyncall_s -ldyncallback_s -ldynload_s -ltommath -latomic_ops -luv -lpthread

  byte order: big endian

Configuring 3rdparty libs .............................. OK

  3rdparty: 3rdparty/cmp/libcmp.a
            3rdparty/sha1/libsha1.a
            3rdparty/tinymt/libtinymt.a

Generating src/gen/config.c ............................ OK
Generating src/gen/config.h ............................ OK
Generating Makefile .................................... OK
Generating tools/check.mk .............................. OK
Generating build/mk-moar-pc.pl ......................... OK

Configuration SUCCESS.

Type '/usr/bin/make' to build and '/usr/bin/make help' to see a list of
available make targets.
--->  Building MoarVM
Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_MoarVM/MoarVM/work/MoarVM-2022.07" && /usr/bin/make -j6 -w all 
make: Entering directory `/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_MoarVM/MoarVM/work/MoarVM-2022.07'
compiling src/main.o
compiling src/core/callsite.o
clang: warning: not using the clang compiler for the 'powerpc' architecture
compiling src/core/args.o
clang: warning: not using the clang compiler for the 'powerpc' architecture
compiling src/core/exceptions.o
compiling src/core/interp.o
clang: warning: not using the clang compiler for the 'powerpc' architecture
clang: warning: not using the clang compiler for the 'powerpc' architecture
compiling src/core/str_hash_table.o
cc1: error: -Werror=vla: No option -Wvla
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
clang: warning: not using the clang compiler for the 'powerpc' architecture
cc1: error: -Werror=vla: No option -Wvla
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
make: *** [src/main.o] Error 1
make: *** Waiting for unfinished jobs....
clang: warning: not using the clang compiler for the 'powerpc' architecture
make: *** [src/core/callsite.o] Error 1
cc1: error: -Werror=vla: No option -Wvla
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
cc1: error: -Werror=vla: No option -Wvla
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
cc1: error: -Werror=vla: No option -Wvla
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
make: *** [src/core/interp.o] Error 1
make: *** [src/core/exceptions.o] Error 1
make: *** [src/core/args.o] Error 1
cc1: error: -Werror=vla: No option -Wvla
cc1: error: unrecognized command line option "-Wno-logical-op-parentheses"
make: *** [src/core/str_hash_table.o] Error 1
make: Leaving directory `/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_MoarVM/MoarVM/work/MoarVM-2022.07'
Command failed:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_lang_MoarVM/MoarVM/work/MoarVM-2022.07" && /usr/bin/make -j6 -w all 
Exit code: 2
Note: See TracTickets for help on using tickets.