Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use swSignalHander instead of __sighandler_t #49

Merged
merged 1 commit into from
Apr 16, 2018
Merged

use swSignalHander instead of __sighandler_t #49

merged 1 commit into from
Apr 16, 2018

Conversation

robberphex
Copy link
Contributor

@robberphex robberphex commented Apr 13, 2018

failed at php:7.0-cli-alpine.

Dockerfile:

FROM php:7.0-cli-alpine

RUN apk --no-cache add curl-dev
RUN docker-php-ext-install sockets

RUN curl -fsSL https://github.com/youzan/zan/archive/master.tar.gz -o zan.tar.gz && \
    mkdir /tmp/zan -p && tar -xf zan.tar.gz -C /tmp/zan --strip-components=1 && rm zan.tar.gz && \
    /usr/local/bin/docker-php-ext-configure /tmp/zan/zan-extension/ --enable-openssl && \
    docker-php-ext-install /tmp/zan/zan-extension/ && \
    rm -rf /tmp/zan/

build log:

...
cc -I. -I/tmp/zan/zan-extension -DPHP_ATOM_INC -I/tmp/zan/zan-extension/include -I/tmp/zan/zan-extension/main -I/tmp/zan/zan-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/zan/zan-extension/include -fstack-protector-strong -fpic -fpie -O2 -DHAVE_CONFIG_H -Wall -fstack-protector-strong -fpic -fpie -O2 -std=gnu99 -fbounds-check -pthread -fstack-check -fstack-protector -fstack-protector-all -fno-strict-aliasing -c /tmp/zan/zan-extension/src/dns/DNS.c  -fPIC -DPIC -o src/dns/.libs/DNS.o
/bin/sh /tmp/zan/zan-extension/libtool --mode=compile cc  -I. -I/tmp/zan/zan-extension -DPHP_ATOM_INC -I/tmp/zan/zan-extension/include -I/tmp/zan/zan-extension/main -I/tmp/zan/zan-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/zan/zan-extension/include  -fstack-protector-strong -fpic -fpie -O2 -DHAVE_CONFIG_H  -Wall -fstack-protector-strong -fpic -fpie -O2 -std=gnu99 -fbounds-check -pthread -fstack-check -fstack-protector -fstack-protector-all -fno-strict-aliasing   -c /tmp/zan/zan-extension/src/signal/Signal.c -o src/signal/Signal.lo 
mkdir src/signal/.libs
 cc -I. -I/tmp/zan/zan-extension -DPHP_ATOM_INC -I/tmp/zan/zan-extension/include -I/tmp/zan/zan-extension/main -I/tmp/zan/zan-extension -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -I/tmp/zan/zan-extension/include -fstack-protector-strong -fpic -fpie -O2 -DHAVE_CONFIG_H -Wall -fstack-protector-strong -fpic -fpie -O2 -std=gnu99 -fbounds-check -pthread -fstack-check -fstack-protector -fstack-protector-all -fno-strict-aliasing -c /tmp/zan/zan-extension/src/signal/Signal.c  -fPIC -DPIC -o src/signal/.libs/Signal.o
/tmp/zan/zan-extension/src/signal/Signal.c:28:39: error: unknown type name '__sighandler_t'
 static void swSignalfd_set(int signo, __sighandler_t callback);
                                       ^
/tmp/zan/zan-extension/src/signal/Signal.c: In function 'swSignal_add':
/tmp/zan/zan-extension/src/signal/Signal.c:104:9: warning: implicit declaration of function 'swSignalfd_set' [-Wimplicit-function-declaration]
         swSignalfd_set(signo, func);
         ^
/tmp/zan/zan-extension/src/signal/Signal.c: At top level:
/tmp/zan/zan-extension/src/signal/Signal.c:175:39: error: unknown type name '__sighandler_t'
 static void swSignalfd_set(int signo, __sighandler_t callback)
                                       ^
Makefile:324: recipe for target 'src/signal/Signal.lo' failed
make: *** [src/signal/Signal.lo] Error 1
The command '/bin/sh -c curl -fsSL https://github.com/youzan/zan/archive/master.tar.gz -o zan.tar.gz &&     mkdir /tmp/zan -p && tar -xf zan.tar.gz -C /tmp/zan --strip-components=1 && rm zan.tar.gz &&     /usr/local/bin/docker-php-ext-configure /tmp/zan/zan-extension/ --enable-openssl &&     docker-php-ext-install /tmp/zan/zan-extension/ &&     rm -rf /tmp/zan/' returned a non-zero code: 2
...

ref: https://gist.github.com/RobberPhex/26f92750c855e3ec2a39033821894611

@zhangcunli zhangcunli merged commit 3b8e1a5 into youzan:master Apr 16, 2018
@robberphex robberphex deleted the signal branch April 17, 2018 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants