Related
I have ported my Eclipse project from Ubuntu 16.04, Eclipse version Oxygen to Ubuntu 18.04, the latest Eclipse Version. The tool chain which supported the old program is also installed.
I have ensured that all the environment variables of the tool chain used in the old projects is replicated in the Environment Variable of the new Eclipse. However the following compiler error occurs
typedef pthread_mutex_t __gthread_mutex_t;
^~~~~~~~~~~~~~~
pthread_mutex_init
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:51:9: error: ‘pthread_mutex_t’ does not name a type; did you mean ‘pthread_mutex_init’?
typedef pthread_mutex_t __gthread_recursive_mutex_t;
^~~~~~~~~~~~~~~
pthread_mutex_init
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:52:9: error: ‘pthread_cond_t’ does not name a type; did you mean ‘pthread_cond_wait’?
typedef pthread_cond_t __gthread_cond_t;
^~~~~~~~~~~~~~
pthread_cond_wait
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:108:1: error: ‘pthread_self’ was not declared in this scope
__gthrw(pthread_self)
^
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:108:1: note: suggested alternative: ‘pthread_yield’
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:19: error: ‘__gthread_t’ was not declared in this scope
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:19: note: suggested alternative: ‘__gthrw_’
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~~
__gthrw_
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:32: error: ‘__threadid’ was not declared in this scope
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:32: note: suggested alternative: ‘pthread_yield’
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~~~~~~~
pthread_yield
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:659:44: error: expected primary-expression before ‘void’
__gthread_create (__gthread_t *__threadid, void *(*__func) (void*),
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:660:5: error: expected primary-expression before ‘void’
void *__args)
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:666:17: error: ‘__gthread_t’ was not declared in this scope
__gthread_join (__gthread_t __threadid, void **__value_ptr)
^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:666:17: note: suggested alternative: ‘__gthread_join’
__gthread_join (__gthread_t __threadid, void **__value_ptr)
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:666:41: error: expected primary-expression before ‘void’
__gthread_join (__gthread_t __threadid, void **__value_ptr)
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:672:19: error: ‘__gthread_t’ was not declared in this scope
__gthread_detach (__gthread_t __threadid)
^~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:672:19: note: suggested alternative: ‘__gthread_join’
__gthread_detach (__gthread_t __threadid)
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:678:36: note: suggested alternative: ‘__gthread_join’
__gthread_equal (__gthread_t __t1, __gthread_t __t2)
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:683:15: error: ‘__gthread_t’ does not name a type; did you mean ‘__gthread_join’?
static inline __gthread_t
^~~~~~~~~~~
__gthread_join
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:17: error: ‘__gthread_once_t’ was not declared in this scope
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:17: note: suggested alternative: ‘__gthread_once’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~~~~~~~~~~~
__gthread_once
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:35: error: ‘__once’ was not declared in this scope
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:35: note: suggested alternative: ‘clone’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
clone
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:50: error: ‘__func’ was not declared in this scope
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:50: note: suggested alternative: ‘__unix’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~~~
__unix
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:696:59: error: expected primary-expression before ‘void’
__gthread_once (__gthread_once_t *__once, void (*__func) (void))
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:23: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:23: note: suggested alternative: ‘__gthread_time_t’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:40: error: ‘__key’ was not declared in this scope
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:40: note: suggested alternative: ‘__k8’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~
__k8
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:54: error: ‘__dtor’ was not declared in this scope
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:54: note: suggested alternative: ‘__wur’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~~~
__wur
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:705:63: error: expected primary-expression before ‘void’
__gthread_key_create (__gthread_key_t *__key, void (*__dtor) (void *))
^~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:711:23: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_key_delete (__gthread_key_t __key)
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:711:23: note: suggested alternative: ‘__gthread_time_t’
__gthread_key_delete (__gthread_key_t __key)
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:717:24: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_getspecific (__gthread_key_t __key)
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:717:24: note: suggested alternative: ‘__gthread_time_t’
__gthread_getspecific (__gthread_key_t __key)
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:723:24: error: ‘__gthread_key_t’ was not declared in this scope
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
^~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:723:24: note: suggested alternative: ‘__gthread_time_t’
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
^~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:723:47: error: expected primary-expression before ‘const’
__gthread_setspecific (__gthread_key_t __key, const void *__ptr)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:729:32: error: variable or field ‘__gthread_mutex_init_function’ declared void
__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:729:32: error: ‘__gthread_mutex_t’ was not declared in this scope
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:729:32: note: suggested alternative: ‘__gthread_time_t’
__gthread_mutex_init_function (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:736:26: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:736:26: note: suggested alternative: ‘__gthread_time_t’
__gthread_mutex_destroy (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_time_t
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:745:23: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:745:23: note: suggested alternative: ‘__gthread_mutex_lock’
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:745:42: error: ‘__mutex’ was not declared in this scope
__gthread_mutex_lock (__gthread_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:754:45: note: suggested alternative: ‘__multc3’
__gthread_mutex_trylock (__gthread_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:28: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:28: note: suggested alternative: ‘__gthread_mutex_lock’
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:47: error: ‘__mutex’ was not declared in this scope
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:764:47: note: suggested alternative: ‘__multc3’
__gthread_mutex_timedlock (__gthread_mutex_t *__mutex,
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:765:7: error: expected primary-expression before ‘const’
const __gthread_time_t *__abs_timeout)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:25: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:25: note: suggested alternative: ‘__gthread_mutex_lock’
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:44: error: ‘__mutex’ was not declared in this scope
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:775:44: note: suggested alternative: ‘__multc3’
__gthread_mutex_unlock (__gthread_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:33: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:33: note: suggested alternative: ‘__gthread_recursive_mutex_lock’
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
__gthread_recursive_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:62: error: ‘__mutex’ was not declared in this scope
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:808:62: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:814:36: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:821:67: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_timedlock (__gthread_recursive_mutex_t *__mutex,
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:822:10: error: expected primary-expression before ‘const’
const __gthread_time_t *__abs_timeout)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:35: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:35: note: suggested alternative: ‘__gthread_recursive_mutex_lock’
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
__gthread_recursive_mutex_lock
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:64: error: ‘__mutex’ was not declared in this scope
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:829:64: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:835:36: error: ‘__gthread_recursive_mutex_t’ was not declared in this scope
__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:835:65: error: ‘__mutex’ was not declared in this scope
__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:835:65: note: suggested alternative: ‘__multc3’
__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex)
^~~~~~~
__multc3
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:850:27: error: ‘__gthread_cond_t’ was not declared in this scope
__gthread_cond_broadcast (__gthread_cond_t *__cond)
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:850:27: note: suggested alternative: ‘__gthread_once’
__gthread_cond_broadcast (__gthread_cond_t *__cond)
^~~~~~~~~~~~~~~~
__gthread_once
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:850:45: error: ‘__cond’ was not declared in this scope
__gthread_cond_broadcast (__gthread_cond_t *__cond)
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:862:40: error: ‘__cond’ was not declared in this scope
__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:862:40: note: suggested alternative: ‘lconv’
__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
^~~~~~
lconv
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:862:48: error: ‘__gthread_mutex_t’ was not declared in this scope
__gthread_cond_wait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex)
^~~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:27: error: ‘__gthread_cond_t’ was not declared in this scope
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:27: note: suggested alternative: ‘__gthread_cond_wait’
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~~~~~~~~~~~
__gthread_cond_wait
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:45: error: ‘__cond’ was not declared in this scope
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:868:45: note: suggested alternative: ‘lconv’
__gthread_cond_timedwait (__gthread_cond_t *__cond, __gthread_mutex_t *__mutex,
^~~~~~
lconv
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:869:6: error: expected primary-expression before ‘const’
const __gthread_time_t *__abs_timeout)
^~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:875:32: error: ‘__gthread_cond_t’ was not declared in this scope
__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
^~~~~~~~~~~~~~~~
/usr/include/x86_64-linux-gnu/c++/7/bits/gthr-default.h:875:32: note: suggested alternative: ‘__gthread_cond_wait’
__gthread_cond_wait_recursive (__gthread_cond_t *__cond,
^~~~~~~~~~~~~~~~
__gthread_cond_wait
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:48:9: error: ‘__ino_t’ does not name a type; did you mean ‘__int8_t’?
typedef __ino_t ino_t;
^~~~~~~
__int8_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:55:9: error: ‘__ino64_t’ does not name a type; did you mean ‘__int64_t’?
typedef __ino64_t ino64_t;
^~~~~~~~~
__int64_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:60:9: error: ‘__dev_t’ does not name a type; did you mean ‘lldiv_t’?
typedef __dev_t dev_t;
^~~~~~~
lldiv_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:70:9: error: ‘__mode_t’ does not name a type; did you mean ‘__size_t’?
typedef __mode_t mode_t;
^~~~~~~~
__size_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:75:9: error: ‘__nlink_t’ does not name a type; did you mean ‘__uint8_t’?
typedef __nlink_t nlink_t;
^~~~~~~~~
__uint8_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/select.h:64:24: note: suggested alternative: ‘FD_SETSIZE’
__fd_mask fds_bits[__FD_SETSIZE / __NFDBITS];
^~~~~~~~~~~~
FD_SETSIZE
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/sys/types.h:246:9: error: ‘__blkcnt64_t’ does not name a type; did you mean ‘__uint64_t’?
typedef __blkcnt64_t blkcnt64_t; /* Type to count number of disk blocks. */
^~~~~~~~~~~~
__uint64_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:337:9: error: ‘__ssize_t’ does not name a type; did you mean ‘__size_t’?
typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
^~~~~~~~~
__size_t
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:362:9: error: ‘__io_read_fn’ does not name a type; did you mean ‘__io_seek_fn’?
typedef __io_read_fn cookie_read_function_t;
^~~~~~~~~~~~
__io_seek_fn
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:466:8: error: ‘__ssize_t’ does not name a type; did you mean ‘__size_t’?
extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t);
^
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:469:8: error: ‘__off64_t’ does not name a type; did you mean ‘_IO_off64_t’?
extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int);
^
/opt/fsl-imx-xwayland/4.14-sumo/sysroots/aarch64-poky-linux/usr/include/bits/libio.h:470:8: error: ‘__off64_t’ does not name a type; did you mean ‘_IO_off64_t’?
extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int);
^
/usr/include/c++/7/bits/locale_classes.h:386:12: error: ‘__gthread_once_t’ does not name a type; did you mean ‘__gthread_once’?
static __gthread_once_t _S_once;
^~~~~~~~~~~~~~~~
__gthread_once
In file included from /usr/include/x86_64-linux-gnu/c++/7/bits/basic_file.h:40:0,
from /usr/include/c++/7/fstream:42,
from ../src/utility/readpng.cpp:9:
/usr/include/x86_64-linux-gnu/c++/7/bits/c++io.h:42:11: error: ‘__gthread_mutex_t’ does not name a type; did you mean ‘__gthread_mutex_lock’?
typedef __gthread_mutex_t __c_lock;
^~~~~~~~~~~~~~~~~
__gthread_mutex_lock
In file included from /usr/include/c++/7/fstream:42:0,
from ../src/utility/readpng.cpp:9:
/usr/include/x86_64-linux-gnu/c++/7/bits/basic_file.h:63:28: error: expected ‘)’ before ‘*’ token
__basic_file(__c_lock* __lock = 0) throw ();
^
/usr/include/x86_64-linux-gnu/c++/7/bits/basic_file.h:66:41: error: ‘__c_lock’ has not been declared
__basic_file(__basic_file&& __rv, __c_lock* __lock = 0) noexcept
^~~~~~~~
In file included from ../src/utility/readpng.cpp:9:0:
/usr/include/c++/7/fstream:107:7: error: ‘__c_lock’ does not name a type; did you mean ‘__c_locale’?
__c_lock _M_lock;
^~~~~~~~
__c_locale
In file included from /usr/include/c++/7/fstream:1081:0,
from ../src/utility/readpng.cpp:9:
/usr/include/c++/7/bits/fstream.tcc: In constructor ‘std::basic_filebuf<_CharT, _Traits>::basic_filebuf()’:
/usr/include/c++/7/bits/fstream.tcc:80:43: error: class ‘std::basic_filebuf<_CharT, _Traits>’ does not have any field named ‘_M_lock’
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:80:63: error: ‘_M_lock’ was not declared in this scope
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:80:63: note: suggested alternative: ‘_M_seek’
basic_filebuf() : __streambuf_type(), _M_lock(), _M_file(&_M_lock),
^~~~~~~
_M_seek
/usr/include/c++/7/bits/fstream.tcc: In constructor ‘std::basic_filebuf<_CharT, _Traits>::basic_filebuf(std::basic_filebuf<_CharT, _Traits>&&)’:
/usr/include/c++/7/bits/fstream.tcc:97:5: error: class ‘std::basic_filebuf<_CharT, _Traits>’ does not have any field named ‘_M_lock’
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:97:51: error: ‘_M_lock’ was not declared in this scope
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
/usr/include/c++/7/bits/fstream.tcc:97:51: note: suggested alternative: ‘_M_seek’
_M_lock(), _M_file(std::move(__rhs._M_file), &_M_lock),
^~~~~~~
_M_seek
make: *** [src/utility/readpng.o] Error 1
src/subdir.mk:18: recipe for target 'src/utility/readpng.o' failed
"make all" terminated with exit code 2. Build might be incomplete.
08:18:21 Build Failed. 5503 errors, 0 warnings. (took 35s.340ms)
Error log reduced to fit word count limits
Steps I have taken to solve the problem
Check all the environment variables in new Eclipse again
Look through the build message:
I found statements like "/usr/include/c++/7/...........", I could not understand why does the compiler path to my host directory instead of the tool chain directory' and I found error linked to glib
Then I went to my C/C++ Build >> Settings >> tool settings, I search through each and every includes but it does not path to my host directory
The only difference I found is that a different compiler is used, I have use the Linux Compiler in the Tool Chain Editor. but I do not see why it matters as I have compiled another cross compile project with other toolchain. They compiled successfully
Am at a loss of what could be the problem? need some direction
Thanks
The problem seem to be an old compiler I have..without removing the compiler settings...everything returned to normal it seem but if i removed it in favour of the Linux GCC...all hell break lose
after using cmake on my opencv build folder, I used cmd to run mingw32-make and got the following error.
In file included from C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp:14,
from C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:6:
C:/opencv/sources/modules/core/include/opencv2/core/utils/logtag.hpp:18:5: error: 'LogLevel' does not name a type
LogLevel level;
^~~~~~~~
C:/opencv/sources/modules/core/include/opencv2/core/utils/logtag.hpp:20:38: error: 'LogLevel' has not been declared
inline LogTag(const char* _name, LogLevel _level)
^~~~~~~~
C:/opencv/sources/modules/core/include/opencv2/core/utils/logtag.hpp: In constructor 'cv::utils::logging::LogTag::LogTag(const char*, int)':
C:/opencv/sources/modules/core/include/opencv2/core/utils/logtag.hpp:22:11: error: class 'cv::utils::logging::LogTag' does not have any field named 'level'
, level(_level)
^~~~~
In file included from C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp:15,
from C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:6:
C:\opencv\sources\modules\core\src\utils\logtagconfig.hpp: At global scope:
C:\opencv\sources\modules\core\src\utils\logtagconfig.hpp:20:5: error: 'LogLevel' does not name a type
LogLevel level;
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfig.hpp:34:48: error: 'LogLevel' has not been declared
LogTagConfig(const std::string& _namePart, LogLevel _level, bool _isGlobal = false,
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfig.hpp: In constructor 'cv::utils::logging::LogTagConfig::LogTagConfig()':
C:\opencv\sources\modules\core\src\utils\logtagconfig.hpp:27:11: error: class 'cv::utils::logging::LogTagConfig' does not have any field named 'level'
, level()
^~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfig.hpp: In constructor 'cv::utils::logging::LogTagConfig::LogTagConfig(const string&, int, bool, bool, bool)':
C:\opencv\sources\modules\core\src\utils\logtagconfig.hpp:37:11: error: class 'cv::utils::logging::LogTagConfig' does not have any field named 'level'
, level(_level)
^~~~~
In file included from C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:6:
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp: At global scope:
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp:24:32: error: expected ')' before 'defaultUnconfiguredGlobalLevel'
LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel = LOG_LEVEL_VERBOSE);
~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
)
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp:40:49: error: 'LogLevel' has not been declared
void parseWildcard(const std::string& name, LogLevel level);
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp:41:22: error: 'LogLevel' was not declared in this scope
static std::pair<LogLevel, bool> parseLogLevel(const std::string& s);
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp:41:36: error: template argument 1 is invalid
static std::pair<LogLevel, bool> parseLogLevel(const std::string& s);
^
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.hpp:42:33: error: 'LogLevel' has not been declared
static std::string toString(LogLevel level);
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:12:39: error: expected constructor, destructor, or type conversion before '(' token
LogTagConfigParser::LogTagConfigParser(LogLevel defaultUnconfiguredGlobalLevel)
^
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: In member function 'void cv::utils::logging::LogTagConfigParser::parseNameAndLevel(const string&)':
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:105:25: error: request for member 'second' in 'parsedLevel', which is of non-class type 'int'
if (parsedLevel.second)
^~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:108:43: error: request for member 'first' in 'parsedLevel', which is of non-class type 'int'
parseWildcard("", parsedLevel.first);
^~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:132:21: error: request for member 'second' in 'parsedLevel', which is of non-class type 'int'
if (parsedLevel.second)
^~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:134:59: error: request for member 'first' in 'parsedLevel', which is of non-class type 'int'
parseWildcard(s.substr(0u, colonIdx), parsedLevel.first);
^~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: At global scope:
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:146:65: error: 'LogLevel' has not been declared
void LogTagConfigParser::parseWildcard(const std::string& name, LogLevel level)
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: In member function 'void cv::utils::logging::LogTagConfigParser::parseWildcard(const string&, int)':
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:152:24: error: 'struct cv::utils::logging::LogTagConfig' has no member named 'level'
m_parsedGlobal.level = level;
^~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:158:24: error: 'struct cv::utils::logging::LogTagConfig' has no member named 'level'
m_parsedGlobal.level = level;
^~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:164:24: error: 'struct cv::utils::logging::LogTagConfig' has no member named 'level'
m_parsedGlobal.level = level;
^~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:175:24: error: 'struct cv::utils::logging::LogTagConfig' has no member named 'level'
m_parsedGlobal.level = level;
^~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: At global scope:
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:193:11: error: 'LogLevel' was not declared in this scope
std::pair<LogLevel, bool> LogTagConfigParser::parseLogLevel(const std::string& s)
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:193:25: error: template argument 1 is invalid
std::pair<LogLevel, bool> LogTagConfigParser::parseLogLevel(const std::string& s)
^
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: In static member function 'static int cv::utils::logging::LogTagConfigParser::parseLogLevel(const string&)':
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:195:47: error: 'LOG_LEVEL_VERBOSE' was not declared in this scope
const auto falseDontCare = std::make_pair(LOG_LEVEL_VERBOSE, false);
^~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:195:47: note: suggested alternative: 'CV_LOG_LEVEL_VERBOSE'
const auto falseDontCare = std::make_pair(LOG_LEVEL_VERBOSE, false);
^~~~~~~~~~~~~~~~~
CV_LOG_LEVEL_VERBOSE
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:196:40: error: 'LogLevel' has not been declared
const auto make_parsed_result = [](LogLevel lev) -> std::pair<LogLevel, bool>
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:196:67: error: 'LogLevel' was not declared in this scope
const auto make_parsed_result = [](LogLevel lev) -> std::pair<LogLevel, bool>
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:196:67: note: suggested alternative: 'parseLogLevel'
const auto make_parsed_result = [](LogLevel lev) -> std::pair<LogLevel, bool>
^~~~~~~~
parseLogLevel
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:196:81: error: template argument 1 is invalid
const auto make_parsed_result = [](LogLevel lev) -> std::pair<LogLevel, bool>
^
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: In lambda function:
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:198:40: error: cannot convert 'std::pair<int, bool>' to 'int' in return
return std::make_pair(lev, true);
^
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: In static member function 'static int cv::utils::logging::LogTagConfigParser::parseLogLevel(const string&)':
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:209:43: error: 'LOG_LEVEL_SILENT' was not declared in this scope
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:209:43: note: suggested alternative: 'CV_LOG_LEVEL_SILENT'
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
CV_LOG_LEVEL_SILENT
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:216:43: error: 'LOG_LEVEL_DEBUG' was not declared in this scope
return make_parsed_result(LOG_LEVEL_DEBUG);
^~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:216:43: note: suggested alternative: 'CV_LOG_LEVEL_DEBUG'
return make_parsed_result(LOG_LEVEL_DEBUG);
^~~~~~~~~~~~~~~
CV_LOG_LEVEL_DEBUG
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:221:43: error: 'LOG_LEVEL_SILENT' was not declared in this scope
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:221:43: note: suggested alternative: 'CV_LOG_LEVEL_SILENT'
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
CV_LOG_LEVEL_SILENT
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:228:43: error: 'LOG_LEVEL_ERROR' was not declared in this scope
return make_parsed_result(LOG_LEVEL_ERROR);
^~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:228:43: note: suggested alternative: 'CV_LOG_LEVEL_ERROR'
return make_parsed_result(LOG_LEVEL_ERROR);
^~~~~~~~~~~~~~~
CV_LOG_LEVEL_ERROR
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:235:43: error: 'LOG_LEVEL_FATAL' was not declared in this scope
return make_parsed_result(LOG_LEVEL_FATAL);
^~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:235:43: note: suggested alternative: 'CV_LOG_LEVEL_FATAL'
return make_parsed_result(LOG_LEVEL_FATAL);
^~~~~~~~~~~~~~~
CV_LOG_LEVEL_FATAL
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:242:43: error: 'LOG_LEVEL_INFO' was not declared in this scope
return make_parsed_result(LOG_LEVEL_INFO);
^~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:242:43: note: suggested alternative: 'CV_LOG_LEVEL_INFO'
return make_parsed_result(LOG_LEVEL_INFO);
^~~~~~~~~~~~~~
CV_LOG_LEVEL_INFO
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:248:43: error: 'LOG_LEVEL_SILENT' was not declared in this scope
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:248:43: note: suggested alternative: 'CV_LOG_LEVEL_SILENT'
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
CV_LOG_LEVEL_SILENT
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:255:43: error: 'LOG_LEVEL_SILENT' was not declared in this scope
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:255:43: note: suggested alternative: 'CV_LOG_LEVEL_SILENT'
return make_parsed_result(LOG_LEVEL_SILENT);
^~~~~~~~~~~~~~~~
CV_LOG_LEVEL_SILENT
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:271:43: error: 'LOG_LEVEL_WARNING' was not declared in this scope
return make_parsed_result(LOG_LEVEL_WARNING);
^~~~~~~~~~~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:271:43: note: suggested alternative: 'CV_LOG_LEVEL_WARN'
return make_parsed_result(LOG_LEVEL_WARNING);
^~~~~~~~~~~~~~~~~
CV_LOG_LEVEL_WARN
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp: At global scope:
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:282:42: error: 'std::__cxx11::string cv::utils::logging::LogTagConfigParser::toString' is not a static data member of 'class cv::utils::logging::LogTagConfigParser'
std::string LogTagConfigParser::toString(LogLevel level)
^~~~~~~~
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:282:42: error: 'LogLevel' was not declared in this scope
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:282:42: note: suggested alternative: 'parseLogLevel'
std::string LogTagConfigParser::toString(LogLevel level)
^~~~~~~~
parseLogLevel
C:\opencv\sources\modules\core\src\utils\logtagconfigparser.cpp:283:1: error: expected ',' or ';' before '{' token
{
^
mingw32-make[2]: *** [modules\core\CMakeFiles\opencv_core.dir\build.make:1258: modules/core/CMakeFiles/opencv_core.dir/src/utils/logtagconfigparser.cpp.obj] Error 1
mingw32-make[1]: *** [CMakeFiles\Makefile2:2318: modules/core/CMakeFiles/opencv_core.dir/all] Error 2
mingw32-make: *** [Makefile:182: all] Error 2
Please how do i solve this, and what is LogLevel?.
At first i was using Mingw then i ran into a "mutex" issue.So i changed to Mingw64 to solve it, the I arrived at this problem. Is there a library I'm missing cause I havent found what LogLevel is.
I am trying to replicate tensorflow serving examples from https://tensorflow.github.io/serving/serving_advanced.html
But I get following error. It is possibly Tensorflow library error. Any help will be greatly appreciated.
:
~/serving$ bazel build //tensorflow_serving/example:mnist_inference_2
INFO: Found 1 target...
ERROR: /home/ubuntu/serving/tensorflow_serving/session_bundle/BUILD:125:1: C++ compilation of rule '//tensorflow_serving/session_bundle:session_bundle' failed: gcc failed: error executing command /usr/bin/gcc -U_FORTIFY_SOURCE '-D_FORTIFY_SOURCE=1' -fstack-protector -Wall -Wl,-z,-relro,-z,now -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer '-std=c++0x' -iquote . ... (remaining 103 argument(s) skipped): com.google.devtools.build.lib.shell.BadExitStatusException: Process exited with status 1.
In file included from ./tensorflow_serving/session_bundle/session_bundle.h:30:0,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
./tensorflow_serving/session_bundle/signature.h:40:22: error: 'Signatures' has not been declared
Signatures* signatures);
^
./tensorflow_serving/session_bundle/signature.h:43:28: error: 'Signatures' does not name a type
Status SetSignatures(const Signatures& signatures,
^
./tensorflow_serving/session_bundle/signature.h:43:40: error: ISO C++ forbids declaration of 'signatures' with no type [-fpermissive]
Status SetSignatures(const Signatures& signatures,
^
./tensorflow_serving/session_bundle/signature.h:51:5: error: 'ClassificationSignature' has not been declared
ClassificationSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:58:5: error: 'ClassificationSignature' has not been declared
ClassificationSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:64:31: error: 'RegressionSignature' has not been declared
RegressionSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:73:32: error: 'ClassificationSignature' does not name a type
Status RunClassification(const ClassificationSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:73:57: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status RunClassification(const ClassificationSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:83:28: error: 'RegressionSignature' does not name a type
Status RunRegression(const RegressionSignature& signature, const Tensor& input,
^
./tensorflow_serving/session_bundle/signature.h:83:49: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status RunRegression(const RegressionSignature& signature, const Tensor& input,
^
./tensorflow_serving/session_bundle/signature.h:90:28: error: 'GenericSignature' has not been declared
GenericSignature* signature);
^
./tensorflow_serving/session_bundle/signature.h:94:28: error: 'Signature' has not been declared
Signature* default_signature);
^
./tensorflow_serving/session_bundle/signature.h:100:26: error: 'Signature' has not been declared
Signature* default_signature);
^
./tensorflow_serving/session_bundle/signature.h:106:32: error: 'GenericSignature' does not name a type
Status BindGenericInputs(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:106:50: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status BindGenericInputs(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:117:31: error: 'GenericSignature' does not name a type
Status BindGenericNames(const GenericSignature& signature,
^
./tensorflow_serving/session_bundle/signature.h:117:49: error: ISO C++ forbids declaration of 'signature' with no type [-fpermissive]
Status BindGenericNames(const GenericSignature& signature,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:49: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:49: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:68:58: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:68:58: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc: In function 'void tensorflow::serving::{anonymous}::AddAssetsTensorsToInputs(tensorflow::StringPiece, const int&, std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >*)':
tensorflow_serving/session_bundle/session_bundle.cc:70:20: error: request for member 'empty' in 'asset_files', which is of non-class type 'const int'
if (!asset_files.empty()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: error: no matching function for call to 'begin(const int&)'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: candidates are:
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types '_Tp [_Nm]' and 'const int'
for (auto& asset : asset_files) {
^
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:58:5: error: request for member 'begin' in '__cont', which is of non-class type 'const int'
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^
/usr/include/c++/4.8/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = const int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:48:5: error: request for member 'begin' in '__cont', which is of non-class type 'const int'
In file included from /usr/include/c++/4.8/utility:74:0,
from /usr/include/c++/4.8/tuple:38,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/initializer_list:89:5: note: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:89:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:71:24: error: no matching function for call to 'end(const int&)'
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: candidates are:
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template<class _Tp, long unsigned int _Nm> _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^
/usr/include/c++/4.8/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types '_Tp [_Nm]' and 'const int'
for (auto& asset : asset_files) {
^
In file included from /usr/include/c++/4.8/string:51:0,
from /usr/include/c++/4.8/stdexcept:39,
from /usr/include/c++/4.8/array:38,
from /usr/include/c++/4.8/tuple:39,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:78:5: error: request for member 'end' in '__cont', which is of non-class type 'const int'
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^
/usr/include/c++/4.8/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
/usr/include/c++/4.8/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = const int]':
tensorflow_serving/session_bundle/session_bundle.cc:71:24: required from here
/usr/include/c++/4.8/bits/range_access.h:68:5: error: request for member 'end' in '__cont', which is of non-class type 'const int'
In file included from /usr/include/c++/4.8/utility:74:0,
from /usr/include/c++/4.8/tuple:38,
from /usr/include/c++/4.8/functional:55,
from /usr/include/c++/4.8/memory:79,
from ./tensorflow_serving/session_bundle/session_bundle.h:21,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/initializer_list:99:5: note: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^
/usr/include/c++/4.8/initializer_list:99:5: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:71:24: note: mismatched types 'std::initializer_list<_Tp>' and 'int'
for (auto& asset : asset_files) {
^
tensorflow_serving/session_bundle/session_bundle.cc:76:69: error: no matching function for call to 'std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >::push_back(<brace-enclosed initializer list>)'
{asset.tensor_binding().tensor_name(), assets_file_tensor});
^
tensorflow_serving/session_bundle/session_bundle.cc:76:69: note: candidates are:
In file included from /usr/include/c++/4.8/vector:64:0,
from external/protobuf/src/google/protobuf/unknown_field_set.h:43,
from external/protobuf/src/google/protobuf/metadata.h:43,
from bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/core/lib/core/error_codes.pb.h:25,
from external/org_tensorflow/tensorflow/core/lib/core/status.h:22,
from ./tensorflow_serving/session_bundle/session_bundle.h:23,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<std::basic_string<char>, tensorflow::Tensor>; _Alloc = std::allocator<std::pair<std::basic_string<char>, tensorflow::Tensor> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::basic_string<char>, tensorflow::Tensor>]
push_back(const value_type& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:901:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<std::basic_string<char>, tensorflow::Tensor>&}'
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = std::pair<std::basic_string<char>, tensorflow::Tensor>; _Alloc = std::allocator<std::pair<std::basic_string<char>, tensorflow::Tensor> >; std::vector<_Tp, _Alloc>::value_type = std::pair<std::basic_string<char>, tensorflow::Tensor>]
push_back(value_type&& __x)
^
/usr/include/c++/4.8/bits/stl_vector.h:919:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::vector<std::pair<std::basic_string<char>, tensorflow::Tensor> >::value_type&& {aka std::pair<std::basic_string<char>, tensorflow::Tensor>&&}'
tensorflow_serving/session_bundle/session_bundle.cc: At global scope:
tensorflow_serving/session_bundle/session_bundle.cc:103:39: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:103:39: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:103:48: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:103:48: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc:117:36: error: 'AssetFile' was not declared in this scope
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:117:36: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:117:45: error: template argument 1 is invalid
const std::vector<AssetFile>& asset_files,
^
tensorflow_serving/session_bundle/session_bundle.cc:117:45: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc: In function 'tensorflow::Status tensorflow::serving::LoadSessionBundleFromPath(const tensorflow::SessionOptions&, tensorflow::StringPiece, tensorflow::serving::SessionBundle*)':
tensorflow_serving/session_bundle/session_bundle.cc:165:15: error: 'AssetFile' was not declared in this scope
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:165:15: note: suggested alternative:
In file included from ./tensorflow_serving/session_bundle/manifest.pb.h:19:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:29,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/contrib/session_bundle/manifest.pb.h:237:7: note: 'tensorflow::contrib::AssetFile'
class AssetFile : public ::google::protobuf::Message {
^
tensorflow_serving/session_bundle/session_bundle.cc:165:24: error: template argument 1 is invalid
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:165:24: error: template argument 2 is invalid
tensorflow_serving/session_bundle/session_bundle.cc:165:37: error: invalid type in declaration before ';' token
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:170:17: error: expected ';' before 'asset_file'
AssetFile asset_file;
^
tensorflow_serving/session_bundle/session_bundle.cc:171:25: error: the value of 'AssetFile' is not usable in a constant expression
if (!any_asset.Is<AssetFile>()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:165:15: note: 'AssetFile' was not declared 'constexpr'
std::vector<AssetFile> asset_files;
^
tensorflow_serving/session_bundle/session_bundle.cc:171:36: error: no matching function for call to 'google::protobuf::Any::Is() const'
if (!any_asset.Is<AssetFile>()) {
^
tensorflow_serving/session_bundle/session_bundle.cc:171:36: note: candidate is:
In file included from bazel-out/local-fastbuild/genfiles/external/org_tensorflow/tensorflow/core/protobuf/meta_graph.pb.h:32:0,
from ./tensorflow_serving/session_bundle/session_bundle.h:25,
from tensorflow_serving/session_bundle/session_bundle.cc:16:
external/protobuf/src/google/protobuf/any.pb.h:66:29: note: template<class T> bool google::protobuf::Any::Is() const
template<typename T> bool Is() const {
^
external/protobuf/src/google/protobuf/any.pb.h:66:29: note: template argument deduction/substitution failed:
tensorflow_serving/session_bundle/session_bundle.cc:174:13: error: 'asset_file' was not declared in this scope
asset_file.descriptor()->full_name(), ". Got: ",
^
tensorflow_serving/session_bundle/session_bundle.cc:178:32: error: 'asset_file' was not declared in this scope
if (!any_asset.UnpackTo(&asset_file)) {
^
tensorflow_serving/session_bundle/session_bundle.cc:182:19: error: request for member 'push_back' in 'asset_files', which is of non-class type 'int'
asset_files.push_back(asset_file);
^
tensorflow_serving/session_bundle/session_bundle.cc:182:29: error: 'asset_file' was not declared in this scope
asset_files.push_back(asset_file);
^
Target //tensorflow_serving/example:mnist_inference_2 failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.822s, Critical Path: 4.54s
From the page you linked: "Before getting started, please complete the prerequisites."
The type Signatures is defined in a header generated by following said prereqs process, so you've either not followed those steps or not followed them correctly – there's no way to tell which just from the compiler errors.
Recently pulled some code to a new system, and I'm having some trouble compiling chrono_io and ratio_io.
I'm unsure what to change, since the errors appear to affect the preprocessor.
It seems like it must be a cross-platform compatibility issue for which the code doesn't account.
Any ideas how I can resolve these preprocessor and compiler errors?
In file included from Test.cc:12:0:
chrono_io:221:18: error: missing binary operator before token "("
#if __has_feature(cxx_rvalue_references)
^
chrono_io:789:18: error: missing binary operator before token "("
#if __has_feature(cxx_rvalue_references)
^
chrono_io:821:18: error: missing binary operator before token "("
#if __has_feature(cxx_rvalue_references)
^
chrono_io:833:18: error: missing binary operator before token "("
#if __has_feature(cxx_rvalue_references)
^
chrono_io:845:18: error: missing binary operator before token "("
#if __has_feature(cxx_rvalue_references)
^
chrono_io:858:18: error: missing binary operator before token "("
#if __has_feature(cxx_rvalue_references)
^
chrono_io:885:18: error: missing binary operator before token "("
#if __has_feature(cxx_rvalue_references)
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:36:1: error: ‘_LIBCPP_BEGIN_NAMESPACE_STD’ does not name a type
_LIBCPP_BEGIN_NAMESPACE_STD
^
ratio_io:46:1: error: ‘basic_string’ does not name a type
basic_string<_CharT>
^
ratio_io:58:8: error: ‘ratio_string’ is not a class template
struct ratio_string<atto, char>
^
ratio_io:58:21: error: ‘atto’ was not declared in this scope
struct ratio_string<atto, char>
^
ratio_io:58:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:513:47: note: ‘std::atto’
typedef ratio<1, 1000000000000000000> atto;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:59:1: error: explicit specialization of non-template ‘ratio_string’
{
^
ratio_io:60:12: error: ‘string’ does not name a type
static string symbol() {return string(1, 'a');}
^
ratio_io:61:12: error: ‘string’ does not name a type
static string prefix() {return string("atto");}
^
ratio_io:83:8: error: ‘ratio_string’ is not a class template
struct ratio_string<atto, wchar_t>
^
ratio_io:83:21: error: ‘atto’ was not declared in this scope
struct ratio_string<atto, wchar_t>
^
ratio_io:83:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:513:47: note: ‘std::atto’
typedef ratio<1, 1000000000000000000> atto;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:83:34: error: ‘ratio_string’ is not a template type
struct ratio_string<atto, wchar_t>
^
ratio_io:92:8: error: ‘ratio_string’ is not a class template
struct ratio_string<femto, char>
^
ratio_io:92:21: error: ‘femto’ was not declared in this scope
struct ratio_string<femto, char>
^
ratio_io:92:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:514:47: note: ‘std::femto’
typedef ratio<1, 1000000000000000> femto;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:92:32: error: ‘ratio_string’ is not a template type
struct ratio_string<femto, char>
^
ratio_io:117:8: error: ‘ratio_string’ is not a class template
struct ratio_string<femto, wchar_t>
^
ratio_io:117:21: error: ‘femto’ was not declared in this scope
struct ratio_string<femto, wchar_t>
^
ratio_io:117:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:514:47: note: ‘std::femto’
typedef ratio<1, 1000000000000000> femto;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:117:35: error: ‘ratio_string’ is not a template type
struct ratio_string<femto, wchar_t>
^
ratio_io:126:8: error: ‘ratio_string’ is not a class template
struct ratio_string<pico, char>
^
ratio_io:126:21: error: ‘pico’ was not declared in this scope
struct ratio_string<pico, char>
^
ratio_io:126:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:515:47: note: ‘std::pico’
typedef ratio<1, 1000000000000> pico;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:126:31: error: ‘ratio_string’ is not a template type
struct ratio_string<pico, char>
^
ratio_io:151:8: error: ‘ratio_string’ is not a class template
struct ratio_string<pico, wchar_t>
^
ratio_io:151:21: error: ‘pico’ was not declared in this scope
struct ratio_string<pico, wchar_t>
^
ratio_io:151:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:515:47: note: ‘std::pico’
typedef ratio<1, 1000000000000> pico;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:151:34: error: ‘ratio_string’ is not a template type
struct ratio_string<pico, wchar_t>
^
ratio_io:160:8: error: ‘ratio_string’ is not a class template
struct ratio_string<nano, char>
^
ratio_io:160:21: error: ‘nano’ was not declared in this scope
struct ratio_string<nano, char>
^
ratio_io:160:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:516:47: note: ‘std::nano’
typedef ratio<1, 1000000000> nano;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:160:31: error: ‘ratio_string’ is not a template type
struct ratio_string<nano, char>
^
ratio_io:185:8: error: ‘ratio_string’ is not a class template
struct ratio_string<nano, wchar_t>
^
ratio_io:185:21: error: ‘nano’ was not declared in this scope
struct ratio_string<nano, wchar_t>
^
ratio_io:185:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:516:47: note: ‘std::nano’
typedef ratio<1, 1000000000> nano;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:185:34: error: ‘ratio_string’ is not a template type
struct ratio_string<nano, wchar_t>
^
ratio_io:194:8: error: ‘ratio_string’ is not a class template
struct ratio_string<micro, char>
^
ratio_io:194:21: error: ‘micro’ was not declared in this scope
struct ratio_string<micro, char>
^
ratio_io:194:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:517:47: note: ‘std::micro’
typedef ratio<1, 1000000> micro;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:194:32: error: ‘ratio_string’ is not a template type
struct ratio_string<micro, char>
^
ratio_io:219:8: error: ‘ratio_string’ is not a class template
struct ratio_string<micro, wchar_t>
^
ratio_io:219:21: error: ‘micro’ was not declared in this scope
struct ratio_string<micro, wchar_t>
^
ratio_io:219:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:517:47: note: ‘std::micro’
typedef ratio<1, 1000000> micro;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:219:35: error: ‘ratio_string’ is not a template type
struct ratio_string<micro, wchar_t>
^
ratio_io:228:8: error: ‘ratio_string’ is not a class template
struct ratio_string<milli, char>
^
ratio_io:228:21: error: ‘milli’ was not declared in this scope
struct ratio_string<milli, char>
^
ratio_io:228:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:518:47: note: ‘std::milli’
typedef ratio<1, 1000> milli;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:228:32: error: ‘ratio_string’ is not a template type
struct ratio_string<milli, char>
^
ratio_io:253:8: error: ‘ratio_string’ is not a class template
struct ratio_string<milli, wchar_t>
^
ratio_io:253:21: error: ‘milli’ was not declared in this scope
struct ratio_string<milli, wchar_t>
^
ratio_io:253:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:518:47: note: ‘std::milli’
typedef ratio<1, 1000> milli;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:253:35: error: ‘ratio_string’ is not a template type
struct ratio_string<milli, wchar_t>
^
ratio_io:262:8: error: ‘ratio_string’ is not a class template
struct ratio_string<centi, char>
^
ratio_io:262:21: error: ‘centi’ was not declared in this scope
struct ratio_string<centi, char>
^
ratio_io:262:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:519:47: note: ‘std::centi’
typedef ratio<1, 100> centi;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:262:32: error: ‘ratio_string’ is not a template type
struct ratio_string<centi, char>
^
ratio_io:287:8: error: ‘ratio_string’ is not a class template
struct ratio_string<centi, wchar_t>
^
ratio_io:287:21: error: ‘centi’ was not declared in this scope
struct ratio_string<centi, wchar_t>
^
ratio_io:287:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:519:47: note: ‘std::centi’
typedef ratio<1, 100> centi;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:287:35: error: ‘ratio_string’ is not a template type
struct ratio_string<centi, wchar_t>
^
ratio_io:296:8: error: ‘ratio_string’ is not a class template
struct ratio_string<deci, char>
^
ratio_io:296:21: error: ‘deci’ was not declared in this scope
struct ratio_string<deci, char>
^
ratio_io:296:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:520:47: note: ‘std::deci’
typedef ratio<1, 10> deci;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:296:31: error: ‘ratio_string’ is not a template type
struct ratio_string<deci, char>
^
ratio_io:321:8: error: ‘ratio_string’ is not a class template
struct ratio_string<deci, wchar_t>
^
ratio_io:321:21: error: ‘deci’ was not declared in this scope
struct ratio_string<deci, wchar_t>
^
ratio_io:321:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:520:47: note: ‘std::deci’
typedef ratio<1, 10> deci;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:321:34: error: ‘ratio_string’ is not a template type
struct ratio_string<deci, wchar_t>
^
ratio_io:330:8: error: ‘ratio_string’ is not a class template
struct ratio_string<deca, char>
^
ratio_io:330:21: error: ‘deca’ was not declared in this scope
struct ratio_string<deca, char>
^
ratio_io:330:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:521:47: note: ‘std::deca’
typedef ratio< 10, 1> deca;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:330:31: error: ‘ratio_string’ is not a template type
struct ratio_string<deca, char>
^
ratio_io:355:8: error: ‘ratio_string’ is not a class template
struct ratio_string<deca, wchar_t>
^
ratio_io:355:21: error: ‘deca’ was not declared in this scope
struct ratio_string<deca, wchar_t>
^
ratio_io:355:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:521:47: note: ‘std::deca’
typedef ratio< 10, 1> deca;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:355:34: error: ‘ratio_string’ is not a template type
struct ratio_string<deca, wchar_t>
^
ratio_io:364:8: error: ‘ratio_string’ is not a class template
struct ratio_string<hecto, char>
^
ratio_io:364:21: error: ‘hecto’ was not declared in this scope
struct ratio_string<hecto, char>
^
ratio_io:364:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:522:47: note: ‘std::hecto’
typedef ratio< 100, 1> hecto;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:364:32: error: ‘ratio_string’ is not a template type
struct ratio_string<hecto, char>
^
ratio_io:389:8: error: ‘ratio_string’ is not a class template
struct ratio_string<hecto, wchar_t>
^
ratio_io:389:21: error: ‘hecto’ was not declared in this scope
struct ratio_string<hecto, wchar_t>
^
ratio_io:389:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:522:47: note: ‘std::hecto’
typedef ratio< 100, 1> hecto;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:389:35: error: ‘ratio_string’ is not a template type
struct ratio_string<hecto, wchar_t>
^
ratio_io:398:8: error: ‘ratio_string’ is not a class template
struct ratio_string<kilo, char>
^
ratio_io:398:21: error: ‘kilo’ was not declared in this scope
struct ratio_string<kilo, char>
^
ratio_io:398:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:523:47: note: ‘std::kilo’
typedef ratio< 1000, 1> kilo;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:398:31: error: ‘ratio_string’ is not a template type
struct ratio_string<kilo, char>
^
ratio_io:423:8: error: ‘ratio_string’ is not a class template
struct ratio_string<kilo, wchar_t>
^
ratio_io:423:21: error: ‘kilo’ was not declared in this scope
struct ratio_string<kilo, wchar_t>
^
ratio_io:423:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:523:47: note: ‘std::kilo’
typedef ratio< 1000, 1> kilo;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:423:34: error: ‘ratio_string’ is not a template type
struct ratio_string<kilo, wchar_t>
^
ratio_io:432:8: error: ‘ratio_string’ is not a class template
struct ratio_string<mega, char>
^
ratio_io:432:21: error: ‘mega’ was not declared in this scope
struct ratio_string<mega, char>
^
ratio_io:432:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:524:47: note: ‘std::mega’
typedef ratio< 1000000, 1> mega;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:432:31: error: ‘ratio_string’ is not a template type
struct ratio_string<mega, char>
^
ratio_io:457:8: error: ‘ratio_string’ is not a class template
struct ratio_string<mega, wchar_t>
^
ratio_io:457:21: error: ‘mega’ was not declared in this scope
struct ratio_string<mega, wchar_t>
^
ratio_io:457:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:524:47: note: ‘std::mega’
typedef ratio< 1000000, 1> mega;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:457:34: error: ‘ratio_string’ is not a template type
struct ratio_string<mega, wchar_t>
^
ratio_io:466:8: error: ‘ratio_string’ is not a class template
struct ratio_string<giga, char>
^
ratio_io:466:21: error: ‘giga’ was not declared in this scope
struct ratio_string<giga, char>
^
ratio_io:466:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:525:47: note: ‘std::giga’
typedef ratio< 1000000000, 1> giga;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:466:31: error: ‘ratio_string’ is not a template type
struct ratio_string<giga, char>
^
ratio_io:491:8: error: ‘ratio_string’ is not a class template
struct ratio_string<giga, wchar_t>
^
ratio_io:491:21: error: ‘giga’ was not declared in this scope
struct ratio_string<giga, wchar_t>
^
ratio_io:491:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:525:47: note: ‘std::giga’
typedef ratio< 1000000000, 1> giga;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:491:34: error: ‘ratio_string’ is not a template type
struct ratio_string<giga, wchar_t>
^
ratio_io:500:8: error: ‘ratio_string’ is not a class template
struct ratio_string<tera, char>
^
ratio_io:500:21: error: ‘tera’ was not declared in this scope
struct ratio_string<tera, char>
^
ratio_io:500:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:526:47: note: ‘std::tera’
typedef ratio< 1000000000000, 1> tera;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:500:31: error: ‘ratio_string’ is not a template type
struct ratio_string<tera, char>
^
ratio_io:525:8: error: ‘ratio_string’ is not a class template
struct ratio_string<tera, wchar_t>
^
ratio_io:525:21: error: ‘tera’ was not declared in this scope
struct ratio_string<tera, wchar_t>
^
ratio_io:525:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:526:47: note: ‘std::tera’
typedef ratio< 1000000000000, 1> tera;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:525:34: error: ‘ratio_string’ is not a template type
struct ratio_string<tera, wchar_t>
^
ratio_io:534:8: error: ‘ratio_string’ is not a class template
struct ratio_string<peta, char>
^
ratio_io:534:21: error: ‘peta’ was not declared in this scope
struct ratio_string<peta, char>
^
ratio_io:534:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:527:47: note: ‘std::peta’
typedef ratio< 1000000000000000, 1> peta;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:534:31: error: ‘ratio_string’ is not a template type
struct ratio_string<peta, char>
^
ratio_io:559:8: error: ‘ratio_string’ is not a class template
struct ratio_string<peta, wchar_t>
^
ratio_io:559:21: error: ‘peta’ was not declared in this scope
struct ratio_string<peta, wchar_t>
^
ratio_io:559:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:527:47: note: ‘std::peta’
typedef ratio< 1000000000000000, 1> peta;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:559:34: error: ‘ratio_string’ is not a template type
struct ratio_string<peta, wchar_t>
^
ratio_io:568:8: error: ‘ratio_string’ is not a class template
struct ratio_string<exa, char>
^
ratio_io:568:21: error: ‘exa’ was not declared in this scope
struct ratio_string<exa, char>
^
ratio_io:568:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:528:47: note: ‘std::exa’
typedef ratio< 1000000000000000000, 1> exa;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:568:30: error: ‘ratio_string’ is not a template type
struct ratio_string<exa, char>
^
ratio_io:593:8: error: ‘ratio_string’ is not a class template
struct ratio_string<exa, wchar_t>
^
ratio_io:593:21: error: ‘exa’ was not declared in this scope
struct ratio_string<exa, wchar_t>
^
ratio_io:593:21: note: suggested alternative:
In file included from /usr/include/c++/4.8.2/chrono:38:0,
from Test.cc:11:
/usr/include/c++/4.8.2/ratio:528:47: note: ‘std::exa’
typedef ratio< 1000000000000000000, 1> exa;
^
In file included from chrono_io:139:0,
from Test.cc:12:
ratio_io:593:33: error: ‘ratio_string’ is not a template type
struct ratio_string<exa, wchar_t>
^
ratio_io:599:1: error: ‘_LIBCPP_END_NAMESPACE_STD’ does not name a type
_LIBCPP_END_NAMESPACE_STD
^
In file included from Test.cc:12:0:
chrono_io:1164:1: error: ‘_LIBCPP_END_NAMESPACE_STD’ does not name a type
_LIBCPP_END_NAMESPACE_STD
^
Test.cc: In function ‘void RealDataTest()’:
Test.cc:167:12: error: cannot bind ‘std::basic_ostream<char>’ lvalue to ‘std::basic_ostream<char>&&’
std::cout << "Time for n->mostRecent: " << (Clock::now() - start) << std::endl;
^
In file included from /usr/include/c++/4.8.2/iostream:39:0,
from Nearby.cc:9,
from Test.cc:5:
/usr/include/c++/4.8.2/ostream:602:5: error: initializing argument 1 of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::chrono::duration<long int, std::ratio<1l, 1000000000l> >]’
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
^
Test.cc:185:12: error: cannot bind ‘std::basic_ostream<char>’ lvalue to ‘std::basic_ostream<char>&&’
std::cout << "Time for n->deletePost: " << (Clock::now() - start) << std::endl;
^
In file included from /usr/include/c++/4.8.2/iostream:39:0,
from Nearby.cc:9,
from Test.cc:5:
/usr/include/c++/4.8.2/ostream:602:5: error: initializing argument 1 of ‘std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&&, const _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = std::chrono::duration<long int, std::ratio<1l, 1000000000l> >]’
operator<<(basic_ostream<_CharT, _Traits>&& __os, const _Tp& __x)
^
make: *** [all] Error 1
I haven't played with this code in several years. It is using:
#if __has_feature(cxx_rvalue_references)
__seconds_(std::move(__seconds)),
...
to check if the compiler supports rvalue references (C++11 move semantics). My recommendation is to assume that you have C++11 (since you have to have <chrono> and just remove the __has_feature and the #else branch.
If for some reason you have to support a compiler which doesn't have rvalue references you can:
#define __has_feature(x) 0
and this will select the #else branch everywhere.
__has_feature(cxx_rvalue_references) is a clang extension.
Update
Update to this library.
https://howardhinnant.github.io/date/chrono_io.html
It has been simplified to only streaming durations.
I'm trying to compile a simple c++ file that is suppose to use the mariadbc++ connector. For some reason I ran into alot of trouble with that. I get strange error messages. I neither understand them, nor do I know how to fix them.
I did a lot of research, but either nobody else ran into these problems or I just cant find them.
I installed following packages:
mariadb-client
mariadb-client-5.5
mariadb-server
libmariadbclient18
libmysqlclient18
libmysqlcppconn7
libmysqlcppconn-dev
libmariadbclient-dev
libmariadb-dev
I'm on a x64 Ubuntu 14.04 System (well Pinguy OS, but I guess, that doesn't matter)
I tried to build following programm:
#include <my_global.h>
#include <mysql.h>
#include "mysql_driver.h"
int main(int argc, char **argv)
{
sql::mysql::MySQL_Driver *driver;
sql::Connection *con;
sql::Statement *stmt;
driver = sql::mysql::MySQL_Driver::get_mysql_driver_instance();
con = driver->connect("tcp://localhost:3306","root", "herein");
if (!con->isValid()) exit(1);
stmt = con->createStatement();
stmt->execute("use testtb");
stmt->execute("INSERT INTO Testtable(id, label) VALUES (1, 1)");
delete stmt;
delete con;
return 1;
}
And I tried this command:
g++ -lmysqlcppconn -g src/test_mariadb.cpp -o bin/test_mariadb $(mysql_config --cflags) $(mysql_config --libs)
where under in src/ my source files are and in bin/ my binaries.
And finally the Compile Errors I get:
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from /usr/include/boost/assert.hpp:82,
from /usr/include/boost/smart_ptr/scoped_ptr.hpp:15,
from /usr/include/boost/scoped_ptr.hpp:14,
from /usr/include/mysql_driver.h:30,
from src/test_mariadb.cpp:3:
/usr/include/c++/4.8/bits/stl_algobase.h:239:56: error: macro "min" passed 3 arguments, but takes just 2
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:260:56: error: macro "max" passed 3 arguments, but takes just 2
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
In file included from /usr/include/boost/mpl/aux_/begin_end_impl.hpp:21:0,
from /usr/include/boost/mpl/begin_end.hpp:18,
from /usr/include/boost/mpl/iter_fold.hpp:18,
from /usr/include/boost/variant/detail/initializer.hpp:28,
from /usr/include/boost/variant/variant.hpp:31,
from /usr/include/boost/variant.hpp:17,
from /usr/include/cppconn/connection.h:31,
from /usr/include/cppconn/driver.h:30,
from /usr/include/mysql_driver.h:32,
from src/test_mariadb.cpp:3:
/usr/include/boost/mpl/aux_/has_begin.hpp:20:57: error: macro "test" passed 2 arguments, but takes just 1
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_begin, begin, true)
^
In file included from /usr/include/boost/mpl/sequence_tag.hpp:18:0,
from /usr/include/boost/mpl/begin_end.hpp:19,
from /usr/include/boost/mpl/iter_fold.hpp:18,
from /usr/include/boost/variant/detail/initializer.hpp:28,
from /usr/include/boost/variant/variant.hpp:31,
from /usr/include/boost/variant.hpp:17,
from /usr/include/cppconn/connection.h:31,
from /usr/include/cppconn/driver.h:30,
from /usr/include/mysql_driver.h:32,
from src/test_mariadb.cpp:3:
/usr/include/boost/mpl/aux_/has_tag.hpp:20:54: error: macro "test" passed 2 arguments, but takes just 1
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_tag, tag, false)
^
In file included from /usr/include/boost/mpl/aux_/O1_size_impl.hpp:20:0,
from /usr/include/boost/mpl/O1_size.hpp:19,
from /usr/include/boost/mpl/iter_fold.hpp:19,
from /usr/include/boost/variant/detail/initializer.hpp:28,
from /usr/include/boost/variant/variant.hpp:31,
from /usr/include/boost/variant.hpp:17,
from /usr/include/cppconn/connection.h:31,
from /usr/include/cppconn/driver.h:30,
from /usr/include/mysql_driver.h:32,
from src/test_mariadb.cpp:3:
/usr/include/boost/mpl/aux_/has_size.hpp:20:1: error: macro "test" passed 2 arguments, but takes just 1
BOOST_MPL_HAS_XXX_TRAIT_DEF(size)
^
In file included from /usr/include/boost/mpl/apply_wrap.hpp:23:0,
from /usr/include/boost/mpl/bind.hpp:27,
from /usr/include/boost/mpl/lambda.hpp:18,
from /usr/include/boost/mpl/iter_fold.hpp:20,
from /usr/include/boost/variant/detail/initializer.hpp:28,
from /usr/include/boost/variant/variant.hpp:31,
from /usr/include/boost/variant.hpp:17,
from /usr/include/cppconn/connection.h:31,
from /usr/include/cppconn/driver.h:30,
from /usr/include/mysql_driver.h:32,
from src/test_mariadb.cpp:3:
/usr/include/boost/mpl/aux_/has_apply.hpp:22:58: error: macro "test" passed 2 arguments, but takes just 1
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_apply, apply, false)
^
In file included from /usr/include/boost/mpl/quote.hpp:23:0,
from /usr/include/boost/mpl/aux_/full_lambda.hpp:25,
from /usr/include/boost/mpl/lambda.hpp:22,
from /usr/include/boost/mpl/iter_fold.hpp:20,
from /usr/include/boost/variant/detail/initializer.hpp:28,
from /usr/include/boost/variant/variant.hpp:31,
from /usr/include/boost/variant.hpp:17,
from /usr/include/cppconn/connection.h:31,
from /usr/include/cppconn/driver.h:30,
from /usr/include/mysql_driver.h:32,
from src/test_mariadb.cpp:3:
/usr/include/boost/mpl/aux_/has_type.hpp:20:55: error: macro "test" passed 2 arguments, but takes just 1
BOOST_MPL_HAS_XXX_TRAIT_NAMED_DEF(has_type, type, true)
^
In file included from src/test_mariadb.cpp:1:0:
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: error: expected unqualified-id before ‘const’
min(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: error: expected ‘)’ before ‘const’
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: error: expected ‘)’ before ‘const’
/usr/include/c++/4.8/bits/stl_algobase.h:193:5: error: expected initializer before ‘const’
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: error: expected unqualified-id before ‘const’
max(const _Tp& __a, const _Tp& __b)
^
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: error: expected ‘)’ before ‘const’
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: error: expected ‘)’ before ‘const’
/usr/include/c++/4.8/bits/stl_algobase.h:216:5: error: expected initializer before ‘const’
In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0,
from /usr/include/c++/4.8/ios:40,
from /usr/include/c++/4.8/ostream:38,
from /usr/include/c++/4.8/iostream:39,
from /usr/include/boost/assert.hpp:82,
from /usr/include/boost/smart_ptr/scoped_ptr.hpp:15,
from /usr/include/boost/scoped_ptr.hpp:14,
from /usr/include/mysql_driver.h:30,
from src/test_mariadb.cpp:3:
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: error: ‘std::min’ declared as an ‘inline’ variable
min(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:239:5: error: template declaration of ‘const _Tp& std::min’
/usr/include/c++/4.8/bits/stl_algobase.h:242:7: error: expected primary-expression before ‘if’
if (__comp(__b, __a))
^
/usr/include/c++/4.8/bits/stl_algobase.h:242:7: error: expected ‘}’ before ‘if’
/usr/include/c++/4.8/bits/stl_algobase.h:244:7: error: expected unqualified-id before ‘return’
return __a;
^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: error: ‘max’ declared as an ‘inline’ variable
max(const _Tp& __a, const _Tp& __b, _Compare __comp)
^
/usr/include/c++/4.8/bits/stl_algobase.h:260:5: error: template declaration of ‘const _Tp& max’
/usr/include/c++/4.8/bits/stl_algobase.h:263:7: error: expected primary-expression before ‘if’
if (__comp(__a, __b))
^
/usr/include/c++/4.8/bits/stl_algobase.h:263:7: error: expected ‘}’ before ‘if’
/usr/include/c++/4.8/bits/stl_algobase.h:265:7: error: expected unqualified-id before ‘return’
return __a;
^
/usr/include/c++/4.8/bits/stl_algobase.h:266:5: error: expected declaration before ‘}’ token
}
A header you have included has defined preprocessor macros named min, max and test. These have then conflicted with identifiers used (e.g. for method names) in other header files you have included.
Assuming that those macros have been defined in one of these headers:
#include <my_global.h>
#include <mysql.h>
you could add #undefs before you include mysql_driver.h, e.g.:
#include <my_global.h>
#include <mysql.h>
#undef min
#undef max
#undef test
#include "mysql_driver.h"
You could also consider re-arranging the order in which you include the files, or look into what headers are defining these and see whether the definition of these macros can be disabled.