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

Add support for FreeBSD (amplmp compilation issue) #7

Closed
Mizux opened this issue Sep 22, 2021 · 7 comments
Closed

Add support for FreeBSD (amplmp compilation issue) #7

Mizux opened this issue Sep 22, 2021 · 7 comments

Comments

@Mizux
Copy link

Mizux commented Sep 22, 2021

When trying to build SCIP in our Vagrant generic/FreeBSD13 box (note a FreeBSD VirtualBox img) we are facing some compilation issue...

Observed

here the relevant trace (please notice we are building SCIP using FetchContent from our or-tools CMake based build)

default: [ 48%] Building CXX object _deps/scip-build/src/CMakeFiles/libscip.dir/amplmp/src/os.cpp.o
    default: cd /usr/home/vagrant/project/build/_deps/scip-build/src && /usr/bin/c++  -I/usr/home/vagrant/project/build/_deps/scip-src/src/amplmp/include -I/usr/home/vagrant/project/build/_deps/scip-build -I/usr/home/vagrant/project/build/_deps/scip-src/src -I/usr/home/vagrant/project/build/_deps/zlib-build -I/usr/home/vagrant/project/build/_deps/zlib-src -O3 -DNDEBUG -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -std=c++14 -MD -MT _deps/scip-build/src/CMakeFiles/libscip.dir/amplmp/src/os.cpp.o -MF CMakeFiles/libscip.dir/amplmp/src/os.cpp.o.d -o CMakeFiles/libscip.dir/amplmp/src/os.cpp.o -c /usr/home/vagrant/project/build/_deps/scip-src/src/amplmp/src/os.cpp
    default: /usr/home/vagrant/project/build/_deps/scip-src/src/amplmp/src/os.cpp:108:4: error: GetExecutablePath is not implemented for this system
    default: #  error GetExecutablePath is not implemented for this system
    default:    ^
    default: 1 error generated.
    default: *** Error code 1
    default: 
    default: Stop.
    default: make[2]: stopped in /usr/home/vagrant/project/build
    default: *** Error code 1
    default: 
    default: Stop.
    default: make[1]: stopped in /usr/home/vagrant/project/build
    default: *** Error code 1
    default: 
    default: Stop.
    default: make: stopped in /usr/home/vagrant/project/build
The SSH command responded with a non-zero exit status. Vagrant
assumes that this means the command failed. The output for this command
should be in the log above. Please read the output to determine what
went wrong.

ref: https://github.com/google/or-tools/runs/3672547012?check_suite_focus=true

scip/src/amplmp/src/os.cpp

Lines 107 to 109 in 9444e80

# else
# error GetExecutablePath is not implemented for this system
# endif

Expected

Have support of FreeBSD so we can use it in OR-Tools or at least a dummy function instead of this error message breaking the build ;)
Also it seems that amplmp is only use to read some .nl file so it's sad to break the build for this "optional" feature...

AMPL/MP is used by SCIP to read .nl files.

Annexe

You can found our Vagrantfile here: https://github.com/google/or-tools/blob/master/cmake/vagrant/freebsd/cpp/Vagrantfile

note: I think it should be easy to adapt it to only build SCIP starting from your repo to get rid of or-tools shenanigan and/or add it as a CI job to this repo (if you are willing to use github action workflow) ;)

@Mizux
Copy link
Author

Mizux commented Sep 22, 2021

2min googling around:
https://fossies.org/linux/sccs/libschily/getexecpath.c seems to be a good starting point ;)

@Mizux Mizux changed the title Add support for FreeBSD Add support for FreeBSD (amplmp compilation issue) Sep 22, 2021
@Mizux
Copy link
Author

Mizux commented Sep 22, 2021

FYI: Issue still present in ampl/mp master https://github.com/ampl/mp/blob/master/src/os.cc#L107-L109
todo(me): Open an issue in ampl/mp and linking it to this issue...

@matbesancon
Copy link
Member

matbesancon commented Sep 22, 2021

SCIP itself can be built on FreeBSD, see:
https://github.com/JuliaPackaging/Yggdrasil/blob/master/S/SCIP/build_tarballs.jl
and the compiled artifact here: https://github.com/JuliaBinaryWrappers/SCIP_jll.jl/releases/
It is indeed done without AMPL

@Mizux
Copy link
Author

Mizux commented Sep 22, 2021

@matbesancon thanks ! and shame on me I should have think of disabling AMPL support -_-

option(AMPL "should ampl interface be compiled" ON)

on my way to test it...

@matbesancon
Copy link
Member

No problem :)
should we close this one and leave the issue open on the AMPL repo?

@Mizux
Copy link
Author

Mizux commented Sep 22, 2021

IMHO: Could be closed since I did my duty and open an issue in the ampl repo.
and/or you can also "fix" your CMakeLists.txt by forcing option to OFF (or disabling it) on FreeBSD ;)

@matbesancon
Copy link
Member

thank you, I'll open a corresponding issue on the main scip repo

scip-ci pushed a commit that referenced this issue Oct 5, 2021
- supposed to bring FreeBSD support
  (#7)
- should make #3284 unnecessary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants