[MacPorts] #18755: PPC problem on gmp 4.2.4_2

MacPorts noreply at macports.org
Thu Sep 10 10:53:27 PDT 2009


#18755: PPC problem on gmp 4.2.4_2
---------------------------------------+------------------------------------
  Reporter:  garribald@…               |       Owner:  mcalhoun@…           
      Type:  defect                    |      Status:  closed               
  Priority:  Normal                    |   Milestone:                       
 Component:  ports                     |     Version:  1.7.0                
Resolution:  fixed                     |    Keywords:  ppc                  
      Port:  gmp                       |  
---------------------------------------+------------------------------------

Comment(by aalorbe@…):

 Note that this bug keeps coreutils from building on PowerPC macs.

 Not knowing anything about how MacPorts builds things, here is a really
 nasty hack I used to get through this bug so I could install coreutils:

 Build gmp via [[BR]]
 `port install gmp` [[BR]]
 and wait for it to fail.

 Then [[BR]]
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/work/gmp-4.3.1[[BR]]
 In all files with the regular expression [[BR]]
 "-arch ppc$" [[BR]]
 (note, the "$" is used to indicate the end of the line) [[BR]]
 replace all occurrences of "-arch ppc$" with [[BR]]
 "-arch ppc -force_cpusubtype_ALL" [[BR]]
 then do a
 `make -j1 all`
 then rerun[[BR]]
 `port install gmp` [[BR]]

 Here is a list of the files I modified:
 {{{
 tests/rand/Makefile
 tests/mpz/Makefile
 tests/mpq/Makefile
 tests/mpn/Makefile
 tests/mpf/Makefile
 tests/mpbsd/Makefile
 tests/misc/Makefile
 tests/devel/Makefile
 tests/cxx/Makefile
 demos/expr/Makefile
 demos/calc/Makefile
 tune/Makefile
 tests/Makefile
 scanf/Makefile
 printf/Makefile
 mpz/Makefile
 mpq/Makefile
 mpn/Makefile
 mpf/Makefile
 mpbsd/Makefile
 doc/Makefile
 demos/Makefile
 cxx/Makefile
 config.log
 }}}

 The following command lines *should* make the changes for you and run make
 in the directory gmp-4.3.1
 {{{
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/work/gmp-4.3.1
 find . -type f -name \* -exec sed -i -e 's#-arch ppc *$#-arch ppc
 -force_cpusubtype_ALL#' {} \;
 make -j1 all
 }}}
 but I only tested the find/sed line on some test files I created, not the
 real thing.

 You may want to backup the directory first, doing something like
 {{{
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/work
 tar -zcvf /tmp/gmp-4.3.1.tgz gmp-4.3.1

 Then to restore you can do
 cd
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_gmp/work
 rm -fr gmp-4.3.1
 tar -zxvf /tmp/gmp-4.3.1.tgz
 }}}
 Again, the above was not tested but *should* work.

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


More information about the macports-tickets mailing list