Skip to content

Compilation error on cygwin #8142

Closed
Closed

Description

@matyhtf

Description

Error while compiling php on cygwin

./configure --disable-all \
--with-openssl --enable-openssl \
--with-curl \
--with-iconv \
--with-bz2 \
--enable-bcmath \
--enable-pcntl \
--enable-filter \
--enable-session \
--enable-tokenizer \
--enable-mbstring \
--enable-ctype \
--with-zlib \
--with-zip \
--enable-posix \
--enable-sockets \
--enable-pdo \
--with-sqlite3 \
--enable-phar \
--enable-mysqlnd \
--with-mysqli \
--enable-intl \
--enable-fileinfo \
--with-pdo_mysql \
--with-pdo-sqlite \
--enable-soap \
--with-xsl \
--with-gmp \
--enable-exif \
--with-sodium \
--enable-xml --enable-simplexml --enable-xmlreader --enable-xmlwriter --enable-dom --with-libxml \
--enable-gd --with-jpeg  --with-freetype \
--enable-swoole --enable-sockets --enable-mysqlnd --enable-http2 --enable-swoole-json --enable-swoole-curl --enable-cares \
--enable-redis \
--with-imagick \
--with-yaml

... 

make
...

/bin/sh /home/work/php-src/libtool --silent --preserve-dup-deps --tag CC --mode=compile cc -Iext/gd/ -I/home/work/php-src/ext/gd/ -I/home/work/php-src/include -I/home/work/php-src/main -I/home/work/php-src -I/home/work/php-src/ext/date/lib -I/usr/include/libxml2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/ImageMagick-7 -I/home/work/php-src/ext/mbstring/libmbfl -I/home/work/php-src/ext/mbstring/libmbfl/mbfl -I/home/work/php-src/ext -I/home/work/php-src/ext/swoole -I/home/work/php-src/ext/swoole/include -I/home/work/php-src/ext/swoole/ext-src -I/home/work/php-src/ext/swoole/thirdparty -I/home/work/php-src/ext/swoole/thirdparty/hiredis -I/home/work/php-src/TSRM -I/home/work/php-src/Zend    -fno-common -Wformat-truncation -Wlogical-op -Wduplicated-cond -Wno-clobbered -Wall -Wextra -Wno-strict-aliasing -Wno-unused-parameter -Wno-sign-compare -Wall -pthread -g -O2 -fvisibility=hidden -Wimplicit-fallthrough=1 -DZEND_SIGNALS   -I/home/work/php-src/ext/gd/libgd -c /home/work/php-src/ext/gd/libgd/gd_io_dp.c -o ext/gd/libgd/gd_io_dp.lo  -MMD -MF ext/gd/libgd/gd_io_dp.dep -MT ext/gd/libgd/gd_io_dp.lo

Resulted in this output:

In file included from /home/work/php-src/Zend/zend.h:41,
                 from /home/work/php-src/main/php.h:31,
                 from /home/work/php-src/ext/intl/intl_convertcpp.cpp:20:
/home/work/php-src/Zend/zend_signal.h:44:9: error: ‘siginfo_t’ does not name a type
   44 |         siginfo_t *siginfo;
      |         ^~~~~~~~~
In file included from /home/work/php-src/Zend/zend_types.h:25,
                 from /home/work/php-src/ext/intl/intl_convertcpp.h:23,
                 from /home/work/php-src/ext/intl/intl_convertcpp.cpp:17:
/home/work/php-src/Zend/zend_portability.h:370:18: error: ‘sigjmp_buf’ does not name a type; did you mean ‘jmp_buf’?
  370 | # define JMP_BUF sigjmp_buf
      |                  ^~~~~~~~~~
/home/work/php-src/Zend/zend_globals.h:159:9: note: in expansion of macro ‘JMP_BUF’
  159 |         JMP_BUF *bailout;
      |         ^~~~~~~
make: *** [Makefile:1252: ext/intl/intl_convertcpp.lo] Error 1
/home/work/php-src/ext/pcntl/pcntl.c: In function ‘pcntl_siginfo_to_zval’:
/home/work/php-src/ext/pcntl/pcntl.c:1198:98: error: ‘siginfo_t’ has no member named ‘si_band’
 1198 |                                 add_assoc_long_ex(user_siginfo, "band", sizeof("band")-1, siginfo->si_band);
      |                                                                                                  ^~
make: *** [Makefile:1546: ext/pcntl/pcntl.lo] Error 1
make: *** Waiting for unfinished jobs....

PHP Version

PHP 8.1.1

Operating System

CYGWIN_NT-10.0 ***** 3.3.4(0.341/5/3) 2022-01-31 19:35 x86_64 Cygwin

Activity

  1. cmb69 commented on Feb 23, 2022

    @cmb69
    Member

    Hmm, Cygwin is certainly not one of the important targets nowadays (I guess most Windows users use WSL(2) instead), so don't expect that to be fixed soon. However, a pull request would be welcome!

  2. linked a pull request that will close this issueFix GH-8142: CYGWIN build. #8146on Feb 25, 2022
  3. added 2 commits that reference this issue on Mar 4, 2022
    4b90eef
    ea62b80
  4. pgy866 commented on Mar 16, 2022

    @pgy866

    I am running php8.1.3 on DEEPIN 20.4, and the following error occurred

    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/main/php.h:22,
                     from /home/yaoying/Desktop/php-8.1.3/php-8.1.3/ext/intl/intl_convertcpp.cpp:20:
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h: In function ‘void zend_string_free(zend_string*)’:
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_alloc.h:195:48: error: third operand to the conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor of type ‘void’
     #define pefree(ptr, persistent)  ((persistent)?free(ptr):efree(ptr))
                                                    ^~~~
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h:306:3: note: in expansion of macro ‘pefree’
       pefree(s, GC_FLAGS(s) & IS_STR_PERSISTENT);
       ^~~~~~
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h: In function ‘void zend_string_release(zend_string*)’:
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_alloc.h:195:48: error: third operand to the conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor of type ‘void’
     #define pefree(ptr, persistent)  ((persistent)?free(ptr):efree(ptr))
                                                    ^~~~
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_string.h:322:4: note: in expansion of macro ‘pefree’
        pefree(s, GC_FLAGS(s) & IS_STR_PERSISTENT);
        ^~~~~~
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_hash.h: In function ‘void zend_hash_release(zend_array*)’:
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_alloc.h:195:48: error: third operand to the conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor of type ‘void’
     #define pefree(ptr, persistent)  ((persistent)?free(ptr):efree(ptr))
                                                    ^~~~
    /home/yaoying/Desktop/php-8.1.3/php-8.1.3/Zend/zend_hash.h:359:4: note: in expansion of macro ‘pefree’
        pefree(array, GC_FLAGS(array) & IS_ARRAY_PERSISTENT);
        ^~~~~~
    make: *** [Makefile:1490:ext/intl/intl_convertcpp.lo]
    
  5. iluuu1994 commented on Mar 16, 2022

    @iluuu1994
    Member

    @pgy866 This is only fixed for PHP 8.1.5, but your errors look unrelated. Please check with the newest version and otherwise create a new issue.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions