Skip to content

In-tree building parallel may produces wrong php-config (empty PHP_VERSION) #333

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

Closed
crazywhalecc opened this issue Dec 5, 2024 · 3 comments · Fixed by #334
Closed

In-tree building parallel may produces wrong php-config (empty PHP_VERSION) #333

crazywhalecc opened this issue Dec 5, 2024 · 3 comments · Fixed by #334

Comments

@crazywhalecc
Copy link

PHP_VERSION=$($PHP_CONFIG --vernum)

After copying parallel to php-src/ext/parallel/ dir and build PHP, we will get php-config script with empty PHP_VERSION variable.

It seems that PHP_VERSION=$($PHP_CONFIG --vernum) returns an empty value in in-tree build mode, because there is no php-config at this time. This will cause the code to become PHP_VERSION=, and finally the PHP version recorded in config.status after configure is completed is empty.

Perhaps we can change the variable name (such as PARALLEL_PHP_VERSION), or consider the $PHP_VERSION variable that already exists in in-tree build.

@cmb69
Copy link
Collaborator

cmb69 commented Dec 5, 2024

Maybe:

if [ -n "$PHP_VERSION" ]; then PHP_VERSION=$($PHP_CONFIG --vernum); fi

@realFlowControl
Copy link
Collaborator

Hey @crazywhalecc 👋

would you mind trying your in-tree build with the changes from #334?
I tried locally already and it looked good so far, if you can confirm this PR solving your problem I'd merge.

Thanks for reaching out 🎉

@crazywhalecc
Copy link
Author

crazywhalecc commented Dec 5, 2024

@realFlowControl It looks good to me, thanks for your quick action!

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 a pull request may close this issue.

3 participants