Opened 3 years ago

Last modified 2 years ago

#64542 new defect

groff fails to build for ppc on 10.6.8 (Rosetta): Invalid mnemonic 'fnstcw', 'fldcw' (upd: fix found)

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: powerpc, snowleopard, rosetta Cc:
Port: groff

Description

:info:build depbase=`echo lib/xsize.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
:info:build 	/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I./src/include  -I./src/include -I./lib -I./src/include -I./lib -I/opt/local/include  -pipe -Os -arch ppc -MT lib/xsize.o -MD -MP -MF $depbase.Tpo -c -o lib/xsize.o lib/xsize.c &&\
:info:build 	mv -f $depbase.Tpo $depbase.Po
:info:build {standard input}:18:Invalid mnemonic 'fnstcw'
:info:build {standard input}:24:Invalid mnemonic 'fldcw'
:info:build {standard input}:236:Invalid mnemonic 'fldcw'
:info:build make[1]: *** [lib/printf-frexpl.o] Error 1
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_groff/groff/work/groff-1.22.4'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_groff/groff/work/groff-1.22.4'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_groff/groff/work/groff-1.22.4" && /usr/bin/make -j4 -w all 
:info:build Exit code: 2
:error:build Failed to build groff: command execution failed
:debug:build Error code: CHILDSTATUS 70219 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_sysutils_groff/groff/main.log for details.

Attachments (1)

main.log (308.4 KB) - added by barracuda156 3 years ago.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by barracuda156

Attachment: main.log added

comment:1 Changed 3 years ago by barracuda156

Installed after adding this to port file:

configure.args-append       CC_FOR_BUILD="gcc-4.2 -arch ppc" \
                            CFLAGS_FOR_BUILD="-arch ppc" \
                            --build=powerpc-apple-darwin10 \
                            --with-ld=/usr/bin/ld \
                            --with-as=/usr/bin/as
Sergey-Fedorovs-Mac-mini:~ svacchanda$ port -v installed groff
The following ports are currently installed:
  groff @1.22.4_6 (active) requested_variants='' platform='darwin 10' archs='ppc' date='2022-01-27T20:14:18+0800'

comment:2 Changed 3 years ago by barracuda156

Summary: groff fails to build for ppc on 10.6.8 (Rosetta): Invalid mnemonic 'fnstcw', 'fldcw'groff fails to build for ppc on 10.6.8 (Rosetta): Invalid mnemonic 'fnstcw', 'fldcw' (upd: fix found)

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

The fix you proposed is obviously unacceptable for inclusion in MacPorts due to the gcc / PowerPC / Mac OS X 10.6 specifics you've used. If you want to help us fix this problem for everyone, please submit fixes that will work on all OS versions and processors.

comment:4 in reply to:  3 Changed 3 years ago by barracuda156

Replying to ryandesign:

The fix you proposed is obviously unacceptable for inclusion in MacPorts due to the gcc / PowerPC / Mac OS X 10.6 specifics you've used. If you want to help us fix this problem for everyone, please submit fixes that will work on all OS versions and processors.

I recon it is required only on 10.6.8 when using Rosetta (on 10.5.8 PPC and 10.6 PPC it builds fine as-is).

Like I asked in other ticket, can this be added conditionally?

if {${os.major} == 10 && ${build_arch} eq "ppc"} {
configure.args-append       CC_FOR_BUILD="gcc-4.2 -arch ppc" \
                            CFLAGS_FOR_BUILD="-arch ppc" \
                            --build=powerpc-apple-darwin10 \
                            --with-ld=/usr/bin/ld \
                            --with-as=/usr/bin/as
}

https://trac.macports.org/ticket/64486 (Probably ld and as are redundant, I can test what is the minimal addition that helps, if solution gets accepted in principle.)

Last edited 3 years ago by barracuda156 (previous) (diff)

comment:5 Changed 2 years ago by barracuda156

In fact much less is needed:

# Fix for Rosetta: https://trac.macports.org/ticket/64542
platform darwin 10 {
    if {${build_arch} eq "ppc"} {
        configure.args-append --build=powerpc-apple-darwin${os.major}
    }
}

PR: https://github.com/macports/macports-ports/pull/15587

Note: See TracTickets for help on using tickets.