-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add windows build (try IV) #16
Conversation
…nda-forge-pinning 2023.12.08.09.49.00
…nda-forge-pinning 2024.03.27.17.58.50
Hi! This is the friendly automated conda-forge-linting service. I just wanted to let you know that I linted all conda-recipes in your PR ( |
Hi @jpfeuffer thanks for working on this. If there is anything I can do to help, let me know :) |
Thank you! One question, not related to windows. What's happening with the Mac builds? It times out downloading the SDK on Intel for example. |
OK, so now we are back to the original problem, which is that we are trying to link to a BLAS library with Fortran linkage and we need one with C linkage. It looks like we are installing both |
Okay. Now it says it supports C linkage but it "does not work" whatever that means 😅 |
I found sth that indicates a missing include dir might be the problem: I could add more variables but is there a better/automated way of finding dependencies here? |
The reason for the failure to link is something you would normally figure out by looking at the |
@tkralphs I am printing the log to the console now. I am not sure what to look for right now. I can go over the whole thing at some point but maybe you will see it quickly. |
I actually checked the whole logs now, and there is nothing else hinting on why BLAS linking would fail. But I might have missed something since those logs are incredibly convoluted. |
One thing I noticed is that a lot of paths are wrong. Apparently m2 is not well supported in conda and you have to do all kinds of workarounds to preserve paths. |
Ok, as expected, tests introduce another level of complexity. |
The issue in the test will be fixed in the next release by this: coin-or/CoinUtils#217. Why don't you just leave it for now and after I make the release, we can see if it's fixed. |
Yes that's fine, I was about to wait for the release anyway. I just don't want it to be a longer thing because if I lose focus on this side project I am not sure when I will revisit. |
There was a timeout installing Mamba, which I guess will fix itself, but I couldn't see how to force the workflows to be run again except by closing and reopening the PR. But anyway, everything seems to be good with the new release. |
I triggered a rerun from the github page :) |
I think we need to skip tests on osx-arm since it's cross compiled. Could that be? |
Yeah, let's just skip tests on osx-arm. |
You could also use
in the |
Actually, you can remove the deprecated value of The rerender would also use the new URL in the readme etc. so it might be good to do anyways. I did it locally but for some reason can't push to your PR. |
@wolfv does this also work if the tests are in the build stage? |
@jpfeuffer you're right. sorry. you could do a bash if statement in that case.
|
The general pattern for this would be:
|
Yep I found it in the docs. I used it like this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First look; not sure how this works without a fortran compiler... 🤔
I'm not a maintainer here (though floating around the cbc stack for a while), but personally I'd prefer a cleaner git history for this PR. 🤷
recipe/meta.yaml
Outdated
- {{ compiler('fortran') }} | ||
- pkg-config | ||
- make # [unix] | ||
- {{ compiler('fortran') }} # [not win] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand how this works - how is it possible that we don't need a fortran compiler on windows after all?
The configure script already warns:
configure: WARNING: Failed to find a Fortran compiler!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project itself has no Fortran, the Fortran compiler is needed when linking to a Blas/Lapack library with Fortran linkage to determine the name-mangling scheme (I'm not really an expert on this). When either not linking to Blas/Lapack at all (it is not technically needed, though performance is better with it) or when linking to a Blas/Lapack with C linkage, no Fortran compiler is needed. Granted, the warning is a little confusing, though it is only a warning, not an error.
My (now very vague) recollection, pieced together by looking at comments I wrote during earlier attempts, is that we were at first trying to link to Blas/Lapack with Fortran linkage, which first failed because of the lack of a Fortran compiler and then because of the unexpected extension for object files built with flang.
It's quite possible I failed to see the forest for the trees at that point and got caught up in trying to fix the immediate issue rather than taking a step back to see that this could be avoided altogether by just leaving out the --with-blas
flag rather than trying to make the Fortran linkage work. I took the presence of those flag for granted for some reason and there's still no way to make the build work with those flags present on WIndows. Even coming back to it this time with fresh eyes, it wasn't until I tried to really isolate why we've able to build on Github Actions and not here that I realized that it was those flags that were the culprit.
Anyway, sorry for the tail-chasing.
fortran_compiler: | ||
- flang | ||
fortran_compiler_version: | ||
- '5' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that you're still adding fortran compilers here (seems to be based on an old rerender before adding the selector to the fortran compiler). However, since the dependency is missing in meta.yaml
, this isn't actually pulled into the build environment for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think we should remove this now.
OK, so everything is passing now, but there are a few unresolved conversations above. @jschueller, can you let me know when you think we're ready to go? |
@tkralphs I want to have a look at the blas problem. Can you explain how the version of blas affects coin? Should we just try to use cblas on all platforms to avoid having to deal with fortran? |
As I said, I am not an expert on this, but there are two separate issues. The first issue is practical---how to link to the library. The second issue is performance. There are many different implementations of the BLAS API and their performance will differ. Which one would be the best performing with Cbc probably differs by platform. I don't have a specific recommendation for that. On Windows, whatever we can make work would be good. For the linking, to link to a library with Fortran linkage, you need to know the name-mangling scheme used by the library (you can read about the general idea here if you're unfamiliar), which is why the Fortran compiler is required. My recollection, though. is that So I believe our only option is to link to a library with C linkage. That is about the extent of my knowledge. We can seek out some advice if we need to know more, but I would personally just merge and move on to trying to get a working Cbc on Windows. After it's working without BLAS, we can separately try to add BLAS later. |
Ok since we are also not passing --with-lapack and lapack also needs fortran, I removed everything fortran related now. |
Will do a re-render once it passes. |
@conda-forge-admin, please rerender |
Hi! This is the friendly automated conda-forge-webservice. I tried to rerender for you, but it looks like I wasn't able to push to the add-windows-build branch of jpfeuffer/coin-or-utils-feedstock. Did you check the "Allow edits from maintainers" box? NOTE: Our webservices cannot push to PRs from organization accounts or PRs from forks made from organization forks because of GitHub permissions. Please fork the feedstock directly from conda-forge into your personal GitHub account. This message was generated by GitHub actions workflow run https://github.com/conda-forge/coin-or-utils-feedstock/actions/runs/8630351073. |
I re-did the PR by re-forking from conda-forge directly. Also to cleanup commit history. |
I am fine with that approach. However, this might be surprising for some people used to having this feature. At least during the transition period until our new release is on par with the old one again. |
Checklist
0
(if the version changed)conda-smithy
(Use the phrase@conda-forge-admin, please rerender
in a comment in this PR for automated rerendering)