NeuralNetworkVerification / Marabou

Other
239 stars 86 forks source link

Installation of Gurobi failed due to version mismatch #777

Closed paulsushmita closed 3 months ago

paulsushmita commented 3 months ago

Hi,

I was trying to install Gurobi for Use LP relaxtion. I installed the Gurobi version 11.0.1 and used the following commands for the setup:

cd /Library/gurobi1101/macos_universal2/src/build/
make
cp libgurobi_c++.a ../../lib/

export GUROBI_HOME="/Library/gurobi1101/macos_universal2"
export PATH="${PATH}:${GUROBI_HOME}/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
cd path/to/Marabou/build
cmake .. -DENABLE_GUROBI=ON

It works seamlessly till this point. cmake --build . However, with the above cmake command, it throws an error:

[ 11%] Building CXX object CMakeFiles/Marabou.dir/src/engine/main.cpp.o
make[2]: *** No rule to make target `/Library/gurobi1101/macos_universal2/lib/libgurobi95.dylib', needed by `Marabou'.  Stop.
make[1]: *** [CMakeFiles/Marabou.dir/all] Error 2
make: *** [all] Error 2

Kindly suggest a fix to make

wu-haoze commented 3 months ago

Hi @paulsushmita , as the error message suggested, currently we only support Gurobi95. At some point, we will support a higher Gurobi version.

paulsushmita commented 3 months ago

Thanks @wu-haoze, for the note. I reverted Gurobi to 9.5.1 as was used in Marabou and tried cmake --build . and it fails at the following step:

[ 11%] Linking CXX executable Marabou
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [Marabou] Error 1
make[1]: *** [CMakeFiles/Marabou.dir/all] Error 2
make: *** [all] Error 2

Please help as to what can be done to resolve this issue?

wu-haoze commented 3 months ago

have you run these steps from the readme when installing gurobi?

cd $INSTALL_DIR/gurobi951/linux64/src/build sudo make sudo cp libgurobi_c++.a ../../lib/

There also seem to be a lot of info about -lcrt0.o being not found on MacOS.. perhaps also worth looking into those.


From: paulsushmita @.> Sent: Monday, March 11, 2024 7:00 PM To: NeuralNetworkVerification/Marabou @.> Cc: Andrew (Haoze) Wu @.>; Mention @.> Subject: Re: [NeuralNetworkVerification/Marabou] Installation of Gurobi failed due to version mismatch (Issue #777)

Thanks @wu-haozehttps://github.com/wu-haoze, for the note. I reverted Gurobi to 9.5.1 as was used in Marabou and tried cmake --build . and it fails at the following step:

[ 11%] Linking CXX executable Marabou ld: library not found for -lcrt0.o clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: [Marabou] Error 1 make[1]: [CMakeFiles/Marabou.dir/all] Error 2 make: *** [all] Error 2

Please help as to what can be done to resolve this issue?

— Reply to this email directly, view it on GitHubhttps://github.com/NeuralNetworkVerification/Marabou/issues/777#issuecomment-1989784176, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACRZF25QTPTVDXR4NU4PJ6DYXZOUBAVCNFSM6AAAAABEPSZCP6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZG44DIMJXGY. You are receiving this because you were mentioned.Message ID: @.***>

paulsushmita commented 3 months ago

Thanks for the help @wu-haoze. I could set up Marabou with Gurobi.