Opened 15 months ago

Last modified 15 months ago

#66745 assigned defect

smlnj uses clang and inconsistent flags in Rosetta, fails to build

Reported by: barracuda156 Owned by: tobypeterson
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: powerpc, leopard, snowleopard Cc:
Port: smlnj

Description

/usr/bin/clang -m64 -std=c99 -c -g -O2 -D_DARWIN_C_SOURCE -Os -arch ppc -DARCH_AMD64 -DSIZE_64 -DOPSYS_UNIX -DOPSYS_DARWIN -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs -I../include ../kernel/error.c
clang: warning: not using the clang compiler for the 'powerpc' architecture
/usr/bin/clang -m64 -std=c99 -c -g -O2 -D_DARWIN_C_SOURCE -Os -arch ppc -DARCH_AMD64 -DSIZE_64 -DOPSYS_UNIX -DOPSYS_DARWIN -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs -I../include ../kernel/timers.c
clang: warning: not using the clang compiler for the 'powerpc' architecture
/usr/bin/clang -m64 -std=c99 -c -g -O2 -D_DARWIN_C_SOURCE -Os -arch ppc -DARCH_AMD64 -DSIZE_64 -DOPSYS_UNIX -DOPSYS_DARWIN -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs -I../include ../kernel/unix-timers.c
clang: warning: not using the clang compiler for the 'powerpc' architecture
/usr/bin/clang -m64 -std=c99 -c -g -O2 -D_DARWIN_C_SOURCE -Os -arch ppc -DARCH_AMD64 -DSIZE_64 -DOPSYS_UNIX -DOPSYS_DARWIN -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs -I../include ../kernel/qualify-name.c
clang: warning: not using the clang compiler for the 'powerpc' architecture
/usr/bin/clang -m64 -std=c99 -c -g -O2 -D_DARWIN_C_SOURCE -Os -arch ppc -DARCH_AMD64 -DSIZE_64 -DOPSYS_UNIX -DOPSYS_DARWIN -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs -I../include ../kernel/swap-bytes.c
clang: warning: not using the clang compiler for the 'powerpc' architecture
/usr/bin/clang -m64 -std=c99 -c -g -O2 -D_DARWIN_C_SOURCE -Os -arch ppc -DARCH_AMD64 -DSIZE_64 -DOPSYS_UNIX -DOPSYS_DARWIN -DGNU_ASSEMBLER -DDLOPEN -DINDIRECT_CFUNC -I../objs -I../include ../mach-dep/unix-fault.c
clang: warning: not using the clang compiler for the 'powerpc' architecture
../mach-dep/unix-fault.c: In function ‘FaultHandler’:
../mach-dep/unix-fault.c:75: error: ‘struct __darwin_ppc_thread_state’ has no member named ‘__rip’
../mach-dep/unix-fault.c:88: warning: cast to pointer from integer of different size
../mach-dep/unix-fault.c:102: error: ‘struct __darwin_ppc_thread_state’ has no member named ‘__rip’
../mach-dep/unix-fault.c:102: warning: cast from pointer to integer of different size
make[1]: *** [unix-fault.o] Error 1
make: *** [all] Error 2
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_smlnj/smlnj/work/smlnj-110.99.3/config/install.sh: !!! Run-time system build failed for some reason.
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_smlnj/smlnj/work/smlnj-110.99.3" && /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_lang_smlnj/smlnj/work/smlnj-110.99.3/config/install.sh 
Exit code: 1

Attachments (1)

smlnj_log.txt (58.4 KB) - added by barracuda156 15 months ago.

Download all attachments as: .zip

Change History (4)

Changed 15 months ago by barracuda156

Attachment: smlnj_log.txt added

comment:1 Changed 15 months ago by kencu (Ken)

why is this port selecting "clang" to use here, when building for PPC?

(If it is a base compiler selection issue, it would be very nice if we could stop that from happening centrally, rather than continue to add hundreds of workarounds for this issue in individual Portfiles that will all need to be stripped out again if we get this fixed.)

Last edited 15 months ago by kencu (Ken) (previous) (diff)

comment:2 Changed 15 months ago by kencu (Ken)

this particular port seems to need some love anyway, as it is putting "-m64" and "-arch ppc" and "-DARCH_AMD64" on the same build line...

comment:3 Changed 15 months ago by tobypeterson

Yeah, this port has major issues right now. I can't even build it properly on Apple silicon. Could be related to the wonky flags.

Note: See TracTickets for help on using tickets.