-
Notifications
You must be signed in to change notification settings - Fork 13
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
Automatically fetch and compile SCIP #125
Comments
Hi @jacobsvante! Yes, that is of course a valid request but I opted not to do that for two reasons:
That being said, I think the goal of making russcip (and SCIP) more accessible is to do a similar approach to python packages; i.e. fetch a prebuilt binary of SCIP (and its dependencies) on the fly. As of right now, prebuilt binaries exist for the 3 OSs but only on intel x86 architecture. @Opt-Mucca is currently working on extending that to ARM. Once that is done, I plan to add it as a fallback option in case neither |
Hi @mmghannam, Thanks for the response. I don't think I've heard of including pre-built binaries in a crate before. Do you know of any crate that does this? Where can I follow @Opt-Mucca's work? Arm-support would be a very good addition! |
Hey @jacobsvante Currently I do most of the work offline. For Windows and MacOS w/ x86 I build using GitHub Actions on Mo's fork of SCIP: https://github.com/mmghannam/scip/tree/mt/build_from_source The main reason I'm doing this is so SCIP can be automatically packaged when using Right now I'm having trouble with MacOS on the new ARM processors, although I think that's simply because I haven't sat down with one for a few hours. As for ARM on linux, I wasn't planning on doing anything until I saw that there was a demand. |
Sounds like you're making good strides, keep it up @Opt-Mucca! 😃 |
Thanks to @Opt-Mucca's efforts, precompiled binaries are released for SCIP 9.0.0 for all OS's on x86 and arm too for MacOS. I released today a new version of russcip that has a |
Sweet! Good job! I tried it out just now but the scip.zib.de domain is not working for me at the moment. Keeping it in the russcip library works for me, I'm using it through I'll get back once I can confirm if it's working for me. (I'm on a M3 Apple silicon MacBook Pro). |
Thanks for the feedback, maybe we can move the files to Github to avoid these issues. |
Sounds like a good idea. Or you could use that as a mirror. |
I updated scip-sys with the github links and made a new release of russcip. I'd like to close this issue for now as I think this alternative solution addresses the accessibility issue for most people. @jacobsvante please feel free to reopen if you still think there's a need. |
Nice @mmghannam! One issue though. I copy-pasted the russcip example to a new project and added russcip 0.3.2 (
|
Oh I haven't thought about this use case. I think this is because I'm linking to libscip dynamically. But that should be fixable if statically built binaries are used. I added this issue in scip-sys scipopt/scip-sys#10. |
Thanks @mmghannam |
Not very knowledgeable, but maybe another way would be to set the rpath of the executable similar to here (because the library files are somewhere in the build folder, the executable just does not find them) 🤔 https://github.com/Rust-SDL2/rust-sdl2#bundled-feature On another note: I saw the PR regarding static linking, I would be interested in that for independent reasons 😊 it seems that the pre-built binaries aren't compiled with the correct flags to make this possible? So only option would be to have static linking with a "self-built" SCIP installation somewhere on the system (in SCIPOPTDIR). Anyway, thanks for your effort in making SCIP accessible from Rust :) |
I'm doing that in
The build scripts are in this repo in this folder. I don't have a lot of experience with this, I compiled SCIP with
Thanks, I appreciate it :) |
Yeah, true. Then, from what I gather using rpath is not really feasible.
Yes, will very likely try to get this to work, can't promise on when though (or on whether I will succeed). |
For static linking, maybe something like this can help if we want to avoid recompilation: rust-lang/rust#35061. At least having flag "-C relocation-model=dynamic-no-pic" gives me different errors (missing libraries)... |
@mwien thanks for your help! I always get frustrated quickly when working on the build system, but unfortunately it's necessary. I tried to avoid it till now but it seems that compiling SCIP from source is probably the best option to fit most cases. I should've just followed @jacobsvante advice from the start 😅 but at least now we have this bundled feature. |
Tjihoo! Nice @mmghannam! |
Ok I managed to get CI to work for macos and ubuntu, I suspect windows works too but just tbb is needed on the system. I just published a new version of russcip that has the new from-source feature. @jacobsvante @mwien It would be great if you could try it and let me know if it works for you. This is still a first version that probably wouldn't work for everyone out of the box but I'll close the issue for now and if there are problems I suggest we solve them in following issues. |
Now that SCIP is using the Apache license, it would be fitting to automatically fetch and compile the SCIP library when you cargo install this crate. This should make it way more accessible to people.
What do you think? Is this feasible?
The text was updated successfully, but these errors were encountered: