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

Cannot find -lgcc_s: No such file or directory #1026

Merged
merged 2 commits into from
Sep 15, 2024

Conversation

goossda
Copy link
Contributor

@goossda goossda commented Sep 11, 2024

I have no idea why, but when building the static binary, i got the following error:

image

I did a build with:

docker buildx bake \
--load \
--set static-builder.args.PHP_VERSION="8.3" \
--set static-builder.args.PHP_EXTENSIONS="inotify,sodium,apcu,bcmath,bz2,calendar,ctype,curl,dba,dom,exif,fileinfo,filter,gd,iconv,intl,ldap,mbregex,mbstring,mysqli,mysqlnd,opcache,openssl,pcntl,pdo,pdo_mysql,pdo_pgsql,pdo_sqlite,pgsql,phar,posix,readline,redis,session,simplexml,sockets,sqlite3,sysvsem,tokenizer,xml,xmlreader,xmlwriter,zip,zlib,amqp" \
--set static-builder.args.TARGETARCH="amd64" \
--set '*.platform=linux/amd64' \
static-builder
docker cp $(docker create --name static-builder dunglas/frankenphp:static-builder):/go/src/app/dist/frankenphp-linux-x86_64 ../../../dist/frankenphp; docker rm static-builder

I filtered "-lgcc_s" out of the CGO_LDFLAGS to get the compile running again.

Any idea what i did wrong? Or is it a very recent issue?

@dunglas
Copy link
Owner

dunglas commented Sep 11, 2024

It would be cool to find which lib adds gcc_s as it's likely an upstream bug: https://gnu.gcc.help.narkive.com/pidFkujy/what-is-gcc-s-lib

In the meantime, your workaround looks good to me.

@dunglas dunglas mentioned this pull request Sep 15, 2024
@dunglas dunglas merged commit 6c0292a into dunglas:main Sep 15, 2024
32 checks passed
@dunglas
Copy link
Owner

dunglas commented Sep 15, 2024

Thanks

@goossda goossda deleted the bugfix/lgcc-s-issue branch September 16, 2024 08:13
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