Skip to content
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

Tag v1.3.0 doesn't compile on macOS #94

Closed
cvanaret opened this issue Nov 16, 2024 · 5 comments
Closed

Tag v1.3.0 doesn't compile on macOS #94

cvanaret opened this issue Nov 16, 2024 · 5 comments
Assignees
Labels
bug Something isn't working CI Continuous Integration release

Comments

@cvanaret
Copy link
Owner

Reason: std::optional::value() is not available on macOS < 10.14

@cvanaret cvanaret added the bug Something isn't working label Nov 16, 2024
@cvanaret cvanaret self-assigned this Nov 16, 2024
@amontoison
Copy link
Contributor

@cvanaret I found how to fix it by installing a SDK of macOS 10.15 but I have this new error now:

[10:13:49] In file included from /workspace/srcdir/Uno/uno/reformulation/ElasticVariables.cpp:4:
[10:13:49] In file included from /workspace/srcdir/Uno/uno/reformulation/ElasticVariables.hpp:7:
[10:13:49] /workspace/srcdir/Uno/uno/linear_algebra/SparseVector.hpp:64:27: error: implicit instantiation of undefined template 'std::vector<unsigned long>'
[10:13:49]    64 |       std::vector<size_t> indices{};
[10:13:49]       |                           ^
[10:13:49] /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/c++/v1/iosfwd:217:28: note: template is declared here
[10:13:49]   217 | class _LIBCPP_TEMPLATE_VIS vector;
[10:13:49]       |                            ^
[10:13:49] In file included from /workspace/srcdir/Uno/uno/reformulation/ElasticVariables.cpp:4:
[10:13:49] In file included from /workspace/srcdir/Uno/uno/reformulation/ElasticVariables.hpp:7:
[10:13:49] /workspace/srcdir/Uno/uno/linear_algebra/SparseVector.hpp:65:32: error: implicit instantiation of undefined template 'std::vector<unsigned long>'
[10:13:49]    65 |       std::vector<ElementType> values{};
[10:13:49]       |                                ^
[10:13:49] /workspace/srcdir/Uno/uno/reformulation/ElasticVariables.hpp:20:28: note: in instantiation of template class 'uno::SparseVector<unsigned long>' requested here
[10:13:49]    20 |       SparseVector<size_t> positive{};
[10:13:49]       |                            ^
[10:13:49] /opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/usr/include/c++/v1/iosfwd:217:28: note: template is declared here
[10:13:49]   217 | class _LIBCPP_TEMPLATE_VIS vector;
[10:13:49]       |                            ^
[10:13:49] 2 errors generated.

@cvanaret
Copy link
Owner Author

Missing include fixed in #98.

@amontoison
Copy link
Contributor

amontoison commented Nov 16, 2024

@cvanaret
I can't debug the new release until monday but a quick solution that you can try is replace rm by mv at this
line:
https://github.com/cvanaret/Uno/blob/main/.github/julia/build_tarballs_release.jl#L101

It will put less presure on the hard drive and you can just rename System into System_old like this.

If it works, we can things like this and I don't to have a look next week 🤞

@cvanaret
Copy link
Owner Author

Same deal, unfortunately...

2024-11-16T23:44:24.2102182Z [23:44:24]  ---> mv /opt/${target}/${target}/sys-root/System /opt/${target}/${target}/sys-root/System_old
2024-11-16T23:44:24.9305679Z [23:44:24] mv: can't remove '/opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/System/Library/Printers/Libraries': I/O error
2024-11-16T23:44:24.9312185Z [23:44:24] mv: can't remove '/opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Tcl.framework/Versions/8.4/Headers/tcl-private': I/O error
2024-11-16T23:44:24.9317349Z [23:44:24] mv: can't remove '/opt/x86_64-apple-darwin14/x86_64-apple-darwin14/sys-root/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers/tcl-private': I/O error
...

Not urgent though! We'll sort this out next week 👍

@cvanaret
Copy link
Owner Author

cvanaret commented Nov 17, 2024

@amontoison Good news: I managed to create the release (but I cheated a bit)!
There's another way to dereference optional values. Instead of:

if (x.has_value()) {
   // use x.value()
}

which is not compatible with macOS < 10.14, you can write:

if (x.has_value()) {
   // use *x
}

So I made these changes (#101) and reverted your changes in generate_binaries.jl (#102) and the copying of the licenses. That works :)
It doesn't solve the mystery, but as long as we don't use std::optional.has_value(), we should be fine.
Thanks for your help!

@cvanaret cvanaret added CI Continuous Integration release labels Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CI Continuous Integration release
Projects
None yet
Development

No branches or pull requests

2 participants