Opened 22 months ago

Closed 7 weeks ago

#176 closed task (migrated)

COIN-OR Cbc FTBFS on mips* platforms due to variable name conflict

Reported by: lmy441900 Owned by: tkr
Priority: critical Component: Cbc
Version: 2.9.8 Keywords:
Cc:

Description

When compiling cbc 2.9.8 on Linux mips* platforms, an error will be triggered:

 g++ -DHAVE_CONFIG_H -I. -I. -I../src -I/usr/include/coin -I/usr/include/coin/ -DCOIN_NO_CLP_MESSAGE -DUSE_CBCCONFIG -D_FORTIFY_SOURCE=2 -pipe -Wno-error -fstack-protector-strong --param=ssp-buffer-size=4 -fomit-frame-pointer -O3 -mabi=64 -march=mips64r2 -mtune=loongson3a -fira-loop-pressure -fira-hoist-pressure -ftree-vectorize -specs=/usr/lib/autobuild3/specs/hardened-cc1 -fpermissive -fdeclone-ctor-dtor -ftree-vectorize -DCBC_BUILD -MT CbcBranchDynamic.lo -MD -MP -MF .deps/CbcBranchDynamic.Tpo -c CbcBranchDynamic.cpp  -fPIC -DPIC -o .libs/CbcBranchDynamic.o
CbcModel.hpp:2397:78: error: expected ',' or '...' before numeric constant
     void setMIPStart( const std::vector< std::pair< std::string, double > > &mips ) {
                                                                              ^
CbcModel.hpp: In member function 'void CbcModel::setMIPStart(const std::vector<std::pair<std::basic_string<char>, double> >&)':
CbcModel.hpp:2398:26: error: no match for 'operator=' (operand types are 'std::vector<std::pair<std::basic_string<char>, double> >' and 'int')
        this->mipStart_ = mips;
                          ^

Because of the platform Cbc is built on (tested on mipsel and mips64el) it seems that somewhere ahead of this variable name has a constant definition named 'mips', causing 'mips' here be replaced by a "numeric constant" (it might be 1, representing "True").

This problem prevents Cbc from building on mips* platforms. By replacing the variable name (See our patch: https://github.com/AOSC-Dev/aosc-os-abbs/blob/staging/extra-scientific/cbc/autobuild/patches/CbcModel-hpp-fix-mips-variable-constant-conflict.patch) this problem can be resolved. Enclosing it.

Change History (2)

comment:1 Changed 22 months ago by lmy441900

The method we change the variable name may not be desired (for coding standards), so I'm not uploading it here.

comment:2 Changed 7 weeks ago by stefan

  • Resolution set to migrated
  • Status changed from new to closed

This ticket has been migrated to GitHub and will be resolved there: https://github.com/coin-or/Cbc/issues/176

Note: See TracTickets for help on using tickets.