[MacPorts] #34385: gcc47 and gcc48 fail to build on ppc

MacPorts noreply at macports.org
Mon Jun 18 18:38:28 PDT 2012


#34385: gcc47 and gcc48 fail to build on ppc
-------------------------------------+--------------------------------------
  Reporter:  boby.foulcan@…          |       Owner:  jeremyhu@…           
      Type:  defect                  |      Status:  reopened             
  Priority:  Normal                  |   Milestone:                       
 Component:  ports                   |     Version:  2.0.4                
Resolution:                          |    Keywords:  Leopard ppc          
      Port:  gcc42 gcc47 gcc48       |  
-------------------------------------+--------------------------------------
Changes (by darylew@…):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 I said my copy of GCC 4.7 was running fine.  I was wrong.  Before I ran
 `update outdated`, it was running.  Afterwards, I checked GCC 4.7 by
 running `g++-mp-4.7 --version`, which worked.  When I ran it for an actual
 compile, it choked.

 Before I explain that, let me say that my first run of `update outdated`
 ended when it tried to update my copy of GCC 4.6.  I got it work by
 following the suggestion from
 [https://trac.macports.org/ticket/34366#comment:11] to force it to compile
 with Apple's GCC 4.2.  Then I tried to update the remaining outdated
 ports.  It stopped on GCC 4.7 due to the deliberate block added to PowerPC
 systems, although it worked before.

 I thought my pre-update copy of GCC 4.7 should still be there and I can
 use it, but when I tried to actually compile with it, instead of simply
 printing the version number I got:

 {{{
 gcc.compile.c++ bin/cayley_example.test/gcc-4.7/debug/cayley_example.o
 dyld: Library not loaded: /opt/local/lib/libppl.9.dylib
   Referenced from: /opt/local/libexec/gcc/ppc-apple-darwin8/4.7.0/cc1plus
   Reason: image not found
 g++-mp-4.7: internal compiler error: Trace/BPT trap (program cc1plus)
 Please submit a full bug report,
 with preprocessed source if appropriate.
 See <http://gcc.gnu.org/bugs.html> for instructions.

     "g++-mp-4.7"  -ftemplate-depth-128 -std=c++11 -pthread -O0 -fno-inline
 -Wall -g -fPIC    -I"../../.." -I"/Users/daryle/Documents/Projects/working
 /boost-trunk" -c -o
 "bin/cayley_example.test/gcc-4.7/debug/cayley_example.o"
 "../example/cayley_example.cpp"

 ...failed gcc.compile.c++
 bin/cayley_example.test/gcc-4.7/debug/cayley_example.o
 }}}

 (The "gcc.compile.c++" part is from my compiler script.)  I looked up PPL
 and tried to install it directly via MacPorts.  The attempt ended with
 `port` trying to redo the gcc47 instead:

 {{{
 [daryle]$ sudo port install ppl
 Password:
 --->  Computing dependencies for ppl
 --->  Cleaning ppl
 --->  Scanning binaries for linking errors: 100.0%
 --->  Found 14 broken file(s), matching files to ports
 --->  Found 1 broken port(s), determining rebuild order
 --->  Rebuilding in order
      gcc47 @4.7.0
 Error: gcc47 cannot be installed for the configured build_arch 'ppc'
 because it only supports the arch(s) 'i386 x86_64'.
 Error: Unable to upgrade port: 1
 Error rebuilding gcc47
     while executing
 "error "Error rebuilding $portname""
     (procedure "revupgrade_scanandrebuild" line 370)
     invoked from within
 "revupgrade_scanandrebuild broken_port_counts $opts"
     (procedure "macports::revupgrade" line 5)
     invoked from within
 "macports::revupgrade $opts"
     (procedure "action_revupgrade" line 2)
     invoked from within
 "action_revupgrade $action $portlist $opts"
     (procedure "action_target" line 94)
     invoked from within
 "$action_proc $action $portlist [array get global_options]"
     (procedure "process_cmd" line 95)
     invoked from within
 "process_cmd $remaining_args"
     invoked from within
 "if { [llength $remaining_args] > 0 } {

     # If there are remaining arguments, process those as a command
     set exit_status [process_cmd $remaining..."
     (file "/opt/local/bin/port" line 4784)
 [daryle]$
 }}}

 So I tried to apply the workaround I did for GCC 4.6 on GCC 4.7, but
 directly in the Portfile.  I commented out the "supported_archs     i386
 x86_64", which is on line 28.  Then I changed the block starting at line
 106 to:

 {{{
 # http://trac.macports.org/ticket/29104
 #if {${configure.compiler} == "llvm-gcc-4.2"} {
 #    configure.compiler clang
 #}
 configure.compiler apple-gcc-4.2
 }}}

 (This is hard coded; the resolved version should do some sort of if/else
 chain.)  It started to work, but came up with an error:

 {{{
 [daryle]$ sudo port upgrade outdated
 Portfile changed since last build; discarding previous state.
 --->  Computing dependencies for gcc47
 --->  Fetching archive for gcc47
 --->  Attempting to fetch gcc47-4.7.1_0.darwin_8.ppc.tbz2 from
 http://packages.macports.org/gcc47
 --->  Fetching distfiles for gcc47
 --->  Attempting to fetch gcc-4.7.1.tar.bz2 from
 ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.1
 --->  Verifying checksum(s) for gcc47
 --->  Extracting gcc47
 --->  Configuring gcc47
 --->  Building gcc47
 Error: org.macports.build for port gcc47 returned: command execution
 failed
 Please see the log file for port gcc47 for details:
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/gcc47/main.log
 Error: Unable to upgrade port: 1
 To report a bug, follow the instructions in the guide:
     http://guide.macports.org/#project.tickets
 [daryle]$
 }}}

 From the log file, I see:

 {{{
 ...
 :info:build /bin/sh ./libtool --tag=CC   --mode=link
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/gcc47/work/build/./gcc/xgcc
 -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/gcc47/work/build/./gcc/
 -B/opt/local/ppc-apple-darwin8/bin/ -B/opt/local/ppc-apple-darwin8/lib/
 -isystem /opt/local/ppc-apple-darwin8/include -isystem /opt/local/ppc-
 apple-darwin8/sys-include    -Wall -g -fexceptions -g -pipe -O2 -version-
 info `grep -v '^#' ../../../gcc-4.7.1/libffi/libtool-version`    -o
 libffi.la -rpath /opt/local/lib/gcc47 src/debug.lo src/prep_cif.lo
 src/types.lo src/raw_api.lo src/java_raw_api.lo src/closures.lo
 src/powerpc/ffi_darwin.lo src/powerpc/darwin.lo
 src/powerpc/darwin_closure.lo
 :info:build libtool: link:
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/gcc47/work/build/./gcc/xgcc
 -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_gcc47/gcc47/work/build/./gcc/
 -B/opt/local/ppc-apple-darwin8/bin/ -B/opt/local/ppc-apple-darwin8/lib/
 -isystem /opt/local/ppc-apple-darwin8/include -isystem /opt/local/ppc-
 apple-darwin8/sys-include    -dynamiclib -Wl,-undefined -Wl,dynamic_lookup
 -o .libs/libffi.4.dylib  src/.libs/debug.o src/.libs/prep_cif.o
 src/.libs/types.o src/.libs/raw_api.o src/.libs/java_raw_api.o
 src/.libs/closures.o src/powerpc/.libs/ffi_darwin.o
 src/powerpc/.libs/darwin.o src/powerpc/.libs/darwin_closure.o
 -install_name  /opt/local/lib/gcc47/libffi.4.dylib -compatibility_version
 5 -current_version 5.1 -Wl,-single_module
 :info:build ld: in src/powerpc/.libs/darwin.o, unsupported encoding in FDE
 :info:build collect2: error: ld returned 1 exit status
 ...
 }}}

 When I ran a web search for "unsupported encoding in FDE", the results
 mentioned problems with `libffi`, which we have a MacPort of.  The results
 included the page for changeset r74107.  I thought I could change the "10"
 to an "8" (the Darwin number of Tiger), but the Portfile for libffi is
 different now and that section isn't there anymore.  Now what?  (I guess
 those Snow Leopard changes have been merged into the source files?)

 I'll attach my forementioned gcc47 log file.

-- 
Ticket URL: <https://trac.macports.org/ticket/34385#comment:15>
MacPorts <http://www.macports.org/>
Ports system for Mac OS


More information about the macports-tickets mailing list