-
Notifications
You must be signed in to change notification settings - Fork 262
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
[PowerPC] SuiteSparse_CHOLMOD 7.4.0 build failure: cholmod_dbound.c: error: two or more data types in declaration specifiers
(Libm already defines Real)
#682
Comments
@szhorvat pointed to the problem: https://trac.macports.org/ticket/69025#comment:2 If it is possible to pass |
cholmod_dbound.c: error: two or more data types in declaration specifiers
cholmod_dbound.c: error: two or more data types in declaration specifiers
(Libm already defines Real)
This is the same issue that I pointed out in #634 (comment)
https://opensource.apple.com/source/Libm/Libm-213/ppc.subproj/math.h.auto.html As @barracuda156 says, it seems that defining @barracuda156 Do you know which specific OS X versions / platforms require the fix, to reduce the chance of breaking something on newer OS X? |
It is there from archaic versions (Libm-40.2) through 10.6.8 (Libm-315), which is the last to support PowerPC: https://github.com/apple-oss-distributions/Libm/blob/845f432413a66ea992f4797c66157c9824421719/Source/PowerPC/math.h#L704-L707 This is in 10.5.8 (Libm-292.4): https://github.com/apple-oss-distributions/Libm/blob/d9d7b69507796c31e17089f3aaedde1716a6002b/Source/PowerPC/math.h#L713-L716 So affected platforms, AFAIU, will be every macOS until 10.6.8, but only when built for |
What would the fix look like if it were added to SuiteSparse? I have a single file, SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake, (and identical copies of that file inside GraphBLAS and LAGraph cmake_modules folders). There could be an option added there. What would the test look like? I could add something like this, but it wouldn't simplify your solution in the Portfile
I'm very reluctant to add a hard coded Maybe something like the following could be added to my SuiteSparsePolicy.cmake:
see https://cmake.org/cmake/help/latest/variable/APPLE.html and https://cmake.org/cmake/help/latest/envvar/MACOSX_DEPLOYMENT_TARGET.html What values of Also -- in looking through the macports configuration for SuiteSparse, I found this: CHOLMOD has modules with different licenses. In particular, the MatrixOps, Modify, Supernodal, MATLAB, and GPU modules are GPL-2.0+, not LGPL. See the Doc/License.txt file or you can grep for SPDX, or see: SuiteSparse/CHOLMOD/Include/cholmod.h Lines 8 to 21 in bf98131
Those licenses have been in place ever since CHOLMOD was created in 2005. Can you update the macports Portfile with the correct license? |
@DrTimothyAldenDavis Thank you very much for responding. Of course it is not needed to use the flag unconditionally for all platforms, it will be at best redundant and potentially undesirable or breaking. This is what will be disabled on macOS < 10.7 by If we have no issues here, then the flag is to be used for 10.6 and below. |
Yes, I did look at those extensions and I don't use any of them, so What does the
|
or if you're fine with the fix you have here, then this looks safe to me: |
you can probably also remove the KLU patch, with |
I am not sure if deployment target is being set automatically. I can be set from the user side (or Macports side) though. Perhaps a check for the arch is a better choice here.
Yes, that has been done already. |
OK. I am not sure if this is the right thing to add, but see this commit: 3892732 How is the CMAKE_OSX_ARCHITECTURES set? The variables are empty on my M1 Mac. I suppose you'll need to use cmake -DCMAKE_OSX_ARCHITECTURES="ppc" or something? |
@DrTimothyAldenDavis I'm not sure if using How about doing it by OS X version instead?
OS X 10.6 is Darwin version 10.x. Thus anything less than 11 will be 10.6 and lower. This applies the workaround not only for PPC but for all very old Darwin systems. Based on this information I expect it wouldn't be a problem if the workaround is applied on old Intel platforms in addition to PPC. |
@szhorvat: That sounds reasonable. But shouldn't it be |
Yes, you are absolutely right. I mixed up the two. I'll edit my previous comment to avoid confusion. |
@DrTimothyAldenDavis Having it empty should not create a problem (maybe PowerPC users would need to specify it, but Macports at least will do that), however given consideration for exotic builds, perhaps a suggestion of @szhorvat makes better sense then. |
OK. I just added this: 12202fa SuiteSparse/SuiteSparse_config/cmake_modules/SuiteSparsePolicy.cmake Lines 250 to 261 in 090e0bf
My M1 Mac is Darwin 22.6.0, and if I change the 11 to 23, it adds the |
I opened #690 that limits the scope of the workaround and fixes the name of the preprocessor definition. |
Oops. Well, Darwin's math.h is confusing: |
I think this is fixed now, in both the default dev branch and the development dev2 branch. Can you give it a try in macports? |
A similar workaround was applied for 7.4.0 in macports/macports-ports#22029 and according to @barracuda156 it works. I don't have the possibility to test on PowerPC. I recommend you go ahead with 7.5.0 and don't wait for us. Thanks for the fix! |
Ok. I will close this now but reopen it if it turns out that we still need some more work |
@DrTimothyAldenDavis Thank you! |
more general fix for issue #682
@DrTimothyAldenDavis I don't want to open a new issue for this small question, so I'm asking here, even though it's unrelated. Is SPEX an API-compatible drop-in replacement for SLIP_LU? |
The SPEX package has had a major overhaul in its API, and it will get another revision in an upcoming release, as well, once we revise it for SPEX v3. So unfortunately it's not a simple drop-in replacement. Once we reach SPEX v3, the API should become stable. It's been an iterative process to design this package and its API. |
The text was updated successfully, but these errors were encountered: