Closed remicollet closed 1 year ago
Looks like github.com couldn't be resolved for you? I never had the issue I need an offline build.
The extension shouldn't be that big, we're stripping the rust debug information within config.m4, so it should be a reasonable ~6MB (before was ~2MB).
The cargo build indeed does not inherit the -j
flag, that's something we can fix.
vendoring the dependencies would be possible for the pecl build, if that would help you?
Looks like github.com couldn't be resolved for you? I never had that issue...
Yes, this issue is about OFFLINE build (so without internet access)
Sorry, misread the title, we'll investigate whether we can vendor in pecl archive.
For your information, here is how I create the vendor directory https://git.remirepo.net/cgit/rpms/php/pecl/php-pecl-datadog-trace.git/diff/makedeps.sh?id=8e686507c7db25dd54dbb5c4ce7cd4d46dde6af1
And how I configure cargo to use vendored dep. https://git.remirepo.net/cgit/rpms/php/pecl/php-pecl-datadog-trace.git/tree/php-pecl-datadog-trace.spec#n116
Only issue is with "tarpc" which is from github, not from crates.io
Need to find (if possible) the proper source name(s) to replace-with = "vendored-sources"
Hey @remicollet,
we've just released 0.88.1, which includes tarpc directly vendored in the libdatadog folder. With you setup using crates.io, it now should properly compile.
Please let me know if there are still issues. Thanks for all the work you are doing packaging our tracer :-)
I confirm version 0.88.1 build fine offline using the vendored solution.
BTW
Yes ext is now really, really huge and not suitable for my docker images.
On the same based docker image :
debian 12 - ddtrace 0.87.2
ls -sh $(php-config --extension-dir)/ddtrace.so
412K /usr/local/lib/php/extensions/no-debug-non-zts-20220829/ddtrace.so
debian 12 - ddtrace 0.88.1
ls -sh $(php-config --extension-dir)/ddtrace.so
140M /usr/local/lib/php/extensions/no-debug-non-zts-20220829/ddtrace.so
That's 440 times more space !
Something went wrong and we accidentally enabled rust debug builds by default when installing manually.
Pass to ./configure
: --disable-ddtrace-rust-debug
to build in release mode, and --disable-ddtrace-rust-symbols
to strip debug symbols from rust (only).
It should always use rust release builds from the next version on, when targeting non-debug php builds.
It's a lot better, it drop to 6.5M.
Thx
Since version 0.88.0 which uses rust :(
Possible workaround used for some other ext (ex skywalking_agent) is to vendor the dependencies (using
cargo vendor ...
)Sadly it doesn't work for this project
Other common issues with rust
For now, this is a blocker for me packaging RPM Will stay with 0.87.2 until some hack is found.