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

按照readme的方法自行编译,编译失败 #7

Closed
ikilobyte opened this issue May 9, 2022 · 7 comments
Closed

按照readme的方法自行编译,编译失败 #7

ikilobyte opened this issue May 9, 2022 · 7 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ikilobyte
Copy link
Contributor

  • 什么都没改过,代码拉下来后执行 docker build -t static-php . --build-arg USE_BACKUP_ADDRESS=no --build-arg COMPILE_PHP_VERSION=7.4.28
[+] Building 30.4s (34/34) FINISHED
 => [internal] load build definition from Dockerfile                                                                                                                                 0.0s
 => => transferring dockerfile: 37B                                                                                                                                                  0.0s
 => [internal] load .dockerignore                                                                                                                                                    0.0s
 => => transferring context: 2B                                                                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/alpine:latest                                                                                                                     1.3s
 => [ 1/30] FROM docker.io/library/alpine:latest@sha256:4edbd2beb5f78b1014028f4fbb99f3237d9561100b6881aabbf5acce2c4f9454                                                             0.0s
 => [internal] load build context                                                                                                                                                    0.0s
 => => transferring context: 236B                                                                                                                                                    0.0s
 => CACHED [ 2/30] RUN if [ "no" = "yes" ]; then         echo "Using backup address..." && sleep 3s;     else         echo "Using original address..." && sleep 3s;     fi           0.0s
 => CACHED [ 3/30] RUN sed -i 's/dl-cdn.alpinelinux.org/'mirrors.ustc.edu.cn'/g' /etc/apk/repositories                                                                               0.0s
 => CACHED [ 4/30] RUN apk add bash wget cmake gcc g++ jq autoconf git libstdc++ linux-headers make m4 libgcc binutils ncurses > /dev/null                                           0.0s
 => CACHED [ 5/30] RUN apk add zlib-dev zlib-static > /dev/null                                                                                                                      0.0s
 => CACHED [ 6/30] RUN apk add oniguruma-dev > /dev/null                                                                                                                             0.0s
 => CACHED [ 7/30] RUN apk add openssl-libs-static openssl-dev openssl > /dev/null                                                                                                   0.0s
 => CACHED [ 8/30] RUN apk add libpng-dev libpng-static > /dev/null                                                                                                                  0.0s
 => CACHED [ 9/30] RUN apk add c-ares-static c-ares-dev > /dev/null                                                                                                                  0.0s
 => CACHED [10/30] RUN apk add libevent libevent-dev libevent-static > /dev/null                                                                                                     0.0s
 => CACHED [11/30] RUN apk add sqlite sqlite-dev sqlite-libs sqlite-static > /dev/null                                                                                               0.0s
 => CACHED [12/30] RUN mkdir /app                                                                                                                                                    0.0s
 => CACHED [13/30] WORKDIR /app                                                                                                                                                      0.0s
 => CACHED [14/30] COPY ac_override_1 /app/                                                                                                                                          0.0s
 => CACHED [15/30] COPY ac_override_2 /app/                                                                                                                                          0.0s
 => CACHED [16/30] COPY download.sh /app/                                                                                                                                            0.0s
 => CACHED [17/30] COPY config.json /app/                                                                                                                                            0.0s
 => CACHED [18/30] RUN chmod +x /app/download.sh                                                                                                                                     0.0s
 => CACHED [19/30] RUN echo "Downloading Extensions ..."                                                                                                                             0.0s
 => CACHED [20/30] RUN ./download.sh swoole no > /dev/null &&     ./download.sh inotify no > /dev/null &&     ./download.sh mongodb no > /dev/null &&     ./download.sh event no >   0.0s
 => CACHED [21/30] RUN echo "Downloading PHP 7.4.28 ..."                                                                                                                             0.0s
 => CACHED [22/30] RUN ./download.sh php no 7.4.28 > /dev/null                                                                                                                       0.0s
 => CACHED [23/30] COPY extensions.txt /app/                                                                                                                                         0.0s
 => CACHED [24/30] COPY check-extensions.sh /app/                                                                                                                                    0.0s
 => CACHED [25/30] COPY compile-php.sh /app/                                                                                                                                         0.0s
 => CACHED [26/30] RUN chmod +x ./check-extensions.sh &&     chmod +x ./compile-php.sh                                                                                               0.0s
 => CACHED [27/30] RUN echo "Checking and Compiling Dependencies ..."                                                                                                                0.0s
 => CACHED [28/30] RUN ./check-extensions.sh check_before_configure > /dev/null                                                                                                      0.0s
 => CACHED [29/30] RUN echo "Compiling PHP ..."                                                                                                                                      0.0s
 => ERROR [30/30] RUN ./compile-php.sh 7.4.28 > /dev/null 2>&1                                                                                                                      28.8s
------
 > [30/30] RUN ./compile-php.sh 7.4.28 > /dev/null 2>&1:
------
executor failed running [/bin/sh -c ./compile-php.sh ${VER_PHP} > /dev/null 2>&1]: exit code: 1
@crazywhalecc
Copy link
Owner

RUN ./compile-php.sh ${VER_PHP} > /dev/null 2>&1

建议将这行的 > /dev/null 2>&1 删除,可以看到详细日志,有时候可能网络问题导致无法正常下载依赖并编译。

@ikilobyte
Copy link
Contributor Author

#34 33.43 General settings
#34 33.43 checking whether to include gcov symbols... no
#34 33.43 checking whether to include debugging symbols... no
#34 33.43 checking whether to dlopen extensions with RTLD_NOW instead of RTLD_LAZY... no
#34 33.43 checking layout of installed files... GNU
#34 33.44 checking path to configuration file... DEFAULT
#34 33.44 checking where to scan for configuration files...
#34 33.44 checking whether to enable PHP's own SIGCHLD handler... no
#34 33.44 checking whether to explicitly link against libgcc... no
#34 33.44 checking whether to enable short tags by default... yes
#34 33.44 checking whether to enable dmalloc... no
#34 33.45 checking whether to enable IPv6 support... yes
#34 33.45 checking whether to enable DTrace support... no
#34 33.45 checking how big to make fd sets... using system default
#34 33.45
#34 33.45 Configuring extensions
#34 33.45 checking for io.h... no
#34 33.49 checking for strtoll... yes
#34 33.55 checking for atoll... yes
#34 33.68 checking whether to build with LIBXML support... yes
#34 33.68 checking for libxml-2.0 >= 2.7.6... no
#34 33.69 configure: error: Package requirements (libxml-2.0 >= 2.7.6) were not met:
#34 33.69
#34 33.69 Package 'libxml-2.0', required by 'virtual:world', not found
#34 33.69
#34 33.69 Consider adjusting the PKG_CONFIG_PATH environment variable if you
#34 33.69 installed software in a non-standard prefix.
#34 33.69
#34 33.69 Alternatively, you may set the environment variables LIBXML_CFLAGS
#34 33.69 and LIBXML_LIBS to avoid the need to call pkg-config.
#34 33.69 See the pkg-config man page for more details.
------
executor failed running [/bin/sh -c ./compile-php.sh ${VER_PHP}]: exit code: 1

@ikilobyte
Copy link
Contributor Author

还有希望可以增加zip扩展

@crazywhalecc
Copy link
Owner

我这边刚试了下是没问题的,请问确定改过 extensions.txt 文件吗,如果没有的话,重新拉一份试一下,不要留有旧 Docker Container

@ikilobyte
Copy link
Contributor Author

所有代码都没改过,反正一直通不过

@crazywhalecc
Copy link
Owner

是不是在 Windows 环境拉取的项目,然后运行的 Docker?

@ikilobyte
Copy link
Contributor Author

是Mac电脑

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants