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

add ext-ldap and ext-sysvsem to static builder, add PHP_EXTENSION_LIBS to enhance extensions #203

Merged
merged 6 commits into from
Nov 1, 2023

Conversation

DubbleClick
Copy link
Contributor

@DubbleClick DubbleClick commented Sep 13, 2023

-snip-

closes #256

@DubbleClick DubbleClick marked this pull request as draft September 13, 2023 05:25
@DubbleClick DubbleClick changed the title add ext-imap and ext-ldap to static php build add ext-ldap and ext-sysvsem to static builder, add PHP_EXTENSION_LIBS to enhance extensions, docs for multiple workers Oct 4, 2023
@DubbleClick DubbleClick marked this pull request as ready for review October 4, 2023 22:07
@DubbleClick
Copy link
Contributor Author

DubbleClick commented Oct 4, 2023

it is possible that the default selection for --with-libs will not compile at the moment, because libwebp does not properly include its libwebpmux dependency in libwebp.pc, so imagick depending on libwebp gets unresolved extenal symbols to MUX methods. That will be fixed soon in SPC

@DubbleClick DubbleClick changed the title add ext-ldap and ext-sysvsem to static builder, add PHP_EXTENSION_LIBS to enhance extensions, docs for multiple workers add ext-ldap and ext-sysvsem to static builder, add PHP_EXTENSION_LIBS to enhance extensions Oct 5, 2023
@DubbleClick
Copy link
Contributor Author

this should work in combination with #241 once the spc imap branch is merged
definitely works after crazywhalecc/static-php-cli#214 is merged

@DubbleClick DubbleClick marked this pull request as draft October 5, 2023 19:35
@DubbleClick
Copy link
Contributor Author

drafted until linux c++ extension support is merged in static-php

@dunglas dunglas mentioned this pull request Oct 9, 2023
@DubbleClick DubbleClick marked this pull request as ready for review October 31, 2023 22:17
@DubbleClick
Copy link
Contributor Author

Might have to rerun the failed checks, they should work on spc master now.

@@ -57,7 +58,7 @@ RUN git clone --depth=1 https://github.com/crazywhalecc/static-php-cli . && \

RUN --mount=type=secret,id=github-token GITHUB_TOKEN=$(cat /run/secrets/github-token) ./bin/spc download --with-php=$PHP_VERSION --all

RUN ./bin/spc build --build-embed --enable-zts "$PHP_EXTENSIONS"
RUN ./bin/spc build --build-embed --enable-zts --disable-opcache-jit "$PHP_EXTENSIONS" --with-libs="$PHP_EXTENSION_LIBS"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it mandatory to disable the JIT?

Copy link
Contributor Author

@DubbleClick DubbleClick Nov 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily, I haven't figured out what causes the relocation problems, but compiling FrankenPHP as non-PIE fixes the issue and JIT doesn't have to be disabled.

Your initial implementation in spc disabled it generally, I just made it enabled by default so that when someone doesn't build position independent executables it may be used. Producing static pic php leads to issues on other places too, see php/php-src#12442 (strangely not the case with alpine gcc, which has default-pie enabled).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I'm not sure of what's the best to do. Let's merge as is for now. Thank you very much for all your work on these topics!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I can't really figure out what causes or fixes these issues and google isn't of much help either. All the suggestions (such as upgrading bintools) don't appear to make a difference.

@dunglas dunglas merged commit ea2c7c2 into dunglas:main Nov 1, 2023
27 checks passed
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.

Enable sysvsem extension
2 participants