Compile error since replacing "using namespace std"



  • Hi!

    Since the commit https://stash.kopano.io/projects/KC/repos/kopanocore/commits/6f3680d8f56cc8f7b434547b01d91eec76c152da I cannot compile kopanocore anymore.
    My System: Gentoo
    PHP 7.0
    GCC 5.4.0

    I am getting the following error:

    In file included from /usr/lib64/php7.0/include/php/Zend/zend_types.h:27:0,
                     from /usr/lib64/php7.0/include/php/Zend/zend.h:31,
                     from /usr/lib64/php7.0/include/php/main/php.h:35,
                     from php7-ext/ECImportContentsChangesProxy.cpp:38:
    /usr/lib64/php7.0/include/php/Zend/zend_operators.h: In function ‘zend_long zend_dval_to_lval(double)’:
    /usr/lib64/php7.0/include/php/main/php_config.h:2561:34: error: ‘isfinite’ was not declared in this scope
     #define zend_finite(a) isfinite(a)
                                      ^
    /usr/lib64/php7.0/include/php/Zend/zend_portability.h:314:52: note: in definition of macro ‘UNEXPECTED’
     # define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
                                                        ^
    /usr/lib64/php7.0/include/php/Zend/zend_operators.h:117:18: note: in expansion of macro ‘zend_finite’
      if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
                      ^
    /usr/lib64/php7.0/include/php/main/php_config.h:2561:34: note: suggested alternative:
     #define zend_finite(a) isfinite(a)
                                      ^
    /usr/lib64/php7.0/include/php/Zend/zend_portability.h:314:52: note: in definition of macro ‘UNEXPECTED’
     # define UNEXPECTED(condition) __builtin_expect(!!(condition), 0)
                                                        ^
    /usr/lib64/php7.0/include/php/Zend/zend_operators.h:117:18: note: in expansion of macro ‘zend_finite’
      if (UNEXPECTED(!zend_finite(d)) || UNEXPECTED(zend_isnan(d))) {
                      ^
    In file included from php7-ext/ECImportContentsChangesProxy.cpp:24:0:
    /usr/lib/gcc/x86_64-pc-linux-gnu/5.4.0/include/g++-v5/cmath:601:5: note:   ‘std::isfinite’
         isfinite(_Tp __x)
         ^
    make[2]: *** [Makefile:3785: php7-ext/mapi_la-ECImportContentsChangesProxy.lo] Error 1
    

    Greetings
    Vogi


  • Kopano

    Hello @vogi ,

    thanks for your report. I have created https://jira.kopano.io/browse/KC-849 to look into this.


  • Kopano

    We may be able to work aroud it, but it is ssentially a new bug in GCC 5’s libstdc++ (in 4.8, it was not implemented, and fixed it is in 6.x).



  • Hello Jan,

    thanks for your reply.
    For me iz’s not necessary to make a Workaround, as I can patch the files before compiling.
    And when gcc-6 or greater will be “stable” on gentto, the Problem should be fixed.


Log in to reply
 

Looks like your connection to Kopano Community Forum was lost, please wait while we try to reconnect.