-
Notifications
You must be signed in to change notification settings - Fork 309
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
Build fails on PowerPC (ppc32) almost immediately on encoded_s2shape_index.cc #315
Comments
This is a gcc bug, right? Does it work with gcc 13 or clang? Also try Pick a small target and start commenting parts out until you have a minimal example. Then you can file a gcc bug report. |
@jmr I will try. Clang is not an option, it is broken for Darwin ppc (never worked), but I can try an array of GCC versions. At the moment I suspect it is rather either some wrong assumptions made implicitly which are wrong for the given arch, or wrong assembler insns creeping in from |
Is the CMake-generated Makefile suppressing some output? Do you see more if you just run the gcc command yourself? |
GCC on its own literally gives zero output – as if command completes, but nothing is generated. Tried also gcc11, same result. I can get a pre-processed source though, if that is helpful (with |
gcc should either produce the Here's what I would suggest:
|
@jmr Oh well, I should have tried running it on PPC natively. I got meaningful output there:
So to begin with, wrong assumption about size of bool – this is where is fails. |
@jmr UPD. Ah, this is my mistake with |
What version of s2geometry are you using? This code was deleted last year. Try https://github.com/google/s2geometry/blob/master/src/s2/util/bits/bits.h It looks like it's been a while since 0.10.0, so I should do another release soon. Anyway, that's just a warning.
I thought you were compiling with |
@jmr I am building now the version which is used with I can do a standalone build later on. After all, why not add P. S. Overflow warning are gone, that builtin was an unintended result of my own patch. I dropped it now and rebuilding. So far looks good, though it takes forever to build. |
For |
@jmr A quick update – the build just completed, linking failed, because |
It definitely is risky. If you call any other code with a bool argument that's compiled without the option, it won't work.
Try wrapping all the functions with the static assert in |
You were cross-compiling before? Please report this (no output, no useful error) upstream as a bug. It certainly wasted a bit of everyone's time. |
Not cross-, but in Rosetta (so OS emulates the arch, binaries run natively). But super-weird how it behaved there. I test numerous ports in Rosetta (because no G5 laptop, I cannot carry a PowerMac around, heh), GCC is normally sane there. |
Yes, I already did that. Perhaps we can add a fix to the master? Correct macro with be:
Or 4-byte bool is a specificity of Darwin 32-bit ABI, not PowerPC as such. So we do not need to disable it for Linux, for example. |
@jmr Ran the tests (it is still an older version from R package), result are decent:
Perhaps precision threshold are too strict somewhere. |
I don't know anything about the R package, so I can't help you there. Does the s2geometry test suite pass? |
Let try building it. (By the way, looking now at my portfile for |
@jmr Could you advise me how to fix this?
|
Change |
@jmr Thank you. UPD. |
P. S. Only lines with square root? There are 3–4 instances. I need to make a correct patch for this. |
Wherever you're getting an error. You may be able to look at what the Debian patches did. |
@jmr Almost built, but failing on this:
|
What version of abseil-cpp are you using and what's in your |
Apparently recent: https://github.com/macports/macports-ports/blob/a2b420da3964faa396c1803290ade38b88b67a99/devel/abseil/Portfile#L12 This should be it: https://github.com/abseil/abseil-cpp/blob/c2435f8342c2d0ed8101cb43adfd605fdc52dca2/absl/hash/hash.h |
Can you link the output of |
Sorry, do you mean just like this? It wants inputs:
|
Sorry, I meant find the full |
@jmr It seemed that |
Try deleting the s2geometry/src/s2/value_lexicon.h Lines 32 to 37 in 7773d51
|
This looks like it was added by include-what-you-use and may be causing a Darwin PPC compilation error. google#315 (comment)
@jmr So the build with test is fine now. Running tests still needs to be fixed on my end, since dylibs are not picked by tests’ binaries. Setting DYLD_LIBRARY_PATH path worked for s2 lib, but Gmock is a bit of a mess. Will return to this in a day. (We need either to fix tests with Macports Gtest/Gmock, or otherwise make it build its own version just to run tests, which won’t be a great choice, admittedly.) |
It looks like this is fixed and the current PPC32 failures are tracked in in #316, so closing. |
Unfortunately, there is no meaningful error output, it just fails:
Here I use external
abseil
, but same story when I tried to buildR-s2
(with bundledabseil
), build immediately fails when begins compilings2
: r-spatial/s2#235Something is very wrong in some basic settings or assumptions. It should not fail this way, even if Big endian is not propertly supported down the road.
@jmr Any thoughts what may be failing?
P. S.
-mone-byte-bool
is passed to bypass broken static asserts inendian.h
– they assume 1 byte bool, yet on Darwin ppc32 bool is 4 bytes.The text was updated successfully, but these errors were encountered: