google / or-tools

Google's Operations Research tools:
https://developers.google.com/optimization/
Apache License 2.0
10.97k stars 2.1k forks source link

Failure to build Third Party on MacOS #2194

Closed Dekker1 closed 3 years ago

Dekker1 commented 3 years ago

What version of OR-tools and what language are you using? Version: stable Language: C++

What operating system (Linux, Windows, ...) and version?

MacOS Cataline

What did you do? I'm trying to build OR-tools according to the description on the website. However, it fails at the first step

make third_party

All further steps then fails as well.

What did you expect to see Correctly build third party libraries.

What did you see instead?

Makefile:57: Makefile.local: No such file or directory
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
rm -f Makefile.local
Generating Makefile.local
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
mkdir -p dependencies/install
mkdir -p dependencies/install/bin
mkdir -p dependencies/install/lib
mkdir -p dependencies/install/lib/pkgconfig
mkdir -p dependencies/install/include
mkdir -p dependencies/install/include/coin
cd dependencies/sources/gflags-2.2.2 && \
  CXX="clang++ -fPIC -std=c++11  -mmacosx-version-min=10.9 -stdlib=libc++" /usr/local/bin/cmake -H. -Bbuild_cmake \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_STATIC_LIBS=OFF \
    -DBUILD_TESTING=OFF \
    -DGFLAGS_NAMESPACE=gflags \
    -DCMAKE_CXX_FLAGS="-fPIC -mmacosx-version-min=10.9" \
    -DCMAKE_INSTALL_PREFIX=../../install && \
  /usr/local/bin/cmake --build build_cmake -- -j 4 && \
  /usr/local/bin/cmake --build build_cmake --target install
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jdek0001/Playground/or-tools/dependencies/sources/gflags-2.2.2/build_cmake
ninja: no work to do.
[0/1] Install the project...
-- Install configuration: "Debug"
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags_debug.2.2.2.dylib
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags_debug.2.2.dylib
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags_debug.dylib
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags_nothreads_debug.2.2.2.dylib
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags_nothreads_debug.2.2.dylib
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags_nothreads_debug.dylib
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/include/gflags/gflags.h
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/include/gflags/gflags_declare.h
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/include/gflags/gflags_completions.h
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/cmake/gflags/gflags-config.cmake
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/cmake/gflags/gflags-config-version.cmake
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/cmake/gflags/gflags-targets.cmake
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/cmake/gflags/gflags-targets-debug.cmake
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/cmake/gflags/gflags-nonamespace-targets.cmake
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/cmake/gflags/gflags-nonamespace-targets-debug.cmake
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/bin/gflags_completions.sh
-- Installing: /Users/jdek0001/Playground/or-tools/dependencies/install/lib/pkgconfig/gflags.pc
-- Installing: /Users/jdek0001/.cmake/packages/gflags/32f27ab2f25177385af051a180e81878
cd dependencies/sources/glog-0.4.0 && \
  CXX="clang++ -fPIC -std=c++11  -mmacosx-version-min=10.9 -stdlib=libc++" /usr/local/bin/cmake -H. -Bbuild_cmake \
    -DCMAKE_PREFIX_PATH="/Users/jdek0001/Playground/or-tools/dependencies/install" \
    -DBUILD_SHARED_LIBS=ON \
    -DBUILD_TESTING=OFF \
    -DCMAKE_CXX_FLAGS="-fPIC -mmacosx-version-min=10.9" \
    -DCMAKE_SHARED_LINKER_FLAGS="-Wl,-rpath,\$ORIGIN" \
    -DCMAKE_INSTALL_PREFIX=../../install && \
  /usr/local/bin/cmake --build build_cmake -- -j 4 && \
  /usr/local/bin/cmake --build build_cmake --target install
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/jdek0001/Playground/or-tools/dependencies/sources/glog-0.4.0/build_cmake
[1/2] Linking CXX shared library Debug/libglogd.0.4.0.dylib
FAILED: Debug/libglogd.0.4.0.dylib 
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -fPIC -std=c++11  -mmacosx-version-min=10.9 -stdlib=libc++ -fPIC -mmacosx-version-min=10.9 -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -dynamiclib -Wl,-headerpad_max_install_names -Wl,-rpath,$ORIGIN   -current_version 0.4.0 -o Debug/libglogd.0.4.0.dylib -install_name @rpath/libglogd.0.dylib CMakeFiles/glog.dir/Debug/src/demangle.cc.o CMakeFiles/glog.dir/Debug/src/logging.cc.o CMakeFiles/glog.dir/Debug/src/raw_logging.cc.o CMakeFiles/glog.dir/Debug/src/symbolize.cc.o CMakeFiles/glog.dir/Debug/src/utilities.cc.o CMakeFiles/glog.dir/Debug/src/vlog_is_on.cc.o CMakeFiles/glog.dir/Debug/src/signalhandler.cc.o  -Wl,-rpath,/Users/jdek0001/Playground/or-tools/dependencies/install/lib  /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags_debug.2.2.2.dylib && :
Undefined symbols for architecture x86_64:
  "google::Demangle(char const*, char*, int)", referenced from:
      google::DemangleInplace(char*, int) in symbolize.cc.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
make: *** [dependencies/install/lib/libglog.dylib] Error 1

Anything else we should know about your project / environment

I'm using a clean build and have installed all suggested packages from Homebrew.

Mizux commented 3 years ago

Can you provide the output of make detect ?

Dekker1 commented 3 years ago

The output from make detect:

Makefile:57: Makefile.local: No such file or directory
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
rm -f Makefile.local
Generating Makefile.local
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
/bin/sh: - : invalid option
Relevant info on the system:
SYSTEM = unix
OS = Darwin
PLATFORM = MACOSX
PTRLENGTH = 64
PORT = MacOsX-10.15.7
SHELL = /bin/sh
OR_TOOLS_TOP = /Users/jdek0001/Playground/or-tools
OR_TOOLS_VERSION = 7.8.7959
OR_TOOLS_SHORT_VERSION = 7.8
GIT_REVISION = 7959
GIT_HASH = a0a56698b
CMAKE = /usr/local/bin/cmake
SWIG_BINARY =
SWIG_INC = -DUSE_GLOP -DUSE_BOP -DABSL_MUST_USE_RESULT -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER

/bin/sh: - : invalid option
Relevant info on third party:
UNIX_GFLAGS_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
GFLAGS_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include
GFLAGS_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lgflags
UNIX_GLOG_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
GLOG_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include
GLOG_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lglog
UNIX_PROTOBUF_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
PROTOBUF_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include
PROTOBUF_LNK = -L -lprotobuf
UNIX_CBC_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
CBC_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC
CBC_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCbcSolver -lCbc -lOsiCbc
UNIX_CLP_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
CLP_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP
CLP_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lClpSolver -lClp -lOsiClp
UNIX_CGL_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
CGL_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I
CGL_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCgl
UNIX_OSI_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
OSI_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I
OSI_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lOsi
UNIX_COINUTILS_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
COINUTILS_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I
COINUTILS_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCoinUtils
UNIX_SCIP_DIR = /Users/jdek0001/Playground/or-tools/dependencies/install
SCIP_INC = -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER
SCIP_LNK = /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libscip.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libnlpi.cppad.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/liblpinone.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libtpitny-7.0.1.darwin.x86_64.gnu.opt.a
SWIG_VERSION = allexport off braceexpand on emacs on errexit on errtrace off functrace off hashall on histexpand on history on ignoreeof off interactive-comments on keyword off monitor off noclobber off noexec off noglob off nolog off notify off nounset off onecmd off physical off pipefail off posix off privileged off verbose on vi off xtrace off

Relevant info for the C++ build:
PROTOC = DYLD_LIBRARY_PATH=/Users/jdek0001/Playground/or-tools/dependencies/install/lib:
CCC = clang++ -fPIC -std=c++11 -mmacosx-version-min=10.9 -stdlib=libc++
CFLAGS = -O4 -DNDEBUG -I. -Iortools/gen -Wno-deprecated -DUSE_GLOP -DUSE_BOP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER -DOR_TOOLS_MAJOR=7 -DOR_TOOLS_MINOR=8
LDFLAGS = -install_name @rpath/libortools.dylib -lz -framework CoreFoundation -Wl,-rpath,@loader_path -Wl,-rpath,@loader_path/../lib -Wl,-rpath,@loader_path/../dependencies/install/lib
LINK_CMD = clang++ -dynamiclib -Wl,-search_paths_first -Wl,-headerpad_max_install_names -current_version 7.8 -compatibility_version 7.8
DEPENDENCIES_INC = -I. -Iortools/gen -Wno-deprecated -DUSE_GLOP -DUSE_BOP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER
DEPENDENCIES_LNK = -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lgflags -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lglog -L -lprotobuf libabsl_synchronization.a libabsl_bad_any_cast_impl.a libabsl_bad_optional_access.a libabsl_bad_variant_access.a libabsl_city.a libabsl_civil_time.a libabsl_examine_stack.a libabsl_failure_signal_handler.a libabsl_flags.a libabsl_flags_config.a libabsl_flags_internal.a libabsl_flags_marshalling.a libabsl_flags_parse.a libabsl_flags_program_name.a libabsl_flags_registry.a libabsl_flags_usage.a libabsl_flags_usage_internal.a libabsl_graphcycles_internal.a libabsl_hash.a libabsl_hashtablez_sampler.a libabsl_leak_check.a libabsl_leak_check_disable.a libabsl_log_severity.a libabsl_malloc_internal.a libabsl_periodic_sampler.a libabsl_random_distributions.a libabsl_random_internal_distribution_test_util.a libabsl_random_internal_pool_urbg.a libabsl_random_internal_randen.a libabsl_random_internal_randen_hwaes.a libabsl_random_internal_randen_hwaes_impl.a libabsl_random_internal_randen_slow.a libabsl_random_internal_seed_material.a libabsl_random_seed_gen_exception.a libabsl_random_seed_sequences.a libabsl_raw_hash_set.a libabsl_raw_logging_internal.a libabsl_scoped_set_env.a libabsl_spinlock_wait.a libabsl_stacktrace.a libabsl_status.a libabsl_str_format_internal.a libabsl_strings.a libabsl_strings_internal.a libabsl_symbolize.a libabsl_throw_delegate.a libabsl_time.a libabsl_time_zone.a libabsl_exponential_biased.a libabsl_cord.a libabsl_int128.a libabsl_debugging_internal.a libabsl_demangle_internal.a libabsl_base.a libabsl_dynamic_annotations.a -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCbcSolver -lCbc -lOsiCbc -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCgl -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lClpSolver -lClp -lOsiClp -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lOsi -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCoinUtils /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libscip.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libnlpi.cppad.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/liblpinone.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libtpitny-7.0.1.darwin.x86_64.gnu.opt.a
SRC_DIR = .
GEN_DIR = ortools/gen
CC_EX_DIR = examples/cpp
OBJ_DIR = objs
LIB_DIR = lib
BIN_DIR = bin
prefix = /usr/local
OR_TOOLS_LNK = -Llib -lortools -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lgflags -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lglog -L -lprotobuf -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCbcSolver -lCbc -lOsiCbc -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCgl -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lClpSolver -lClp -lOsiClp -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lOsi -L/Users/jdek0001/Playground/or-tools/dependencies/install/lib -lCoinUtils
OR_TOOLS_LDFLAGS = -lz -framework CoreFoundation -Wl,-rpath,@loader_path -Wl,-rpath,@loader_path/../lib -Wl,-rpath,@loader_path/../dependencies/install/lib
OR_TOOLS_LIBS = lib/libortools.dylib

Relevant info for the Python build:
UNIX_PYTHON_VER = 3.8
PYTHON_COMPILER = python3.8
PYTHON_EXECUTABLE = /Users/jdek0001/.pyenv/shims/python3.8
PYTHON_VERSION = 3.8
PYTHON3 = true
PYTHON_INC = -I/Users/jdek0001/.pyenv/versions/3.8.1/include/python3.8 -I/Users/jdek0001/.pyenv/versions/3.8.1/lib/python3.8 -I/usr/local/opt/python@3.8/Frameworks/Python.framework/Versions/3.8/include/python3.8
PYTHON_LNK =
PYTHON_LDFLAGS = -Wl,-rpath,@loader_path -Wl,-rpath,@loader_path/../../ortools -Wl,-rpath,@loader_path/../../ortools/.libs -Wl,-rpath,@loader_path/../../../../lib -Wl,-rpath,@loader_path/../../../../dependencies/install/lib
SWIG_BINARY =
SWIG_INC = -DUSE_GLOP -DUSE_BOP -DABSL_MUST_USE_RESULT -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER
SWIG_PYTHON3_FLAG = -py3 -DPY3
SWIG_PYTHON_LIB_SUFFIX = so
SWIG_PY_DOXYGEN =
SET_PYTHONPATH = PYTHONPATH=/Users/jdek0001/Playground/or-tools:/Users/jdek0001/Playground/or-tools/dependencies/sources/protobuf-v3.12.2/python
MYPY_OUT = 

Relevant info for the Java build:
JAVA_INC = -I/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/include/darwin
JNIFLAGS = -O1 -DNDEBUG -I. -Iortools/gen -Wno-deprecated -DUSE_GLOP -DUSE_BOP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER
JAVA_HOME = /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home
JAVAC_BIN = /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/bin/javac
CLASS_DIR = classes
JAR_BIN = /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/bin/jar
JAVA_BIN = /Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home/bin/java
JAVAFLAGS = -Djava.library.path=lib
JAVA_OR_TOOLS_LIBS = lib/com.google.ortools.jar
SWIG_BINARY =
SWIG_INC = -DUSE_GLOP -DUSE_BOP -DABSL_MUST_USE_RESULT -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER

Relevant info for the dotnet build:
DOTNET_BIN =
NUGET_BIN =  nuget
PROTOC = DYLD_LIBRARY_PATH=/Users/jdek0001/Playground/or-tools/dependencies/install/lib:
DOTNET_SNK =
DOTNET_ORTOOLS_SNK = ./ortools/dotnet/or-tools.snk
SWIG_BINARY =
SWIG_INC = -DUSE_GLOP -DUSE_BOP -DABSL_MUST_USE_RESULT -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CLP -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -I -DUSE_CBC -I/Users/jdek0001/Playground/or-tools/dependencies/install/include -DUSE_SCIP -DNO_CONFIG_HEADER
SWIG_DOTNET_LIB_SUFFIX = dylib
OR_TOOLS_NATIVE_LIB = google-ortools-native
OR_TOOLS_RUNTIME_ASSEMBLY_NAME =Google.OrTools.runtime.osx-x64
DOTNET_ORTOOLS_RUNTIME_NUPKG = packages/Google.OrTools.runtime.osx-x64.7.8.7959.nupkg
OR_TOOLS_ASSEMBLY_NAME = Google.OrTools
DOTNET_ORTOOLS_NUPKG = packages/Google.OrTools.7.8.7959.nupkg
OR_TOOLS_FSHARP_ASSEMBLY_NAME = Google.OrTools.FSharp
DOTNET_ORTOOLS_FSHARP_NUPKG = packages/Google.OrTools.FSharp.7.8.7959.nupkg
OR_TOOLS_FSHARP_TESTS_ASSEMBLY_NAME = Google.OrTools.FSharp.Tests

Relevant info for the archive build:
TEMP_ARCHIVE_DIR = temp_archive
INSTALL_DIR = or-tools_MacOsX-10.15.7_v7.8.7959
TEMP_FZ_DIR = temp_fz_archive
FZ_INSTALL_DIR = or-tools_flatzinc_MacOsX-10.15.7_v7.8.7959
TEMP_DATA_DIR = temp_data
DATA_INSTALL_DIR = or-tools_data_v7.8.7959
ARCHIVE_EXT = .tar.gz

SOURCE =
SOURCE_PATH =
SOURCE_NAME =
SOURCE_SUFFIX =
Mizux commented 3 years ago

Unfortunately, I can't reproduce it locally, could you try to build against the last release v8.0 ?

Dekker1 commented 3 years ago

The issue seems to have been resolved between v7.8 and v8.0.

As an unrelated (and off topic) question, Is there an install target for the FlatZinc interface?

Dekker1 commented 3 years ago

I'm sorry. I might have spoken too soon. I'm now experiencing another build problem when executing the make cc step.

/bin/sh: - : invalid option
/bin/sh: - : invalid option
clang++ -dynamiclib -mmacosx-version-min=10.9 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -current_version 8.0 -compatibility_version 8.0 \
 -o lib/libortools.dylib \
 objs/base/bitmap.o objs/base/file.o objs/base/logging.o objs/base/random.o objs/base/recordio.o objs/base/sysinfo.o objs/base/threadpool.o objs/base/timer.o objs/base/version.o \
 objs/port/file_nonport.o objs/port/sysinfo_nonport.o \
 objs/util/bitset.o objs/util/cached_log.o objs/util/file_util.o objs/util/fp_utils.o objs/util/graph_export.o objs/util/piecewise_linear_function.o objs/util/proto_tools.o objs/util/range_query_function.o objs/util/rational_approximation.o objs/util/sigint.o objs/util/sorted_interval_list.o objs/util/stats.o objs/util/time_limit.o objs/util/optional_boolean.pb.o \
 objs/data/jobshop_scheduling_parser.o objs/data/rcpsp_parser.o objs/data/set_covering_data.o objs/data/set_covering_parser.o objs/data/jobshop_scheduling.pb.o objs/data/rcpsp.pb.o \
 objs/lp_data/lp_data.o objs/lp_data/lp_data_utils.o objs/lp_data/lp_decomposer.o objs/lp_data/lp_print_utils.o objs/lp_data/lp_types.o objs/lp_data/lp_utils.o objs/lp_data/matrix_scaler.o objs/lp_data/matrix_utils.o objs/lp_data/model_reader.o objs/lp_data/mps_reader.o objs/lp_data/proto_utils.o objs/lp_data/sparse.o objs/lp_data/sparse_column.o \
 objs/glop/basis_representation.o objs/glop/dual_edge_norms.o objs/glop/entering_variable.o objs/glop/initial_basis.o objs/glop/lp_solver.o objs/glop/lu_factorization.o objs/glop/markowitz.o objs/glop/preprocessor.o objs/glop/primal_edge_norms.o objs/glop/reduced_costs.o objs/glop/revised_simplex.o objs/glop/status.o objs/glop/update_row.o objs/glop/variable_values.o objs/glop/variables_info.o objs/glop/parameters.pb.o \
 objs/graph/assignment.o objs/graph/astar.o objs/graph/bellman_ford.o objs/graph/cliques.o objs/graph/connected_components.o objs/graph/dijkstra.o objs/graph/linear_assignment.o objs/graph/max_flow.o objs/graph/min_cost_flow.o objs/graph/perfect_matching.o objs/graph/shortestpaths.o objs/graph/topologicalsorter.o objs/graph/util.o objs/graph/flow_problem.pb.o \
 objs/algorithms/dynamic_partition.o objs/algorithms/dynamic_permutation.o objs/algorithms/find_graph_symmetries.o objs/algorithms/hungarian.o objs/algorithms/knapsack_solver.o objs/algorithms/knapsack_solver_for_cuts.o objs/algorithms/sparse_permutation.o \
 objs/sat/all_different.o objs/sat/boolean_problem.o objs/sat/circuit.o objs/sat/clause.o objs/sat/cp_constraints.o objs/sat/cp_model.o objs/sat/cp_model_checker.o objs/sat/cp_model_expand.o objs/sat/cp_model_lns.o objs/sat/cp_model_loader.o objs/sat/cp_model_objective.o objs/sat/cp_model_postsolve.o objs/sat/cp_model_presolve.o objs/sat/cp_model_search.o objs/sat/cp_model_solver.o objs/sat/cp_model_symmetries.o objs/sat/cp_model_utils.o objs/sat/cumulative.o objs/sat/cumulative_energy.o objs/sat/cuts.o objs/sat/diffn.o objs/sat/disjunctive.o objs/sat/drat_checker.o objs/sat/drat_proof_handler.o objs/sat/drat_writer.o objs/sat/encoding.o objs/sat/feasibility_pump.o objs/sat/implied_bounds.o objs/sat/integer.o objs/sat/integer_expr.o objs/sat/integer_search.o objs/sat/intervals.o objs/sat/linear_constraint.o objs/sat/linear_constraint_manager.o objs/sat/linear_programming_constraint.o objs/sat/linear_relaxation.o objs/sat/lp_utils.o objs/sat/optimization.o objs/sat/pb_constraint.o objs/sat/precedences.o objs/sat/presolve_context.o objs/sat/presolve_util.o objs/sat/probing.o objs/sat/pseudo_costs.o objs/sat/restart.o objs/sat/rins.o objs/sat/sat_decision.o objs/sat/sat_inprocessing.o objs/sat/sat_solver.o objs/sat/scheduling_constraints.o objs/sat/simplification.o objs/sat/subsolver.o objs/sat/symmetry.o objs/sat/synchronization.o objs/sat/table.o objs/sat/theta_tree.o objs/sat/timetable.o objs/sat/timetable_edgefinding.o objs/sat/util.o objs/sat/zero_half_cuts.o objs/sat/boolean_problem.pb.o objs/sat/cp_model.pb.o objs/sat/sat_parameters.pb.o \
 objs/bop/bop_base.o objs/bop/bop_fs.o objs/bop/bop_lns.o objs/bop/bop_ls.o objs/bop/bop_portfolio.o objs/bop/bop_solution.o objs/bop/bop_solver.o objs/bop/bop_util.o objs/bop/complete_optimizer.o objs/bop/integral_solver.o objs/bop/bop_parameters.pb.o \
 objs/linear_solver/lpi_glop.o objs/linear_solver/bop_interface.o objs/linear_solver/cbc_interface.o objs/linear_solver/clp_interface.o objs/linear_solver/cplex_interface.o objs/linear_solver/glop_interface.o objs/linear_solver/glop_utils.o objs/linear_solver/glpk_interface.o objs/linear_solver/gurobi_environment.o objs/linear_solver/gurobi_interface.o objs/linear_solver/gurobi_proto_solver.o objs/linear_solver/linear_expr.o objs/linear_solver/linear_solver.o objs/linear_solver/linear_solver_callback.o objs/linear_solver/model_exporter.o objs/linear_solver/model_validator.o objs/linear_solver/sat_interface.o objs/linear_solver/sat_proto_solver.o objs/linear_solver/sat_solver_utils.o objs/linear_solver/scip_interface.o objs/linear_solver/scip_proto_solver.o objs/linear_solver/xpress_interface.o objs/linear_solver/linear_solver.pb.o \
 objs/constraint_solver/alldiff_cst.o objs/constraint_solver/assignment.o objs/constraint_solver/constraint_solver.o objs/constraint_solver/constraints.o objs/constraint_solver/count_cst.o objs/constraint_solver/default_search.o objs/constraint_solver/demon_profiler.o objs/constraint_solver/deviation.o objs/constraint_solver/diffn.o objs/constraint_solver/element.o objs/constraint_solver/expr_array.o objs/constraint_solver/expr_cst.o objs/constraint_solver/expressions.o objs/constraint_solver/graph_constraints.o objs/constraint_solver/interval.o objs/constraint_solver/local_search.o objs/constraint_solver/model_cache.o objs/constraint_solver/pack.o objs/constraint_solver/range_cst.o objs/constraint_solver/resource.o objs/constraint_solver/routing.o objs/constraint_solver/routing_breaks.o objs/constraint_solver/routing_flags.o objs/constraint_solver/routing_flow.o objs/constraint_solver/routing_index_manager.o objs/constraint_solver/routing_lp_scheduling.o objs/constraint_solver/routing_neighborhoods.o objs/constraint_solver/routing_parameters.o objs/constraint_solver/routing_sat.o objs/constraint_solver/routing_search.o objs/constraint_solver/sched_constraints.o objs/constraint_solver/sched_expr.o objs/constraint_solver/sched_search.o objs/constraint_solver/search.o objs/constraint_solver/table.o objs/constraint_solver/timetabling.o objs/constraint_solver/trace.o objs/constraint_solver/utilities.o objs/constraint_solver/visitor.o objs/constraint_solver/assignment.pb.o objs/constraint_solver/demon_profiler.pb.o objs/constraint_solver/local_search_stats.pb.o objs/constraint_solver/routing_enums.pb.o objs/constraint_solver/routing_parameters.pb.o objs/constraint_solver/search_limit.pb.o objs/constraint_solver/solver_parameters.pb.o \
    libglog.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags.a  /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_synchronization.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_bad_any_cast_impl.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_bad_optional_access.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_bad_variant_access.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_city.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_civil_time.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_examine_stack.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_failure_signal_handler.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags_config.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags_marshalling.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags_parse.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags_program_name.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags_usage.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_flags_usage_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_graphcycles_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_hash.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_hashtablez_sampler.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_leak_check.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_leak_check_disable.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_log_severity.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_malloc_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_periodic_sampler.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_distributions.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_distribution_test_util.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_pool_urbg.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_randen.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_randen_hwaes.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_randen_hwaes_impl.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_randen_slow.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_seed_material.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_internal_platform.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_seed_gen_exception.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_random_seed_sequences.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_raw_hash_set.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_raw_logging_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_scoped_set_env.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_spinlock_wait.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_stacktrace.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_status.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_str_format_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_strings.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_strings_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_symbolize.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_throw_delegate.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_time.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_time_zone.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_exponential_biased.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_cord.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_int128.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_debugging_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_demangle_internal.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libabsl_base.a  /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libCbcSolver.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libOsiCbc.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libCbc.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libCgl.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libClpSolver.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libOsiClp.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libClp.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libOsi.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libCoinUtils.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libscip.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libnlpi.cppad.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/liblpinone.a /Users/jdek0001/Playground/or-tools/dependencies/install/lib/libtpitny-7.0.1.darwin.x86_64.gnu.opt.a \
 -install_name @rpath/libortools.dylib  -lz  -framework CoreFoundation -Wl,-rpath,@loader_path -Wl,-rpath,@loader_path/../lib -Wl,-rpath,@loader_path/../dependencies/install/lib
clang: error: no such file or directory: 'libglog.a'
clang: error: no such file or directory: '/Users/jdek0001/Playground/or-tools/dependencies/install/lib/libgflags.a'
make: *** [lib/libortools.dylib] Error 1

It looks like something in the configuration is still not fully functioning. Looking for the libraries manually I can find a libglogd.a and libgflags_debug.a/libgflags_nothreads_debug.a in the dependency folders, but indeed not the exact library names that clang seems to be looking for.

Mizux commented 3 years ago

Strange, do you have CXX or something like this defined in your env ? AFAIK glog should have been built in release i.e. you should have had libglog.a without the 'd'.

There is something wrong with your make third_party call. note: you can try to clean everything, make clean, make clean_third_party then test to only build glog using make install_glog

https://github.com/google/or-tools/blob/8d19323faf51f2f004e4de6c1b32a74001fbc7c1/makefiles/Makefile.third_party.unix.mk#L227-L246

Dekker1 commented 3 years ago

I seem to have located the problem. On my computer the default CMake generator is set to be CMAKE_GENERATOR=Ninja Multi-Config. This means that just setting CMAKE_BUILD_TYPE doesn't actually force the correct build type. Instead the actual build commands should include --config Release (i.e. cmake --build build --config Release --target install).

I would suggest that you adjust the makefiles to either force the generator (using the -G flag), or adjust the CMake build commands to include the --config Release flag.