Opened 2 years ago

Closed 17 months ago

#65736 closed defect (fixed)

ffcall fails on Rosetta

Reported by: barracuda156 Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: powerpc, rosetta, snowleopard Cc: mascguy (Christopher Nielsen), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: ffcall

Description (last modified by barracuda156)

:info:build cd avcall && /usr/bin/make all
:info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4/avcall'
:info:build /usr/bin/gcc-4.2 -std=gnu99 -E `if test true = true; then echo '-DASM_UNDERSCORE'; fi` -I./../common - < ./avcall-i386-macro.S | grep -v '^ *#line' | grep -v '^#' | sed -e 's,% ,%,g' -e 's,\. ,.,g' -e 's,@ ,@,g' -e 's,//.*$,,' -e 's/##//g' > avcall-i386.s
:info:build /bin/sh ../libtool --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -x none -c avcall-i386.s
:info:build libtool: compile:  /usr/bin/gcc-4.2 -std=gnu99 -x none -c avcall-i386.s  -fno-common -DPIC -o .libs/avcall-i386.o
:info:build avcall-i386.s:8:suffix or operands invalid for `push'
:info:build avcall-i386.s:10:suffix or operands invalid for `push'
:info:build avcall-i386.s:11:suffix or operands invalid for `push'
:info:build avcall-i386.s:72:suffix or operands invalid for `pop'
:info:build avcall-i386.s:74:suffix or operands invalid for `pop'
:info:build make[1]: *** [avcall-i386.lo] Error 1
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4/avcall'
:info:build make: *** [all-subdirs] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4" && /usr/bin/make -j1 -w all 
:info:build Exit code: 2
:error:build Failed to build ffcall: command execution failed
:debug:build Error code: CHILDSTATUS 18665 2

Attachments (1)

ffcall.log (84.1 KB) - added by barracuda156 2 years ago.

Download all attachments as: .zip

Change History (12)

Changed 2 years ago by barracuda156

Attachment: ffcall.log added

comment:1 Changed 2 years ago by barracuda156

Description: modified (diff)

comment:2 Changed 2 years ago by barracuda156

Interestingly, with --build=powerpc-apple-darwin it also fails, though differently:

make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4/avcall'
case "darwin10" in \
	  aix*) syntax=aix;; \
	  linux* | netbsd* | openbsd*) syntax=linux;; \
	  macos* | darwin*) syntax=macos;; \
	  *) syntax=sysv4;; \
	esac; \
	case ${syntax} in \
	  macos) \
	    grep -v '\.machine' ./avcall-powerpc-${syntax}.s > avcall-powerpc.s || exit 1 ;; \
	  linux | sysv4) \
	    /usr/bin/gcc-4.2 -std=gnu99 -E `if test true = true; then echo '-DASM_UNDERSCORE'; fi` ./avcall-powerpc-${syntax}-macro.S | grep -v '^ *#line' | grep -v '^#' | sed -e 's,% ,%,g' -e 's,//.*$,,' > avcall-powerpc.s || exit 1 ;; \
	  *) \
	    cp ./avcall-powerpc-${syntax}.s avcall-powerpc.s || exit 1 ;; \
	esac
/bin/sh ../libtool --mode=compile /usr/bin/gcc-4.2 -std=gnu99 -x none -c avcall-powerpc.s
libtool: compile:  /usr/bin/gcc-4.2 -std=gnu99 -x none -c avcall-powerpc.s  -fno-common -DPIC -o .libs/avcall-powerpc.o
avcall-powerpc.s:5:no such instruction: `mflr r0'
avcall-powerpc.s:6:no such instruction: `stmw r29,-12(r1)'
avcall-powerpc.s:7:no such instruction: `stw r0,8(r1)'
avcall-powerpc.s:8:no such instruction: `mr r29,r3'
avcall-powerpc.s:9:no such instruction: `stwu r1,-1104(r1)'
avcall-powerpc.s:10:no such instruction: `li r3,8'
avcall-powerpc.s:11:no such instruction: `lwz r0,20(r29)'
avcall-powerpc.s:12:no such instruction: `mr r30,r1'
avcall-powerpc.s:13:no such instruction: `lwz r9,24(r29)'
avcall-powerpc.s:14:no such instruction: `addi r10,r1,56'
avcall-powerpc.s:15:no such instruction: `subf r0,r9,r0'
avcall-powerpc.s:16:no such instruction: `srawi r11,r0,2'
avcall-powerpc.s:17:too many memory references for `cmp'
avcall-powerpc.s:18:invalid character '-' in mnemonic
avcall-powerpc.s:19:no such instruction: `mr r12,r9'
avcall-powerpc.s:21:no such instruction: `slwi r9,r3,2'
avcall-powerpc.s:22:no such instruction: `addi r3,r3,1'
avcall-powerpc.s:23:too many memory references for `cmp'
avcall-powerpc.s:24:no such instruction: `lwzx r0,r9,r12'
avcall-powerpc.s:25:too many memory references for `add'
avcall-powerpc.s:26:no such instruction: `stw r0,-32(r9)'
avcall-powerpc.s:27:invalid character '+' in mnemonic
avcall-powerpc.s:29:no such instruction: `lwz r9,40(r29)'
avcall-powerpc.s:30:no such instruction: `subf r9,r29,r9'
avcall-powerpc.s:31:no such instruction: `addi r9,r9,-44'
avcall-powerpc.s:32:invalid character '.' in mnemonic
avcall-powerpc.s:33:invalid character '-' in mnemonic
avcall-powerpc.s:34:no such instruction: `cmpwi cr0,r9,1'
avcall-powerpc.s:35:invalid character '-' in mnemonic
avcall-powerpc.s:36:no such instruction: `cmpwi cr0,r9,2'
avcall-powerpc.s:37:invalid character '-' in mnemonic
avcall-powerpc.s:38:no such instruction: `cmpwi cr0,r9,3'
avcall-powerpc.s:39:invalid character '-' in mnemonic
avcall-powerpc.s:40:no such instruction: `cmpwi cr0,r9,4'
avcall-powerpc.s:41:invalid character '-' in mnemonic
avcall-powerpc.s:42:no such instruction: `cmpwi cr0,r9,5'
avcall-powerpc.s:43:invalid character '-' in mnemonic
avcall-powerpc.s:44:no such instruction: `cmpwi cr0,r9,6'
avcall-powerpc.s:45:invalid character '-' in mnemonic
avcall-powerpc.s:46:no such instruction: `cmpwi cr0,r9,7'
avcall-powerpc.s:47:invalid character '-' in mnemonic
avcall-powerpc.s:48:no such instruction: `cmpwi cr0,r9,8'
avcall-powerpc.s:49:invalid character '-' in mnemonic
avcall-powerpc.s:50:no such instruction: `cmpwi cr0,r9,9'
avcall-powerpc.s:51:invalid character '-' in mnemonic
avcall-powerpc.s:52:no such instruction: `cmpwi cr0,r9,10'
avcall-powerpc.s:53:invalid character '-' in mnemonic
avcall-powerpc.s:54:no such instruction: `cmpwi cr0,r9,11'
avcall-powerpc.s:55:invalid character '-' in mnemonic
avcall-powerpc.s:56:no such instruction: `cmpwi cr0,r9,12'
avcall-powerpc.s:57:invalid character '-' in mnemonic
avcall-powerpc.s:59:no such instruction: `lfd f13,140(r29)'
avcall-powerpc.s:61:no such instruction: `lfd f12,132(r29)'
avcall-powerpc.s:63:no such instruction: `lfd f11,124(r29)'
avcall-powerpc.s:65:no such instruction: `lfd f10,116(r29)'
avcall-powerpc.s:67:no such instruction: `lfd f9,108(r29)'
avcall-powerpc.s:69:no such instruction: `lfd f8,100(r29)'
avcall-powerpc.s:71:no such instruction: `lfd f7,92(r29)'
avcall-powerpc.s:73:no such instruction: `lfd f6,84(r29)'
avcall-powerpc.s:75:no such instruction: `lfd f5,76(r29)'
avcall-powerpc.s:77:no such instruction: `lfd f4,68(r29)'
avcall-powerpc.s:79:no such instruction: `lfd f3,60(r29)'
avcall-powerpc.s:81:no such instruction: `lfd f2,52(r29)'
avcall-powerpc.s:83:no such instruction: `lfd f1,44(r29)'
avcall-powerpc.s:85:no such instruction: `lwz r0,4(r29)'
avcall-powerpc.s:86:no such instruction: `lwz r9,24(r12)'
avcall-powerpc.s:87:no such instruction: `lwz r10,28(r12)'
avcall-powerpc.s:88:no such instruction: `mtctr r0'
avcall-powerpc.s:89:no such instruction: `lwz r3,0(r12)'
avcall-powerpc.s:90:no such instruction: `lwz r4,4(r12)'
avcall-powerpc.s:91:no such instruction: `lwz r5,8(r12)'
avcall-powerpc.s:92:no such instruction: `lwz r6,12(r12)'
avcall-powerpc.s:93:no such instruction: `lwz r7,16(r12)'
avcall-powerpc.s:94:no such instruction: `lwz r8,20(r12)'
avcall-powerpc.s:95:no such instruction: `bctrl'
avcall-powerpc.s:96:no such instruction: `lwz r9,12(r29)'
avcall-powerpc.s:97:no such instruction: `cmpwi cr0,r9,1'
avcall-powerpc.s:98:invalid character '-' in mnemonic
avcall-powerpc.s:99:no such instruction: `cmpwi cr0,r9,2'
avcall-powerpc.s:100:invalid character '-' in mnemonic
avcall-powerpc.s:101:no such instruction: `cmpwi cr0,r9,3'
avcall-powerpc.s:102:invalid character '-' in mnemonic
avcall-powerpc.s:103:no such instruction: `cmpwi cr0,r9,4'
avcall-powerpc.s:104:invalid character '-' in mnemonic
avcall-powerpc.s:105:no such instruction: `cmpwi cr0,r9,5'
avcall-powerpc.s:106:invalid character '-' in mnemonic
avcall-powerpc.s:107:no such instruction: `cmpwi cr0,r9,6'
avcall-powerpc.s:108:invalid character '-' in mnemonic
avcall-powerpc.s:109:no such instruction: `cmpwi cr0,r9,7'
avcall-powerpc.s:110:invalid character '-' in mnemonic
avcall-powerpc.s:111:no such instruction: `cmpwi cr0,r9,8'
avcall-powerpc.s:112:invalid character '-' in mnemonic
avcall-powerpc.s:113:no such instruction: `cmpwi cr0,r9,9'
avcall-powerpc.s:114:invalid character '-' in mnemonic
avcall-powerpc.s:115:no such instruction: `cmpwi cr0,r9,10'
avcall-powerpc.s:116:invalid character '-' in mnemonic
avcall-powerpc.s:117:no such instruction: `addi r0,r9,-11'
avcall-powerpc.s:118:no such instruction: `cmplwi cr0,r0,1'
avcall-powerpc.s:119:invalid character '-' in mnemonic
avcall-powerpc.s:120:no such instruction: `cmpwi cr0,r9,13'
avcall-powerpc.s:121:invalid character '-' in mnemonic
avcall-powerpc.s:122:no such instruction: `cmpwi cr0,r9,14'
avcall-powerpc.s:123:invalid character '-' in mnemonic
avcall-powerpc.s:124:no such instruction: `cmpwi cr0,r9,15'
avcall-powerpc.s:125:invalid character '-' in mnemonic
avcall-powerpc.s:126:no such instruction: `cmpwi cr0,r9,16'
avcall-powerpc.s:127:invalid character '-' in mnemonic
avcall-powerpc.s:129:no such instruction: `lwz r1,0(r1)'
avcall-powerpc.s:130:no such instruction: `li r3,0'
avcall-powerpc.s:131:no such instruction: `lwz r0,8(r1)'
avcall-powerpc.s:132:no such instruction: `lmw r29,-12(r1)'
avcall-powerpc.s:133:no such instruction: `mtlr r0'
avcall-powerpc.s:134:no such instruction: `blr'
avcall-powerpc.s:136:no such instruction: `lwz r0,0(r29)'
avcall-powerpc.s:137:invalid character '.' in mnemonic
avcall-powerpc.s:138:invalid character '-' in mnemonic
avcall-powerpc.s:139:no such instruction: `lwz r0,16(r29)'
avcall-powerpc.s:140:no such instruction: `cmpwi cr0,r0,1'
avcall-powerpc.s:141:invalid character '-' in mnemonic
avcall-powerpc.s:142:no such instruction: `cmpwi cr0,r0,2'
avcall-powerpc.s:143:invalid character '-' in mnemonic
avcall-powerpc.s:144:no such instruction: `cmpwi cr0,r0,4'
avcall-powerpc.s:145:invalid character '-' in mnemonic
avcall-powerpc.s:146:no such instruction: `cmpwi cr0,r0,8'
avcall-powerpc.s:147:invalid character '+' in mnemonic
avcall-powerpc.s:149:no such instruction: `lwz r9,8(r29)'
avcall-powerpc.s:150:no such instruction: `stw r4,4(r9)'
avcall-powerpc.s:152:no such instruction: `stw r3,0(r9)'
avcall-powerpc.s:153:no such instruction: `b L49'
avcall-powerpc.s:155:no such instruction: `lwz r9,8(r29)'
avcall-powerpc.s:156:no such instruction: `b L88'
avcall-powerpc.s:158:no such instruction: `lwz r9,8(r29)'
avcall-powerpc.s:159:no such instruction: `sth r3,0(r9)'
avcall-powerpc.s:160:no such instruction: `b L49'
avcall-powerpc.s:162:no such instruction: `lwz r9,8(r29)'
avcall-powerpc.s:163:no such instruction: `stb r3,0(r9)'
avcall-powerpc.s:164:no such instruction: `b L49'
avcall-powerpc.s:166:no such instruction: `lwz r9,8(r29)'
avcall-powerpc.s:167:no such instruction: `stfd f1,0(r9)'
avcall-powerpc.s:168:no such instruction: `b L49'
avcall-powerpc.s:170:no such instruction: `lwz r9,8(r29)'
avcall-powerpc.s:171:no such instruction: `stfs f1,0(r9)'
avcall-powerpc.s:172:no such instruction: `b L49'
avcall-powerpc.s:174:no such instruction: `lwz r12,24(r29)'
avcall-powerpc.s:175:no such instruction: `b L86'
make[1]: *** [avcall-powerpc.lo] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4/avcall'
make: *** [all-subdirs] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_ffcall/ffcall/work/libffcall-2.4" && /usr/bin/make -j1 -w all 
Exit code: 2

comment:3 Changed 2 years ago by barracuda156

Looks like arch flags fail to be added, despite configure setting those.

comment:4 Changed 2 years ago by barracuda156

This worked:

platform darwin 10 powerpc {
    configure.args-append \
                    --build=powerpc-apple-darwin${os.major} \
                    CC="${configure.cc} -arch ${build_arch}"
}
Version 0, edited 2 years ago by barracuda156 (next)

comment:5 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

You have a tendency to propose fixes that are specific to your esoteric scenario of compiling for PowerPC on 10.6 Intel. It seems to me that the problem would also happen on 10.5 or 10.4 Intel but your fix would not cover that case. What do you think? What about the case of compiling for Intel on 10.4 or 10.5 PowerPC — wouldn't that also need a fix? Can you generalize this fix, and the fixes you propose for other ports, to cover all cases?

comment:6 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:7 in reply to:  5 Changed 2 years ago by barracuda156

Replying to ryandesign:

You have a tendency to propose fixes that are specific to your esoteric scenario of compiling for PowerPC on 10.6 Intel. It seems to me that the problem would also happen on 10.5 or 10.4 Intel but your fix would not cover that case. What do you think? What about the case of compiling for Intel on 10.4 or 10.5 PowerPC — wouldn't that also need a fix? Can you generalize this fix, and the fixes you propose for other ports, to cover all cases?

I cannot test it on <10.6 at the moment, but I can try on 10.6 Intel. It seems to me that default archs will build correctly though (in Rosetta case there is a mismatch, causing the error above). At the same time perhaps CC="${configure.cc} [get_canonical_archflags cc]" can be made a general case indeed – could you advise me if this is a correct way, considering general case includes FAT builds as well?

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

the discussion about this is also ongoing in your PR, where generalized fixes were also requested...so perhaps either discuss there, or close the PR and discuss here?

comment:9 in reply to:  8 Changed 2 years ago by barracuda156

Replying to kencu:

the discussion about this is also ongoing in your PR, where generalized fixes were also requested...so perhaps either discuss there, or close the PR and discuss here?

Sure, moving all discussion to the PR.

comment:10 Changed 17 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:11 Changed 17 months ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: set to MarcusCalhoun-Lopez
Resolution: fixed
Status: newclosed

In e42639d7075374d5c9a5b43131cd7e360dae6a6f/macports-ports (master):

ffcall: fix build when cross-compiling

No revbump since port either build correctly or not at all.
Fixes #65736

Note: See TracTickets for help on using tickets.