afina icon indicating copy to clipboard operation
afina copied to clipboard

Afina падает до main() на CentOS 7 из-за cxxopts

Open aitap opened this issue 8 years ago • 3 comments

[aitap@centos build]$ git log -1
commit d1673be26c9b0202dd56760c4159bc4c54f9baee
Author: Mikhail Plekhanov <[email protected]>
Date:   Wed Oct 4 16:23:55 2017 +0300

    Lecture 4 examples
[aitap@centos build]$ src/afina
terminate called after throwing an instance of 'std::regex_error'
  what():  regex_error
Аварийный останов
[aitap@centos build]$ cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)
[aitap@centos build]$ g++ --version | head -1
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-16)

third-party/cxxopts-1.4.3/include/cxxopts.hpp, строка 433:

 std::basic_regex<char> integer_pattern
        ("(-)?(0x)?([1-9a-zA-Z][0-9a-zA-Z]*)|(0)");

bt full: http://paste.org.ru/?iqjcey

aitap avatar Oct 04 '17 16:10 aitap

Так, проблема в том, что работать будет только с gcc > 4.9, которого из коробки в centos7 нет - моя вина. Сегодня поправлю

xphoenix avatar Oct 05 '17 11:10 xphoenix

В gcc-4.8 не реализован <regex>. Новый GCC можно поставить из Software Collections devtoolset-6, точно так же, как cmake3 было необходимо установить из EPEL.

aitap avatar Oct 13 '17 09:10 aitap

Если есть к кого то желание поискать другую реализацию парсера коммандной строки, милости просим, а то у меня времени совсем почти нет

xphoenix avatar Oct 24 '17 21:10 xphoenix