-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
build error #194
Comments
系统发行版类型、系统架构、编译使用的命令需要提供一下,目前所展示的信息,我只能看出你没有安装 musl-gcc。如果是 Debian、Ubuntu、Alpine 三种发行版或衍生版,最好先执行一下 |
gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2) 和 musl-gcc 不是一个东西吗?bin/spc doctor: |
不是的,看起来你用的系统是 Red Hat 系,目前还没支持 RedHat 系的系统自动安装缺失的依赖库,而且好像 Red Hat 的包管理也没有 musl-devel 类似的包。 |
你可以考虑下载一个 musl wrapper 自行编译到系统里,或者最好还是直接 |
服务器系统:Ubuntu 22.04.3 LTS x86_64Linux VM-0-16-ubuntu 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:16:32 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux 我使用docker 编译了 |
php 源码目录下有编译错误信息文件 config.log 。对照错误信息,把它修改正确即可。 |
你还在折腾这玩意啊。 加密文件 搞出来没 |
你没发现,编译流程(使用 autoconfig automake) 是通用的呀。 不一定是为了编译PHP 啊, 但是静态链接库构建思路是一样的 。 比如: cotrun ffmpeg 静态编译 opencv 静态编译 nginx 静态编译 librime 构建静态链接库 一些思路,我还是受本项目的启发。找到了解决办法 |
关于静态编译 PHP , 我已经完成了(满足了自个的需求,并且公开了)。https://www.cnblogs.com/jingjingxyk/p/17610540.html 。 git clone -b build_native_php https://github.com/jingjingxyk/swoole-cli.git
有了生成了这个文件: [make-env.sh] ,静态编译其它软件,简单了不少。 (编译静态链接库 和 静态编译目标软件可以彻底分开) 初衷并不是为了编译PHP ,而是方便的编译 静态链接库。 |
没发现什么特殊啊,。我还以为可以把swoole_load.so 编译进去 |
混合式编译,目前不会 |
全部动态编译,那体积应该不小吧 那么多扩展
发自我的iPhone
…------------------ Original ------------------
From: 好吧,你想说啥 ***@***.***>
Date: Wed,Sep 20,2023 2:02 PM
To: crazywhalecc/static-php-cli ***@***.***>
Cc: TNT-ma ***@***.***>, Author ***@***.***>
Subject: Re: [crazywhalecc/static-php-cli] build error (Issue #194)
其实还有一种办法,就是所有都独立动态编译。 打包时把动态链接库全都打包就行
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
./bin/spc build openssl,pcntl --build-all --enable-zts
_ _ _ _
| | __ | |() ___ _ __ | |_ _ __
/ | / ` | __| |/ __|| ' | ' | ' \
__ \ || (| | || | (_|| |) | | | | |) |
|/__,|_||_| | ./|| || .__/ v2.0.0
|| |_|
[23:30:01] [INFO] [EXEC] echo | musl-gcc -E -x c - -march=corei7
sh: line 1: musl-gcc: command not found
[23:30:01] [INFO] [EXEC] echo | musl-gcc -E -x c - -mtune=core-avx2
sh: line 1: musl-gcc: command not found
[23:30:01] [INFO] Build target: cli, micro, fpm, embed
[23:30:01] [INFO] Enabled extensions: openssl, pcntl
[23:30:01] [INFO] Required libraries: zlib, openssl
[23:30:03] [INFO] Building required library [pkg-config]
[23:30:03] [INFO] Entering dir: /phptg/static-php-cli/source/pkg-config
[23:30:03] [INFO] [EXEC] PKG_CONFIG_PATH="/phptg/static-php-cli/buildroot/lib/pkgconfig" CC='musl-gcc' CXX='g++' ./configure --disable-shared --enable-static --with-internal-glib --prefix=/phptg/static-php-cli/buildroot --without-sysroot --without-system-include-path --without-system-library-path --without-pc-path
[23:30:04] [CRIT] Build failed with SPC\exception\RuntimeException: Command run failed with code[77]: cd '/phptg/static-php-cli/source/pkg-config' && PKG_CONFIG_PATH="/phptg/static-php-cli/buildroot/lib/pkgconfig" CC='musl-gcc' CXX='g++' ./configure --disable-shared --enable-static --with-internal-glib --prefix=/phptg/static-php-cli/buildroot --without-sysroot --without-system-include-path --without-system-library-path --without-pc-path 1>/dev/null 2>&1
[23:30:04] [CRIT] Please check with --debug option to see more details.
The text was updated successfully, but these errors were encountered: