Open mengxianye opened 3 years ago
If you're using an M1 MacBook, the correct architecture should be macOS-arm64
, but from the error messages you're receiving, it sounds like you have some libraries built incorrectly for macOS-x86_64
. I'm not exactly sure how to track down the problematic files, but let's start with the following. Try running
objdump --private-header /opt/homebrew/Cellar/clp/1.17.6/lib/libClp.dylib
to see what architecture libClp was compiled for. We want to see ARM, not x86-64. If libClp is okay, list the libraries upon which it depends by running
objdump --dylibs-used --macho /opt/homebrew/Cellar/clp/1.17.6/lib/libClp.dylib
Check each of those with objdump --private-header
to determine if any are x86-64. If so, then there's the problem.
hi, i am trying to run "go get github.com...." to install clp on my M1 macbook. however, it returns the following info:
github.com/lanl/clp
ld: warning: ignoring file /opt/homebrew/Cellar/clp/1.17.6/lib/libClpSolver.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/Cellar/coinutils/2.11.3/lib/libCoinUtils.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 ld: warning: ignoring file /opt/homebrew/Cellar/clp/1.17.6/lib/libClp.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 Undefined symbols for architecture x86_64: "ClpSimplex::dualRanging(int, int const, double, int, double, int, double, double)", referenced from: _dual_ranging in _x005.o "ClpSimplex::loadProblem(CoinPackedMatrix const&, double const, double const, double const, double const, double const, double const)", referenced from: _simplex_load_problem in _x005.o "ClpSimplex::primalRanging(int, int const, double, int, double, int)", referenced from: _primal_ranging in _x005.o "ClpSimplex::reducedGradient(int)", referenced from: _simplex_red_grad in _x005.o "ClpSimplex::dual(int, int)", referenced from: _simplex_dual in _x005.o "ClpSimplex::primal(int, int)", referenced from: _simplex_primal in _x005.o "ClpSimplex::barrier(bool)", referenced from: _simplex_barrier in _x005.o "ClpSimplex::ClpSimplex(bool)", referenced from: _new_simplex_model in _x005.o "ClpSimplex::~ClpSimplex()", referenced from: _free_simplex_model in _x005.o "CoinPackedMatrix::deleteCols(int, int const)", referenced from: _pm_delete_cols in _x005.o "CoinPackedMatrix::setDimensions(int, int)", referenced from: _set_dimensions in _x005.o "CoinPackedMatrix::reserve(int, int, bool)", referenced from: _reserve in _x005.o "CoinPackedMatrix::appendCol(int, int const, double const)", referenced from: _pm_append_col in _x005.o "CoinPackedMatrix::CoinPackedMatrix()", referenced from: _new_packed_matrix in _x005.o "CoinMessageHandler::setLogLevel(int)", referenced from: _new_simplex_model in _x005.o "ClpModel::setMaximumSeconds(double)", referenced from: _set_max_seconds in _x005.o "ClpModel::setPrimalTolerance(double)", referenced from: _simplex_primal_set_tolerance in _x005.o "ClpModel::setMaximumIterations(int)", referenced from: _set_max_iterations in _x005.o "ClpModel::setOptimizationDirection(double)", referenced from: _simplex_set_opt_dir in _x005.o "ClpModel::scaling(int)", referenced from: _simplex_scaling in _x005.o "ClpModel::writeMps(char const, int, int, double) const", referenced from: _write_mps in _x005.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation).
what should I do now? thanks in advance.