Opened 2 years ago

Closed 21 months ago

#65241 closed defect (fixed)

muniversal 1.1 error: gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags

Reported by: barracuda156 Owned by: barracuda156
Priority: Normal Milestone:
Component: base Version: 2.7.2
Keywords: leopard, muniversal Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: openjpeg

Description

Building openjpeg on Leopard as +universal with muniversal 1.0 works fine, but with muniversal 1.1 fails with:

:info:build [  5%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/thread.c.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 && /usr/bin/gcc-4.2 -DMUTEX_pthread -Dopenjp2_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 -pipe -Os -arch ppc -DNDEBUG -arch ppc -arch ppc64 -mmacosx-version-min=10.5 -fPIC -ffast-math -Wall -Wextra -Wconversion -Wunused-parameter -Wdeclaration-after-statement -Werror=declaration-after-statement -MD -MT src/lib/openjp2/CMakeFiles/openjp2.dir/bio.c.o -MF CMakeFiles/openjp2.dir/bio.c.o.d -o CMakeFiles/openjp2.dir/bio.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/openjpeg-2.5.0-ppc/src/lib/openjp2/bio.c
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 && /usr/bin/gcc-4.2 -DMUTEX_pthread -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 -pipe -Os -arch ppc -DNDEBUG -arch ppc -arch ppc64 -mmacosx-version-min=10.5 -MD -MT src/lib/openjp2/CMakeFiles/openjp2_static.dir/thread.c.o -MF CMakeFiles/openjp2_static.dir/thread.c.o.d -o CMakeFiles/openjp2_static.dir/thread.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/openjpeg-2.5.0-ppc/src/lib/openjp2/thread.c
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 && /usr/bin/gcc-4.2 -DMUTEX_pthread -Dopenjp2_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 -pipe -Os -arch ppc -DNDEBUG -arch ppc -arch ppc64 -mmacosx-version-min=10.5 -fPIC -ffast-math -Wall -Wextra -Wconversion -Wunused-parameter -Wdeclaration-after-statement -Werror=declaration-after-statement -MD -MT src/lib/openjp2/CMakeFiles/openjp2.dir/thread.c.o -MF CMakeFiles/openjp2.dir/thread.c.o.d -o CMakeFiles/openjp2.dir/thread.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/openjpeg-2.5.0-ppc/src/lib/openjp2/thread.c
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 && /usr/bin/gcc-4.2 -DMUTEX_pthread -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 -pipe -Os -arch ppc -DNDEBUG -arch ppc -arch ppc64 -mmacosx-version-min=10.5 -MD -MT src/lib/openjp2/CMakeFiles/openjp2_static.dir/bio.c.o -MF CMakeFiles/openjp2_static.dir/bio.c.o.d -o CMakeFiles/openjp2_static.dir/bio.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/openjpeg-2.5.0-ppc/src/lib/openjp2/bio.c
:info:build gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
:info:build gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
:info:build gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
:info:build make[2]: *** [src/lib/openjp2/CMakeFiles/openjp2.dir/thread.c.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build gcc-4.2: -E, -S, -save-temps and -M options are not allowed with multiple -arch flags
:info:build make[2]: *** [src/lib/openjp2/CMakeFiles/openjp2_static.dir/bio.c.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build make[2]: *** [src/lib/openjp2/CMakeFiles/openjp2_static.dir/thread.c.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc'
:info:build make[2]: *** [src/lib/openjp2/CMakeFiles/openjp2.dir/bio.c.o] Error 1
:info:build make[1]: *** [src/lib/openjp2/CMakeFiles/openjp2_static.dir/all] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc'
:info:build make[1]: *** Waiting for unfinished jobs....
:info:build make[1]: *** [src/lib/openjp2/CMakeFiles/openjp2.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc'
: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_graphics_openjpeg/openjpeg/work/build-ppc'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc" && /usr/bin/make -j4 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build openjpeg: command execution failed
:debug:build Error code: CHILDSTATUS 6403 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_orig" line 8)
:debug:build     invoked from within
:debug:build "portbuild::build_main_orig"
:debug:build     (procedure "portbuild::build_main" line 32)
:debug:build     invoked from within
:debug:build "$procedure $targetname"

Attachments (1)

main.log (80.5 KB) - added by barracuda156 2 years ago.

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by barracuda156

Attachment: main.log added

comment:1 Changed 2 years ago by barracuda156

Then, running the build with muniversal 1.1 and gcc11 shows that PG applies -arch ppc and -arch ppc64 together, which obviously fails (only Apple gcc allowed these together). Example:

[ 36%] Building C object src/lib/openjp2/CMakeFiles/openjp2.dir/openjpeg.c.o
cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 && /opt/local/bin/gcc-mp-11 -DMUTEX_pthread -Dopenjp2_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/build-ppc/src/lib/openjp2 -pipe -Os -arch ppc -DNDEBUG -arch ppc -arch ppc64 -mmacosx-version-min=10.5 -fPIC -ffast-math -Wall -Wextra -Wconversion -Wunused-parameter -Wdeclaration-after-statement -Werror=declaration-after-statement -MD -MT src/lib/openjp2/CMakeFiles/openjp2.dir/openjpeg.c.o -MF CMakeFiles/openjp2.dir/openjpeg.c.o.d -o CMakeFiles/openjp2.dir/openjpeg.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_graphics_openjpeg/openjpeg/work/openjpeg-2.5.0-ppc/src/lib/openjp2/openjpeg.c
gcc-mp-11: warning: ppc64 conflicts with ppc (arch flags ignored)

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

Cc: MarcusCalhoun-Lopez added
Port: openjpeg added

comment:3 Changed 21 months ago by barracuda156

Owner: set to barracuda156
Resolution: fixed
Status: newclosed

In 7f06e205f407010ef234535a28af4ba34ad4ff64/macports-ports (master):

openjpeg: fix universal for PPC
Fixes: #65241

Note: See TracTickets for help on using tickets.