suggestion about compile.md
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Quiet
- Domain
- build-system, documentation
Research direction
Start with compile.md and compare its existing run instructions with the reported commands for multiple PHP versions. Document the required PHP library path when php-config cannot resolve libphp, then verify that the documented command matches the working example and lets the project run.
Written by the indexing model from the issue text.
Description
Describe you feature request
Is your feature request related to a problem? Please describe.
When I have multiple versions of PHP installed (php7.4, php8.1, php8.3), I execute the run command:
CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS="$(php-config --ldflags) $(php-config --libs)" go run .
It prompts:
# github.com/dunglas/frankenphp/caddy/frankenphp
/home/circle/go/pkg/mod/golang.org/toolchain@v0.0.1-go1.22.0.linux-amd64/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lphp
collect2: error: ld returned 1 exit status
Describe the solution you'd like
This error indicates that the ld encountered a problem when trying to link the libphp library. After I changed it to this, the program can run:
CGO_CFLAGS=$(php-config --includes) CGO_LDFLAGS="$(php-config --ldflags) -L/usr/local/php8.3/lib -lphp $(php-config --libs)" go run . run
Should this be written into compile.md?
- Dominant language
- Go
- Stars
- 11.3k
- Forks
- 488
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 13
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from php/frankenphp
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
php/frankenphp#2483 · 3 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
php/frankenphp#2657 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 56/100
php/frankenphp#2644 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
php/frankenphp#2643 · 3 comments · 1 reaction ·
-
bug
Difficulty 5/5 Over a week Newbie friendliness 42/100
php/frankenphp#2631 · 1 comment ·
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·