Skip to content

fix building of shared extensions (grpc, simdjson, soap) - #905

Merged
henderkes merged 39 commits into
mainfrom
fix/grpc-shared
Oct 12, 2025
Merged

fix building of shared extensions (grpc, simdjson, soap)#905
henderkes merged 39 commits into
mainfrom
fix/grpc-shared

Conversation

@henderkes

@henderkes henderkes commented Sep 18, 2025

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator Author

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

@henderkes

Copy link
Copy Markdown
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 thread src/globals/functions.php
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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/SPC/util/SPCConfigUtil.php Outdated
Comment thread src/SPC/builder/extension/simdjson.php
@henderkes

Copy link
Copy Markdown
Collaborator Author

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

Comment thread src/SPC/builder/Extension.php Outdated
Comment thread src/SPC/builder/linux/LinuxBuilder.php Outdated
Comment thread config/env.ini
@henderkes
henderkes merged commit 6d6a293 into main Oct 12, 2025
9 checks passed
@henderkes
henderkes deleted the fix/grpc-shared branch October 12, 2025 09:24
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