Skip to content

Get USE_ORTOOLS_FETCH_SRC=ON to work again. #161

Open

Description

@aosmw

A build that tries to build ORTOOLS from source currently fails due to conflicts in the use of the custom target "check" which is also used by the absl library.

mkdir -p build;
cd build;
cmake -DCMAKE_BUILD_TYPE=Release -DUSE_ORTOOLS_RELEASE=OFF -DUSE_ORTOOLS_FETCH_SRC=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=ON -DBUILD_TESTS=ON ..;
make -j$(nproc)

CMake Error at CMakeLists.txt:361 (add_custom_target):
add_custom_target cannot create target "check" because another target with
the same name already exists. The existing target is an interface library
created in source directory
"/home/wakem/dev/contrib_github/n2/src/Fields2Cover/build/_deps/abseil-cpp-src/absl/log".
See documentation for policy CMP0002 for more details.

Activity

  1. Gonzalo-Mier commented on Jun 19, 2024

    @Gonzalo-Mier
    Member

    Hi @aosmw, I'm tempted to edit the issue name to "Get USE_ORTOOLS_FETCH_SRC=ON to work", as it has never worked because of this error. Should we remove the option directly?

  2. PoppinLPG commented on Jul 12, 2024

    @PoppinLPG
    mkdir -p build;
    cd build;
    cmake -DCMAKE_BUILD_TYPE=Release -DUSE_ORTOOLS_RELEASE=OFF -DUSE_ORTOOLS_FETCH_SRC=ON -DCMAKE_BUILD_TYPE=Release -DBUILD_PYTHON=ON -DBUILD_TESTS=ON ..;
    make -j$(nproc)
    

    Hi, I've been using the above code to build, but I'm still running into GLIB problems. Any ideas on how to fix this?

  3. deleted a comment from PoppinLPG on Jul 12, 2024
  4. Gonzalo-Mier commented on Jul 12, 2024

    @Gonzalo-Mier
    Member

    Hi @PoppinLPG, please avoid using -DUSE_ORTOOLS_FETCH_SRC=ON. Do this instead:

    mkdir -p build;
    cd build;
    cmake -DUSE_ORTOOLS_RELEASE=ON ..;
    make -j$(nproc)
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions