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

centos7 make error #97

Open
farmzone-jo opened this issue Oct 11, 2023 · 1 comment
Open

centos7 make error #97

farmzone-jo opened this issue Oct 11, 2023 · 1 comment

Comments

@farmzone-jo
Copy link

farmzone-jo commented Oct 11, 2023

If you try to make in centos7, you will get the following error. Is there any solution?

# sudo make
Making all in src/CglAllDifferent
make[1]: Entering directory `/root/Cgl/src/CglAllDifferent'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/root/Cgl/src/CglAllDifferent'
Making all in src/CglBKClique
make[1]: Entering directory `/root/Cgl/src/CglBKClique'
  CXX      CglBKClique.lo
In file included from /usr/local/include/coin-or/CoinMessageHandler.hpp:10:0,
                 from /usr/local/include/coin/OsiSolverInterface.hpp:13,
                 from /usr/local/include/coin/OsiCut.hpp:9,
                 from /usr/local/include/coin/OsiRowCut.hpp:11,
                 from /usr/local/include/coin/OsiCuts.hpp:13,
                 from CglBKClique.cpp:21:
/usr/local/include/coin-or/CoinTypes.h:18:0: warning: "CoinInt64" redefined [enabled by default]
 #define CoinInt64 COINUTILS_INT64_T
 ^
In file included from /usr/local/include/coin/OsiSolverInterface.hpp:12:0,
                 from /usr/local/include/coin/OsiCut.hpp:9,
                 from /usr/local/include/coin/OsiRowCut.hpp:11,
                 from /usr/local/include/coin/OsiCuts.hpp:13,
                 from CglBKClique.cpp:21:
/usr/include/coin/CoinTypes.hpp:18:0: note: this is the location of the previous definition
 #define CoinInt64 COIN_INT64_T
 ^
In file included from /usr/local/include/coin-or/CoinMessageHandler.hpp:10:0,
                 from /usr/local/include/coin/OsiSolverInterface.hpp:13,
                 from /usr/local/include/coin/OsiCut.hpp:9,
                 from /usr/local/include/coin/OsiRowCut.hpp:11,
                 from /usr/local/include/coin/OsiCuts.hpp:13,
                 from CglBKClique.cpp:21:
/usr/local/include/coin-or/CoinTypes.h:19:0: warning: "CoinUInt64" redefined [enabled by default]
 #define CoinUInt64 COINUTILS_UINT64_T
 ^
In file included from /usr/local/include/coin/OsiSolverInterface.hpp:12:0,
                 from /usr/local/include/coin/OsiCut.hpp:9,
                 from /usr/local/include/coin/OsiRowCut.hpp:11,
                 from /usr/local/include/coin/OsiCuts.hpp:13,
                 from CglBKClique.cpp:21:
/usr/include/coin/CoinTypes.hpp:19:0: note: this is the location of the previous definition
 #define CoinUInt64 COIN_UINT64_T
 ^
In file included from /usr/local/include/coin-or/CoinMessageHandler.hpp:10:0,
                 from /usr/local/include/coin/OsiSolverInterface.hpp:13,
                 from /usr/local/include/coin/OsiCut.hpp:9,
                 from /usr/local/include/coin/OsiRowCut.hpp:11,
                 from /usr/local/include/coin/OsiCuts.hpp:13,
                 from CglBKClique.cpp:21:
/usr/local/include/coin-or/CoinTypes.h:20:0: warning: "CoinIntPtr" redefined [enabled by default]
 #define CoinIntPtr COINUTILS_INTPTR_T
 ^
In file included from /usr/local/include/coin/OsiSolverInterface.hpp:12:0,
                 from /usr/local/include/coin/OsiCut.hpp:9,
                 from /usr/local/include/coin/OsiRowCut.hpp:11,
                 from /usr/local/include/coin/OsiCuts.hpp:13,
                 from CglBKClique.cpp:21:
/usr/include/coin/CoinTypes.hpp:20:0: note: this is the location of the previous definition
 #define CoinIntPtr COIN_INTPTR_T
 ^
CglBKClique.cpp: In member function 'virtual void CglBKClique::refreshSolver(OsiSolverInterface*)':
CglBKClique.cpp:112:10: error: 'class OsiSolverInterface' has no member named 'checkCGraph'
  solver->checkCGraph();
          ^
CglBKClique.cpp: In member function 'virtual void CglBKClique::generateCuts(const OsiSolverInterface&, OsiCuts&, CglTreeInfo)
CglBKClique.cpp:125:42: error: 'const class OsiSolverInterface' has no member named 'getCGraph'
     const CoinConflictGraph *cgraph = si.getCGraph();
                                          ^
CglBKClique.cpp: In member function 'CoinCliqueList* CglBKClique::separateCliques(const OsiSolverInterface&)':
CglBKClique.cpp:187:42: error: 'const class OsiSolverInterface' has no member named 'getCGraph'
     const CoinConflictGraph *cgraph = si.getCGraph();
                                          ^
CglBKClique.cpp: In member function 'CoinCliqueList* CglBKClique::extendCliques(const OsiSolverInterface&, const CoinCliqueLi)':
CglBKClique.cpp:264:42: error: 'const class OsiSolverInterface' has no member named 'getCGraph'
     const CoinConflictGraph *cgraph = si.getCGraph();
                                          ^
make[1]: *** [CglBKClique.lo] Error 1
make[1]: Leaving directory `/root/Cgl/src/CglBKClique'
make: *** [all-recursive] Error 1
@svigerske
Copy link
Member

svigerske commented Oct 11, 2023

For the first warnings, it looks like CoinTypes.h gets included twice, but the include-guards

#ifndef _CoinTypes_h
#define _CoinTypes_h
...

do not work for some reason, so it tries to define CoinInt64 twice.

I cannot say whether that has to do with mixing incompatible versions of COIN-OR packages. CoinUtils looks like it has been installed from the development branch (master), while Osi has been installed from some older stable branch or release which is incompatible with CoinUtils/master. Cgl seem to be its development branch again.

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