mluipersbeck / dapcstp

GNU Affero General Public License v3.0
7 stars 8 forks source link

make error on MacOs High Sierra #5

Open edoreld opened 6 years ago

edoreld commented 6 years ago

Hi,

I get the following error when running make from the solver directory on MacOs High Sierra 10.13.5:

g++ -o dapcstp src/bbnode.o src/bbtree.o src/bounds.o src/cputime.o src/heur.o src/inst.o src/main.o src/options.o src/prep.o src/procstatus.o src/sol.o src/stats.o src/timer.o src/util.o -static -lboost_timer -lboost_system -lboost_chrono -lboost_program_options -lboost_filesystem
ld: library not found for -lcrt0.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [dapcstp] Error 1

Doing some searches in google I came across the following comment

This option will not work on Mac OS X unless all libraries (including libgcc.a) have also been compiled with -static. Since neither a static version of libSystem.dylib nor crt0.o are provided, this option is not useful to most people.

So it seems like to solve this problem either the -static flag needs to be removed or all libraries need to be recompiled with static. Is there any chance that one of these options could be implemented ?

floklimm commented 5 years ago

On Fedora 28 it is the same situation. (It does not compile with a -static flag because it does not find boost but removing -static resolves this issue)