-
Notifications
You must be signed in to change notification settings - Fork 43
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
Building TenFourFox PPC on Leopard #498
Comments
I'm still not wild about the |
True enough. Difficult for me to change my 10.5 SDK though as I need that to be as stock as possible for building other software, MacPorts, etc. I could try to backport the gcc7 10.5 SDK fix into gcc48 through gcc6. That might be possible. If not that, I wonder if we might get away with one single #define in one common header. Perhaps something like this might work?
|
If not that, I wonder if we might get away with one single #define in one common header. Perhaps something like this might work?
```
--TEST-FOR-10.5-&&-GCC-LESS-THAN-7
#define std::log2(x) log2(x)
--END-TEST
I'd be willing to accept that in the right place (i.e., under our control, and unlikely to be upended by future need to update the library). The problem with OTS is it gets updated a lot since it's a security component, essentially, so I'd rather not add changes I don't need/want to port forward for the core build.
|
I wish I better understood exactly why & how gcc48 builds it correctly against the 10.4 SDK on Tiger, but not against the 10.4 SDK on Leopard. Something is slinking in somehow... Anyway, doesn't much matter I guess. I will work on a "one liner" and see how that can fit into the mix. Thanks for the extra efforts to broaden out the build / appeal / usage of TFF. The fact that this exists at all and the labour involved is not lost on any of us, and there is no intention to make any of your much-appreciated work any harder than it is! |
I know you don't like the patch - this is why it is the still "uncommittable" patchs. |
I'd like to find where this std::log2 difference is coming in between Tiger and Leopard. The libgcc The built-in gcc-48 defines are nearly identical on 10.4 and 10.5. There are minor changes in the following: defined by default on Leopard but not Tiger:
defined on Tiger but not Leopard:
Both builds are using the 10.4u SDK. |
@kencu : When building on Tiger/x86 can you do without the patch: that is, on your up-to-date Tiger system can you reproduce what Cameron has on 10.4/PPC with a slightly older compiler? I hope I can soon get my 10.5/PPC environment working, that could be a cross-test. I suppose it has to do with some "define" enabling different versions in the headers, with different namespaces, bout couldn't make it out yet. |
gcc7+ works (the math issue was fixed there). Looks like it's not too hard to force gcc7 for this part of the build using a Alternately you can force gcc-4.8 to use the std::math functions with some trickery, forcing a define and adding some missing definitions to the mix. It ain't pretty, but it works. See: https://trac.macports.org/ticket/54820 and |
I am going to try backporting the gcc7 fix into gcc6 and then gcc48. |
I have not tried to build TFF on my G5 yet, but I have experienced lots of problems with macports builds on my G5 ( |
I noted the same thing -- there is a patch that appears to fix the branch islands problem in this version of |
@kencu: Thanks for this! |
I did that - and tested it and with gcc48 it compiles now. |
all versions of gcc do not show the std::math deletions on 10.4. They only show up on 10.5 and 10.6. I haven't been able to figure out exactly why that is. |
This is getting pretty dated, but doesn't the problem lie in math.h? Missing C99 math funcs in leopard from the GCC bug:
When I tested they work as normal with C99 so it's only C++11.
In leopard, every Simple-minded approach would be to add a case for c++11 in there, but without modification of system headers, not sure. |
This is what I did macports/macports-ports@7889677. |
Yes, that's pretty much it. The by-case fix works just fine, indeed :) |
@classilla I am trying to build with gcc6 on 10.5.8, and it fails on this:
|
At present, there are two hiccups with building TFF on LeopardPPC, for anyone who is interested in this.
Follow all instructions as outlined to build TFF on PPC Tiger as listed here https://github.com/classilla/tenfourfox/wiki/HowToBuildFPR.
Then you have to fix a small linker issue.
gcc48
from MacPorts is hard-coded to use the linker (and most other bits) installed in ${prefix}/bin (usually that's /opt/local/bin/ld). When building on 10.5 against the 10.4 SDK, the only linker that works (I believe) isld64-97
. So you have installld64-97
from MacPorts. Now it may be possible to code into the mozconfig that you want to use that linker, but that didn't work for me when I tried various ways.What does work is to have MacPorts use it as the default linker by installing
ld64
with this variantld64 +ld64_97
.ld64
is a port that just installs a bunch of symlinks to to the version of ld that you want to use, as specified by the variant you selected. Note thatld64-97
means you need to use the variant+ld64_97
. The dash and underscore are important.After that, you need to compensate for a slight difference in the way the math headers work on Leopard vs. Tiger. The details are here https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79017 and the issue apparently disappears as of
gcc7
but in essence, on earlier gcc versions, a small patch takes care of it.After that, TenFourFox builds through and runs perfectly well on Leopard, and you can run some tests, try things out, etc. That particular TenFourFox will not run on Tiger as Cameron has previously described because the underpinnings are specific to Leopard, but it's easy enough to fix that as he points out in the original build post.
When you're done building TenFourFox, you probably will want to change your default linker back to
ld64-127
by installingld64 +ld64_127
.The text was updated successfully, but these errors were encountered: