Skip to content

Conversation

henderkes
Copy link
Collaborator

@henderkes henderkes commented Sep 18, 2025

What does this PR do?

fixes grpc shared compilation - it just ignores CXXFLAGS and instead abuses CPPFLAGS for what should in CXXFLAGS...
closes #908

Checklist before merging

If your PR involves the changes mentioned below and completed the action, please tick the corresponding option.
If a modification is not involved, please skip it directly.

  • If you modified *.php or *.json, run them locally to ensure your changes are valid:
    • composer cs-fix
    • composer analyse
    • composer test
    • bin/spc dev:sort-config
  • If it's an extension or dependency update, please ensure the following:
    • Add your test combination to src/globals/test-extensions.php.
    • If adding new or fixing bugs, add commit message containing extension test or test extensions to trigger full test suite.

@henderkes henderkes added the bug Something isn't working label Sep 18, 2025
@henderkes
Copy link
Collaborator Author

meh, it looks like that's not enough. may have to remove -Wl,--as-needed instead (just for ImageMagick)

@henderkes
Copy link
Collaborator Author

closes #908

@henderkes henderkes changed the title Fix/grpc shared fix building of various shared extensions (grpc, simdjson, etc.) Sep 23, 2025
@henderkes henderkes changed the title fix building of various shared extensions (grpc, simdjson, etc.) fix building of shared extensions (grpc, simdjson, soap) Sep 23, 2025
Comment on lines +15 to +19
$original_ldflags = $this->builder->arch_ld_flags;
if (str_contains($this->builder->arch_ld_flags, '-Wl,--as-needed')) {
$this->builder->arch_ld_flags = str_replace('-Wl,--as-needed', '', $original_ldflags);
}

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 possible to change only for this scope rather than modifying builder property? I don't think modifying builder's value is the best idea.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I can't think of a way, unfortunately, other than patching imagemagick's ./configure, but that would be much worse than temporarily changing the ldflags.

@henderkes
Copy link
Collaborator Author

I'll work on it next week. On a business trip until Sunday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Trim gRPC download
2 participants