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

Option to build without SCIP with Makefile #2134

Closed
ankane opened this issue Aug 11, 2020 · 29 comments
Closed

Option to build without SCIP with Makefile #2134

ankane opened this issue Aug 11, 2020 · 29 comments
Assignees
Labels
Build: CMake CMake based build issue Feature Request Missing Feature/Wrapper
Milestone

Comments

@ankane
Copy link

ankane commented Aug 11, 2020

What language and solver does this apply to?
C++

Describe the problem you are trying to solve.

Hi, it looks like SCIP was added in the latest release, which doesn't have an open source license. It'd be nice if there was a way to build OR-Tools without it.

Describe the solution you'd like

USE_SCIP or similar option for Makefile build, since CMake is still considered experimental.

Describe alternatives you've considered

Use experimental CMake build instead.

@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020

Why is that a problem ?

@ankane
Copy link
Author

ankane commented Aug 11, 2020

I'd like to add OR-Tools to Homebrew, so Mac users can do brew install or-tools, but Homebrew requires software to have an open source (OSI-approved) license.

More generally, I think it's nice for users to be able to build OR-Tools without having to worry about non-open source software being included. It looks like others have this same concern, fwiw: #2129

@Mizux Mizux added Build: Makefile Makefile based build issue Feature Request Missing Feature/Wrapper labels Aug 11, 2020
@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020 via email

@Mizux Mizux added this to the v7.9 milestone Aug 11, 2020
@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020

Fixed for make based builds on master.

@lperron lperron added Build: CMake CMake based build issue and removed Build: Makefile Makefile based build issue labels Aug 11, 2020
@lperron lperron removed their assignment Aug 11, 2020
@lperron lperron closed this as completed Aug 11, 2020
@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020

Side comment, do you need help adding or-tools to homebrew ? This is one of or-tools missing delivery channel. Do you have a description of what you want to include ?

@ankane
Copy link
Author

ankane commented Aug 11, 2020

Thanks for adding a flag and offering to help! I have working formula here: https://github.com/ankane/homebrew-core/blob/or-tools/Formula/or-tools.rb

I submitted CBC to Homebrew earlier today, so once that's merged and a new release of OR-Tools is out, we should be good to go. I'll test the new flag in a bit to confirm everything works.

@ankane
Copy link
Author

ankane commented Aug 11, 2020

Just tried with master and it's failing with cp: dependencies/sources/scip-7.0.1/src/lpi/lpi_glop.cpp: No such file or directory.

Full logs: https://github.com/ankane/homebrew-core/runs/971549010?check_suite_focus=true

@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020 via email

@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020 via email

@ankane
Copy link
Author

ankane commented Aug 11, 2020

I tried the latest master without make third_party (and USE_SCIP=OFF), but it fails with:

makefiles/Makefile.third_party.unix.mk:46: *** Third party SCIP files was not found! did you run 'make third_party' or set UNIX_SCIP_DIR ?.  Stop.

Full logs: https://github.com/ankane/homebrew-core/runs/972227456?check_suite_focus=true

@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020 via email

@lperron
Copy link
Collaborator

lperron commented Aug 11, 2020 via email

@Mizux
Copy link
Collaborator

Mizux commented Aug 11, 2020

FYI i fixed for windows too ;)

@ankane
Copy link
Author

ankane commented Aug 12, 2020

Still no luck - same error (with same situation) as #2134 (comment)

Full logs: https://github.com/ankane/homebrew-core/runs/973737877?check_suite_focus=true

@Mizux Mizux reopened this Aug 12, 2020
@Mizux
Copy link
Collaborator

Mizux commented Aug 12, 2020

Few thinks (in any order):

  • Currently the variable is called BUILD_SCIP BUT i'll rename it as USE_SCIP to follow the CMake naming convention
    -> I'll let you know on this thread once done
  • FYI I have created a formula long time ago https://github.com/Mizux/homebrew-or-tools/blob/master/or-tools.rb
  • Homebrew already provide a "full" coin-or-tools/coinor/cbc (using the monolithic svn archive IIRC) so you don't need your custom cbc, cgl, clp, osi and coinutils custom formulae (unless this formula is broken ?).

@Mizux
Copy link
Collaborator

Mizux commented Aug 12, 2020

just renamed it, USE_SCIP if you want to test...

@ankane
Copy link
Author

ankane commented Aug 12, 2020

Thanks @Mizux, missed that it had a different name. It currently builds but make install_cc USE_SCIP=OFF ... fails (don't mind the 0.0.0 version):

cp -R dependencies/install/include/scip "/usr/local/Cellar/or-tools/0.0.0/include"
cp: dependencies/install/include/scip: No such file or directory
mkdir "/usr/local/Cellar/or-tools/0.0.0/include/ortools"
make: *** [install_third_party] Error 1
make: *** Waiting for unfinished jobs....

Re Homebrew: All dependencies must be in the official repo. The cbc formula was just merged, so no blockers there.

@Mizux
Copy link
Collaborator

Mizux commented Aug 12, 2020

install rule seems broken... on my way to fix them

@ankane
Copy link
Author

ankane commented Aug 13, 2020

Hey @Mizux, the latest commit seemed to fix it. I'll submit to Homebrew whenever a new version is out.

@ankane ankane closed this as completed Aug 13, 2020
@Mizux
Copy link
Collaborator

Mizux commented Aug 26, 2020

@ankane just FYI now or-tools depends on C++17 revision so we have to use abseil-cpp build using C++17 (yes abseil-cpp change according to the C++ revision used).

Unfortunately, as expected, homebrew/homebrew-core only provide abseil-cpp in.... C++11 -> ortools.rb is no longer compiling against the "homebrew ecosystem"
see: https://github.com/Mizux/homebrew-or-tools/runs/1031099691?check_suite_focus=true

@ankane
Copy link
Author

ankane commented Aug 26, 2020

Does that just mean we need to wait until the next abseil LTS version is out?

@Mizux
Copy link
Collaborator

Mizux commented Aug 26, 2020

It means we need to have an abseil package compiled against c++17.

I've just sent a bottle to the homebrew community -> https://discourse.brew.sh/t/abseil-and-c-revision/8641

@ankane
Copy link
Author

ankane commented Aug 26, 2020

It doesn't look like any formula currently depend on it (just search for abseil in https://github.com/homebrew/homebrew-core), so should be fine to make the change.

@Mizux
Copy link
Collaborator

Mizux commented Aug 27, 2020

start to have something working: https://github.com/Mizux/homebrew-or-tools/runs/1035669937?check_suite_focus=true
Next step:

  • Send PR to homebrew-core to modify abseil.rb using my version
  • Send PR to homebrew-core to integrate ortools.rb (CMake based build) once release v8.0 is out...

@ankane
Copy link
Author

ankane commented Oct 13, 2020

Hey @Mizux, was able to get v8.0 working with the following changes: Homebrew/homebrew-core@master...ankane:or-tools3. Let me know if you'd like me to submit, or you'd like to do it.

@Mizux
Copy link
Collaborator

Mizux commented Oct 13, 2020

@ankane well I was waiting to release v8.0 to propose my homebrew package ;)

our ortools.rb and mine differ a little bit (e.g. you don't provide head, you are using archive, i'm using git), i'll try to send you comment then if you want to provide your version, I'm ok (i.e. don't care if you or me send the PR to homebrew community, I just want to have it integrated inside homebrew-core)

FYI: I already ask on homebrew forum if it will be ok to bump abseil to C++17, it should be ok since no one is using it yet (brew reverse dependencies show nothing)
see: or-tools/homebrew_or-tools#1 (comment)

@ankane
Copy link
Author

ankane commented Oct 13, 2020

Homebrew prefers the tar.gz url over git whenever possible for the url. Just added the head url (I wasn't sure if Homebrew allows this in new formula, but it doesn't generate a warning with the new formula audit). Anyways, feel free to run with your version / steal from this if there are other changes you want to make.

@Mizux
Copy link
Collaborator

Mizux commented Oct 13, 2020

@ankane few bad news:

  • adding revision to abseil.rb will break the build
Emacs Lisp files have been installed to:
  /usr/local/share/emacs/site-lisp/cmake
Error: Testing requires the latest version of abseil
Error: Process completed with exit code 1.

see: https://github.com/or-tools/homebrew_or-tools/actions/runs/303942900

  • greping abseil, it seems grpc make it through homebrew-core using c++11 version...
    note: in my github action workflow, I've tried to find reverse deps
Run brew uses --recursive --include-build --include-test abseil
  brew uses --recursive --include-build --include-test abseil
  shell: /bin/bash -e {0}
  env:
    VERSION: --HEAD
apache-arrow // depends on grpc
apache-arrow-glib // depends on apache-arrow
dvc // depends on apache-arrow
grpc // depends directly on abseil

see: https://github.com/or-tools/homebrew_or-tools/runs/1246430593?check_suite_focus=true#step:5:1

Side note

  • Your or-tools.rb do not provide a .pc which can be cool for auto-tool users and few others tools (ed even cmake has a module to read them...)
    see: Homebrew/homebrew-core@master...Mizux:ortools

  • you are missing -DBUILD_SAMPLES=OFF IIRC

EDIT: I'll send a PR and see what's going on with homebrew team

@ankane
Copy link
Author

ankane commented Oct 21, 2020

Looks like it was accepted 🎉 Thanks @Mizux!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build: CMake CMake based build issue Feature Request Missing Feature/Wrapper
Projects
None yet
Development

No branches or pull requests

3 participants