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

Project doesn't compile in cmake please help #258

Open
dayarthvader opened this issue Jul 18, 2018 · 2 comments
Open

Project doesn't compile in cmake please help #258

dayarthvader opened this issue Jul 18, 2018 · 2 comments

Comments

@dayarthvader
Copy link

In file included from /usr/include/c++/5/locale:41:0,
from /usr/include/c++/5/iomanip:43,
from /usr/local/include/zmq.hpp:58,
from /home/nokia/dayaa/base_services/companion/cpp_dev/include/util/ipc_zmq.h:5,
/usr/include/c++/5/bits/locale_facets_nonio.h:59:39: error: ‘locale’ has not been declared
struct __timepunct_cache : public locale::facet

^
/usr/include/c++/5/bits/locale_facets_nonio.h:59:47: error: expected ‘{’ before ‘facet’
struct __timepunct_cache : public locale::facet
^
/usr/include/c++/5/bits/locale_facets_nonio.h:62:7: error: expected primary-expression before ‘static’
static const _CharT* _S_timezones[14];
^
/usr/include/c++/5/bits/locale_facets_nonio.h:62:7: error: expected ‘}’ before ‘static’
/usr/include/c++/5/bits/locale_facets_nonio.h:62:7: error: expected ‘;’ before ‘static’
/usr/include/c++/5/bits/locale_facets_nonio.h:64:13: error: ‘_CharT’ does not name a type
const _CharT* _M_date_format;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:65:13: error: ‘_CharT’ does not name a type
const _CharT* _M_date_era_format;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:66:13: error: ‘_CharT’ does not name a type
const _CharT* _M_time_format;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:67:13: error: ‘_CharT’ does not name a type
const _CharT* _M_time_era_format;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:68:13: error: ‘_CharT’ does not name a type
const _CharT* _M_date_time_format;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:69:13: error: ‘_CharT’ does not name a type
const _CharT* _M_date_time_era_format;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:70:13: error: ‘_CharT’ does not name a type
const _CharT* _M_am;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:71:13: error: ‘_CharT’ does not name a type
const _CharT* _M_pm;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:72:13: error: ‘_CharT’ does not name a type
const _CharT* _M_am_pm_format;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:75:13: error: ‘_CharT’ does not name a type
const _CharT* _M_day1;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:76:13: error: ‘_CharT’ does not name a type
const _CharT* _M_day2;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:77:13: error: ‘_CharT’ does not name a type
const _CharT* _M_day3;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:78:13: error: ‘_CharT’ does not name a type
const _CharT* _M_day4;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:79:13: error: ‘_CharT’ does not name a type
const _CharT* _M_day5;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:80:13: error: ‘_CharT’ does not name a type
const _CharT* _M_day6;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:81:13: error: ‘_CharT’ does not name a type
const _CharT* _M_day7;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:84:13: error: ‘_CharT’ does not name a type
const _CharT* _M_aday1;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:85:13: error: ‘_CharT’ does not name a type
const _CharT* _M_aday2;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:86:13: error: ‘_CharT’ does not name a type
const _CharT* _M_aday3;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:87:13: error: ‘_CharT’ does not name a type
const _CharT* _M_aday4;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:88:13: error: ‘_CharT’ does not name a type
const _CharT* _M_aday5;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:89:13: error: ‘_CharT’ does not name a type
const _CharT* _M_aday6;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:90:13: error: ‘_CharT’ does not name a type
const _CharT* _M_aday7;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:93:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month01;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:94:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month02;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:95:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month03;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:96:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month04;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:97:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month05;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:98:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month06;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:99:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month07;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:100:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month08;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:101:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month09;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:102:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month10;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:103:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month11;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:104:13: error: ‘_CharT’ does not name a type
const _CharT* _M_month12;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:107:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth01;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:108:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth02;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:109:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth03;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:110:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth04;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:111:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth05;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:112:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth06;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:113:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth07;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:114:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth08;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:115:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth09;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:116:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth10;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:117:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth11;
^
/usr/include/c++/5/bits/locale_facets_nonio.h:118:13: error: ‘_CharT’ does not name a type
const _CharT* _M_amonth12;
^
/usr/include/c++/5/bits/locale_facets_nonio.h: In function ‘int util_ns::std::__timepunct_cache(size_t)’:
/usr/include/c++/5/bits/locale_facets_nonio.h:122:42: error: ‘int util_ns::std::__timepunct_cache(size_t)’ redeclared as different kind of symbol
__timepunct_cache(size_t __refs = 0) : facet(__refs),
^
/usr/include/c++/5/bits/locale_facets_nonio.h:59:12: note: previous declaration ‘template struct util_ns::std::__timepunct_cache’
struct __timepunct_cache : public locale::facet
^
/usr/include/c++/5/bits/locale_facets_nonio.h:122:46: error: only constructors take member initializers
__timepunct_cache(size_t __refs = 0) : facet(__refs),
^
/usr/include/c++/5/bits/locale_facets_nonio.h: At global scope:
/usr/include/c++/5/bits/locale_facets_nonio.h:139:25: error: expected class-name before ‘(’ token
__timepunct_cache();
^
/usr/include/c++/5/bits/locale_facets_nonio.h:141:5: error: expected unqualified-id before ‘private’
private:
^
/usr/include/c++/5/bits/locale_facets_nonio.h:146:31: error: invalid use of template-name ‘util_ns::std::__timepunct_cache’ without an argument list
__timepunct_cache(const __timepunct_cache&);
^
/usr/include/c++/5/bits/locale_facets_nonio.h:146:49: error: ‘explicit’ outside class declaration
__timepunct_cache(const __timepunct_cache&);
^
/usr/include/c++/5/bits/locale_facets_nonio.h:146:49: error: ‘int util_ns::std::__timepunct_cache(const int&)’ redeclared as different kind of symbol
/usr/include/c++/5/bits/locale_facets_nonio.h:59:12: note: previous declaration ‘template struct util_ns::std::__timepunct_cache’
struct __timepunct_cache : public locale::facet
^
/usr/include/c++/5/bits/locale_facets_nonio.h:150:5: error: ‘__timepunct_cache’ does not name a type
__timepunct_cache<_CharT>::
__timepunct_cache()
^
/usr/include/c++/5/bits/locale_facets_nonio.h:161:22: error: expected initializer before ‘<’ token
__timepunct_cache::_S_timezones[14];
^
/usr/include/c++/5/bits/locale_facets_nonio.h:166:22: error: expected initializer before ‘<’ token
__timepunct_cache<wchar_t>::_S_timezones[14];
^
/usr/include/c++/5/bits/locale_facets_nonio.h:171:36: error: expected initializer before ‘<’ token
const _CharT* __timepunct_cache<_CharT>::_S_timezones[14];

@dayarthvader
Copy link
Author

While I compiler standalone cpp files it compiles just fine. I used the cmake code given in the end of the readme
find_package(cppzmq)
target_link_libraries(Util uuid curl cppzmq)

@kurdybacha
Copy link
Contributor

Hi @dayarthvader. Some scary error log here :)
This does not look like cppzmq issue. zmq.hpp includes system's <iomanip> for printing message_t and <iomanip> uses locale. For some reason your system locale header is broken. Do you have your own built version of gcc? It would be good to know what compiler version do you use and what operating system. It looks like your compiler was build for different target that does not match yours host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants