User Tools

Site Tools


compilingonmac

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
compilingonmac [2012/01/07 22:47] – [Installing Macports] glaubitzcompilingonmac [2012/05/16 00:53] – [Installing extra packages in Macports] glaubitz
Line 41: Line 41:
  
 <code> <code>
-sudo port install glib2 libmad git-core sox libgcrypt taglib libid3tag libusb-devel+sudo port install glib2 libmad git-core sox libgcrypt taglib libid3tag libusb
 </code> </code>
  
Line 54: Line 54:
 </code> </code>
  
-**NOTE:** //qt4-mac// is a very large package and takes hours to compile. Be prepared to have your computer compile for at least 12~24 hours. Not recommended on machines below 1 GHz. Please consider installing the pre-compiled Qt 4.6.4 binaries in this case (see above).+**NOTE:** //qt4-mac// is a very large package and takes hours to compile. Be prepared to have your computer compile for at least 12~24 hours. Not recommended on machines below 1 GHz. Please consider installing the pre-compiled Qt 4.6.4 binaries in this case (see above). Alternatively, you can cross-compile for PPC on an i386 host (see below).
 ===== Getting the code ===== ===== Getting the code =====
  
Line 144: Line 144:
 to the project files. to the project files.
  
 +===== Cross-compiling for PPC on i386 (on MacOS 10.5) =====
 +
 +It is possible to cross-compile Macports and the MiniDisc software for PPC on an i386 host. This is very convenient as it dramatically speeds up building the software for PPC since the fastest PPC Macs are much slower than current Intel machines.
 +
 +First, install XCode and Macports as described above, but do not install Qt as it will be installed through Macports.
 +
 +After installing Macports, edit the //macports.conf// (in /opt/local/etc/macports) configuration file to set the build rchitecture to PPC:
 +
 +<code>
 +build_arch                      ppc
 +</code>
 +
 +Then, edit the portfile for libffi to fix a problem with cross-compilation. Type "port edit libffi" and add:
 +
 +<code>
 +configure.args --build=powerpc-apple-darwin9.8.0 --with-gcc-arch=ppc
 +</code>
 +
 +Other ports to be patched: //libmad//, //orc//.
 +
 +For //orc//, comment the first line shown here out (prepend the hash sign) and add the second one:
 +
 +<code>
 +#configure.optflags-append -Xarch_i386 -O1
 +configure.args --build=powerpc-apple-darwin9.8.0
 +</code>
 +
 +For //libmad// and //fftw-3//, just add:
 +
 +<code>
 +configure.args --build=powerpc-apple-darwin9.8.0
 +</code>
 +
 +For //fftw-3//, comment out all lines containing references to "sse2".
 +
 +Finally, for //xorg-libXrandr//, add:
 +
 +<code>
 +configure.ldflags -Wl,-headerpad_max_install_names
 +</code>
 +
 +Now, install the dependencies as usual, but include //qt4-mac//:
 +
 +<code>
 +sudo port install glib2 libmad git-core sox libgcrypt taglib libid3tag libusb-devel qt4-mac
 +</code>
 +
 +Finally, edit the qmake project file of linux-minidisc, //md.pro// by adding the following two lines:
 +
 +<code>
 +CONFIG += ppc
 +CONFIG -= i386
 +</code>
 +
 +Then, build as described above.
 ===== Important Notes ===== ===== Important Notes =====
  
compilingonmac.txt · Last modified: 2017/10/01 09:04 by thp

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki