-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Use dynamic dependencies on UNIX #697
Conversation
PYTHON_SETUP_DEPS= | ||
ifeq ($(UNIX_GFLAGS_DIR),$(OR_TOOLS_TOP)/dependencies/install) | ||
ifeq ($(PLATFORM),MACOSX) | ||
PYTHON_SETUP_DEPS += , 'libgflags.2.2.$L' |
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.
Should be $(PYTHON_SWIG_SUFFIX) on MacOS i.e. python look for .so even on Mac -_-
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.
it's ok this is dynamic dependencies not pywrappers so on MacOS they are still suffixed by .dylib
- useful when grepping these defs
cd is available on all platform -> no need for a CD def
$S is for Makefile shell cmd not target or prerequisite syntax. i.e. always use / in path.
Unix: - Rename install_directories rule this target creates dependencies/install dir not ortools install dir - replace $(LIB_SUFFIX) by $L to be consistent with $E and $O suffix - fix rpath, no need anymore patchelf -> remove prerequisite $(PATCHELF) in install_cc - use build_cmake as build directory note: MacOS is case insensitive when creating directory and bazel file is named BUILD -> `mkdir build` won't work - Fix CMD_LNK on mac - Fix MacOS LINK_FLAGS - MacOS also use LIB_DIR = lib Win: - Fix windows lib suffix $L Protobuf: - Need to use PROTOC (like MONO) to add LD_LIBRARY_PATH hack -> PROTOC = LD_LIBARY_PATH="..." protoc -> replace $(PROTOBUF_DIR)/bin/protoc by $(PROTOC) - Remove uneeded PROTOBUF_DIR defs - Apply patch to protobuf to use @rpath on MacOS - Add rpath to protobuf install rules Coin-OR - Use coin-or github repos mirror instead of the svn repo (Fix #379) - Use the splited Cbc (CoinUtils, Osi, Clp, Cgl, Cbc) note: usually distro use this layout cf https://repology.org/metapackage/coin-or-cbc/badges - Fix rpath for all coin-or libraries at post-install using patchelf (linux) or otools (osx)
libortools: - Rename LD_FLAGS to LDFLAGS - Update LDFLAGS - Add install_name to LDFLAGS on MacOS - use OR_TOOLS_LIBS as target name libraries: - Rename OR_TOOLS_LD_FLAGS to OR_TOOLS_LDFLAGS - Add OR_TOOLS_LNK and OR_TOOLS_LDFLAGS - add install_name on MacOS Misc: - Rework LINK_FLAGS - Replace ortools$Sgen by $(GEN_DIR) - Fix install_cc rules - Update detect_cc target
- Fix DYNAMIC_LD on MacOS - Fixup @rpath in python wrapper - Rework clean_python target - Cleaning rpy target - Echo test_python rules - Add all *vrp* samples to test_python - Rework pypi_archive target - Copy shared library to python tempDir - Update setup.py - Echo install_python rules (i.e. remove of @) - Add uninstall_python target - Update detect_python target
I do my best to rewrite all rpath and carefully ship all dependencies in the bundle so python user should be not impacted i.e. will still ship a working standalone python package (ed: it also requires six and protobuf python package since v6.6 if I remember well). Please note that now we use Coin-OR Cbc from github mirror(s) which is splitted in five repos (CoinUtils, Osi, Clp, Cgl, Cbc). We also do this since most distro ship coin-or-cbc etc... like this (and coin-or.org is regularly down...) The ultimate goal is to prepare or-tools to be able to build and package it without its dependencies so we could integrate libortools to any linux/brew distro as a regular package which depends on other libraries... Feedback or question are welcome ! |
Use dynamic dependencies on unix instead of static libs.
Fix #684: Split CBC in five
Fix #379: don't use coin-or.org to download packages
EDIT: Create PR to get CI feedback...