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

### Building CoinUtils master error in file included from /usr/include/c++/4.8.2/algorithm:62:0, #128

Open
jczazueta opened this issue Apr 8, 2020 · 7 comments
Assignees

Comments

@jczazueta
Copy link

Hi,
I am Building Cbc and when execute:

~/coinbrew-master/coinbrew build Cbc --prefix=/home/jzazueta/lib –test

Appears the following error:

##################################################
### Building CoinUtils master 
##################################################

In file included from /usr/include/c++/4.8.2/algorithm:62:0,
                 from /home/jzazueta/dependencies/CoinUtils/src/CoinBronKerbosch.cpp:2:
/usr/include/c++/4.8.2/bits/stl_algo.h: In instantiation of ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = BKVertex*; _Tp = BKVertex; _Compare = bool (*)(BKVertex&, const BKVertex&)]’:
/usr/include/c++/4.8.2/bits/stl_algo.h:2296:78:   required from ‘_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = BKVertex*; _Compare = bool (*)(BKVertex&, const BKVertex&)]’
/usr/include/c++/4.8.2/bits/stl_algo.h:2337:62:   required from ‘void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = BKVertex*; _Size = long int; _Compare = bool (*)(BKVertex&, const BKVertex&)]’
/usr/include/c++/4.8.2/bits/stl_algo.h:5499:44:   required from ‘void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = BKVertex*; _Compare = bool (*)(BKVertex&, const BKVertex&)]’
/home/jzazueta/dependencies/CoinUtils/src/CoinBronKerbosch.cpp:343:70:   required from here
/usr/include/c++/4.8.2/bits/stl_algo.h:2266:34: error: invalid initialization of reference of type ‘BKVertex&’ from expression of type ‘const BKVertex’
    while (__comp(__pivot, *__last))
                                  ^
make[2]: *** [CoinBronKerbosch.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1

Build failed, see error output above

May you help me?

Best Regards
Juan Carlos

@tkralphs
Copy link
Member

tkralphs commented Apr 8, 2020

I can't replicate, so you'll have to provide more information. By the way, you still have a wrong character above ("–test"), would be nice to know where that's coming from. --test is now deprecated in favor of --tests which takes arguments 'main, all, or none. The default is "all".

Oh , just saw that you copied from Word. Yes, Word will auto-correct -- to a long dash, you definitely should not copy commands into Word and then back out again.

@jczazueta
Copy link
Author

Hi tkralphs,

I am running with Centos 7 over Virtualbox:

As you see from history

284 cd dependencies/
285 ~/coinbrew-master/coinbrew build Cbc --prefix=/home/jzazueta/lib --test
286 history | tail

The command is typed correctly.
As you suggested, I typed:
$ ~/coinbrew-master/coinbrew build Cbc --prefix=/home/jzazueta/lib --tests
Deploys:
Welcome to the COIN-OR fetch and build utility

For help, run script with --help.

No argument specified with --test.

Best Regards
Juan Carlos

@svigerske svigerske transferred this issue from coin-or/Cbc Apr 8, 2020
@svigerske
Copy link
Member

Looks like the old stdc++ of GCC 4.8 has some problems with that code. Not sure it's worth to work around issues with such an old compiler.

@jczazueta
Copy link
Author

May I upgrade to gcc-8.2.0?

@tkralphs
Copy link
Member

tkralphs commented Apr 8, 2020

You should have no problems with any recent version of gcc.

@jczazueta
Copy link
Author

Well I going to try.

@tkralphs
Copy link
Member

tkralphs commented Apr 9, 2020

In response to #128 (comment), the new option --tests takes an argument, which is one of main, all, or none. You need to specify one of those. The default is now all. If you want to replicate the old behavior of --test, you do --tests main. I updated the error message for not providing an argument, which was a bit confusing.

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

4 participants