-
Notifications
You must be signed in to change notification settings - Fork 333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Older xcode versions, like 3.1.4? #50
Comments
I can't really get any further either. This is what I have so far: Build OSXCross the usual way
Make the SDK GCC "compatible"
Create PowerPC symlinks
Build GCC
... fails with:
I also tried to build gcc-42-5577 on Mac OS X, but unfortunately, Xcode doesn't come with a PowerPC assembler anymore. Maybe I can make clang target PowerPC. |
Just to let you know, I was able to get gcc 5.2.0 (ppc / ppc64) and clang (ppc) working. |
That's awesome! |
It was a lot of work to get PowerPC working, but here we go!
I came across a lot of issues while adding ppc support, including:
So, in conclusion... avoid the 10.4 SDK and do not use clang when targeting ppc64. Please let me know if everything works as expected, thanks! |
This is great, I will test to build binaries. Thanks for your effort. |
I had trouble producing a working binary for gcc. git clone https://github.com/tpoechtrager/osxcross.git |
Not much of an issue, have you actually tried to compile something? ;-) Surviving build_gcc.sh usually already means a working gcc (the cross compiler is already used to compile libgcc, libstdc++, etc.). Simply ignore the output of |
I fixed the
|
Yes, I tried to build rtorrent, but the error I got was actually not related to the compiler. Anyhow, I'm trying to find something that I can compile and test run. Tried wget, rtorrent and curl, they fail for different reasons during the configuration phase. So for now I just tried two simple hello world in C and in C++ iBookG4:~ snigel$ ./cpp.out I've been thinking about trying out macports, but your documentation says that macports does not support 10.5. I am running macports 2.3.4 (latest version) on my 10.5 machine though. It also looks like there is 10.5 content in that release Tried to launch it anyway, Sure, I can hardcode to change it, but perhaps you have more insight on why it's unsupported? |
I was able to build wget and curl. Edit: Added missing
There are no pre-built packages for 10.5 (anymore?). |
Oh, I never use prebuilt packages with macports anyway. That's why I thought I made a great case for osxcross. Get all required sources, build them on a fast machine and transfer the binaries to my slower ppc machine. I will try the above script for test compiles, allthough, I can only test for ppc32. |
I went to /home/tmp/ppc-test and then
I tried redownloading openssl several times from the official homepage with the same result. This built fine, so let's change arch to something I can test: This also built fine, but I saw something scroll by that didn't look right:
During the build I could also see my terminal doing a visual bell, so I guess something is being outputted that shouldn't be. Also, this is weird, why aren't all the binaries in my 32bit build?
Regardless I copied the powerpc-gcc directory to the ppc machine.
|
Looks like OpenSSL and wget failed to build. Use
What's triggering that output?
Either link statically or adjust
|
I tried rerunning the script with set -ex
The error itself looks quite straight forward, we're out of memory range. But why, I don't think it's curl. So maybe something is still producing 64bit code somewhere. If I comment out "make install" for openssl, the script stops at wget instead:
So indeed it looks like both wget and curl are failing on make install. |
Need the whole output to see what's going on.
Edit: Never mind... I am getting the same error too with gcc; clang seems to work. I will try to add "Apple GCC" support once I am done with porting the new cctools/ld64. Edit 2: "Apple GCC" seems to work too. However, it will take a while until I will have a build script ready. |
Is this as it should be? Both powerpc-apple-darwin9-gcc and powerpc64-apple-darwin9-gcc points to the same wrapper, with 64 in its name.
On the other hand, I see no "powerpc-apple-darwin9-wrapper" existing in my file tree. |
Yes. My wrapper passes some flags "under the hood" to the compiler.
There's something wrong with gcc, not with the wrapper. |
You can now build an Apple GCC via: Edit: It's
I successfully built LLVM/Clang 3.4, OpenSSL, wget and curl with it. Please do the same and let me know whether the resulting binaries work. LLVM/Clang 3.4 configure flags:
Or try my binaries: http://51.254.123.149/thomas/llvm-clang-3.4-ppc32.tar.xz |
Hi, I downloaded your binaries to my ppc machine. Anyhow, I can launch some of the applications inside. Should I test something specific? |
I don't know if you can be bothered with supporting 10.4 for ppc but your issue may be that the 10.4u SDK needs apple gcc 4.0. My Snow Leopard machine has 4.0.1 build 5494. |
No, that's enough. Thanks! I left curl, wget and OpenSSL out because they are easy enough to build. I will finish PowerPC support at a later time point, most things should work already though. I think the problem is caused by ld64, not by the compiler. |
I have this But trying to build anything against 10.4u SDK with gcc 4.2 fails quite badly on this machine. |
@tpoechtrager
Apparently host-cygwin.c and co are missing from this version of GCC. |
@BSzili: Is https://github.com/gcc-mirror/gcc/blob/gcc-4_2-branch/gcc/config/i386/host-cygwin.c of any help? Copy the file(s) into |
Thanks for the tip! Copying just that one file wasn't enough, but copying the rest of the cygwin-related ones solved the problem:
Now I'm stuck again at a different place, because it can't link libgcc: |
rm -rf target and re-run build.sh. I think you built the linker from On Thu, Jan 28, 2016 at 12:25 PM, Szilárd Biró [email protected]
|
I did a full rebuild, but something is still not right about the linker, because it does'nt seem to produce working executables:
|
Did you set |
No, I definitely didn't set MACOSX_DEPLOYMENT_TARGET. I ran these commands:
|
Please post |
Here it is: |
Hmm... what's the output of:
? |
I only get an error:
Removing the angled brackets, it get an error about testfile.c not existing. Isn't this file supposed to be generated by the configure script during the tests? |
Would it be much of a hassle to set up a Linux VM for OSXCross? Cygwin is freaking slow and thus very annoying to debug. All I get when I am trying to build the Apple GCC is:
|
I could, but that would kind of defeat the purpose of being able to compile all of my executables from the same environment. I tried compiling that simple test file, and I got and object without a hitch. I'll try to look more into why the libiberty configure script fails. |
Hi, just wanted to say, although the ppc branch is a bit old and a bit of a mess, I was able to use it to build a current cross-compiler for PPC and PPC64 using GCC 12.2.0, which I completely failed to do on my own for an entire day. I did end up just disabling C++ because it was giving me a problem and I don't need it, so perhaps someone might be willing to revive it if they do need it. Your posts above (#50 (comment)) was really useful. I had duplicated a lot of work and was stumped with the I also have to admit, I looked at this repo while first attempting this, but I moved on quickly because I didn't see any PPC support, and didn't investigate further to find out it was in a branch! I am getting a Thanks so much! |
I have submitted a PR #390 to the ppc-test branch that I used to get OS X Cross + SDK-10.5 + mainline GCC-5.5.0 to target PowerPC and PowerPC64 . I also provided detailed documentation on how I got it all built and scripts to test building some non-trivial projects Like OpenSSL, WGet, CURL and some C++11 and C++14 programs using the toolchain. |
Hello,
I want to crosscompile for PPC, which means 10.5 / Leopard.
Firstly I couldn't install libxml2-devel, but that was a simple fix, the name in Ubuntu is libxml2-dev.
I'm using "method 3" since method 1 and 2 only supports 4.3 or later.
The second problem was to package the SDK (xcode314_2809_developerdvd.dmg)
The error message comes from the script mount_xcode_image.sh, not from dmg2img
https://github.com/tpoechtrager/osxcross/blob/master/tools/mount_xcode_image.sh
Running dmg2img on its own yields the following, which looks sane to me:
I guess the script should have picked partition 5, so I hardcoded the script to use partition 5 and continued.
Okay, that stepped went through, let's continue.
I ran into troubles trying to unmount, couldn't with or without sudo.
File is still there:
Let's ignore the unmount and try to build.
Let's look in tarballs
Okay, the unpacked pkg files are not there, let's move them.
Let's build again.
Let's try again
Time to compile gcc 4.2.1 (which is what Leopard/10.5 uses).
Okay, let's install libtool and retry.
Ouch, a rerun causes it to restart from the beginning.
Perhaps I'm using the wrong libtool.
Homebrew/legacy-homebrew#28442
Let's look if I have another libtool
Okay, how well does these handle "-dynamic" then?
and
This one clearly states dynamic. Good.
Let's remove the libtool I installed and add this to my path.
Another recompile
And now I'm stuck.
The text was updated successfully, but these errors were encountered: