Comments (6)
@Neofox Although I cannot explain exactly why, the ld issue can be fixed by the removal of the configure flag --build=x86_64-linux-musl
.
If you want a full explanation I recommend you ask this to the alpine / musl maintainers. (BTW The fact there is not an implementation for qsort_r yet in musl libc make me really sad.)
Here is a patched Dockerfile to handle this:
FROM php:7.0-fpm-alpine
RUN apk update \
&& apk add --no-cache zlib-dev pcre-dev
RUN apk --no-cache add ca-certificates \
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/sgerrand/alpine-pkg-glibc/master/sgerrand.rsa.pub \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.23-r3/glibc-2.23-r3.apk \
&& apk add glibc-2.23-r3.apk
## Install spx extension
# git clone of the project
RUN apk add git
RUN mkdir -p /usr/src/php/ext \
&& cd /usr/src/php/ext \
&& git clone https://github.com/NoiseByNorthwest/php-spx.git spx \
&& cd spx/ \
&& git checkout compat-alpine_linux
COPY ./spx.ini /usr/local/etc/php/conf.d/
# run the classic extension installation (same one as indicated in the documentation)
RUN apk add --no-cache --virtual .phpize-deps-configure $PHPIZE_DEPS
RUN cd /usr/src/php/ext/spx && phpize && ./configure
RUN docker-php-ext-install spx
# For debugging
RUN php -i | grep -i spx
RUN SPX_ENABLED=1 SPX_BUILTINS=1 php -r 'echo "OK " . time();'
EXPOSE 9000
CMD ["php-fpm"]
As you can see I use the compat-alpine_linux
branch. I will merge it once you confirm this resolves the issue.
from php-spx.
Hello,
Thanks for reporting this detailled issue. It sounds like a minor build failure, I will fix it in the evening !
from php-spx.
Your setup use a fairly recent version of gcc (5.3) as opposed to the one (4.8) I use & used by Travis CI.
The first error is just the use of stdout & stderr as identifier which appears to violate gnu99 rules (the default std switch used on gcc 5). Easy to fix.
But there is still another issue: qsort_r, which is used in src/spx_reporter_fp.c, is simply not available.
So I have to think on workaround, not so easy. I knew I will face compatibility issues by using it, but I m surprised to encounter a "no definition" on a GNU/Linux plateform.
It will be a matter of days.
from php-spx.
This is in fact musl libc which is used on this image, I will investigate.
68a55f228c48:/usr/src/php/ext/spx# /usr/lib/libc.so
musl libc (x86_64)
Version 1.1.14
Dynamic Program Loader
Usage: /usr/lib/libc.so [options] [--] pathname [args]
EDIT:
Once build, there is still an ld issue
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20151012/spx.so' - Error relocating /usr/local/lib/php/extensions/no-debug-non-zts-20151012/spx.so: __snprintf_chk: symbol not found in Unknown on line 0
I've find lot of similar issues with Alpine on google.
from php-spx.
looks alright for me, thanks for the insight and your time !
from php-spx.
Thanks for your feedback !
from php-spx.
Related Issues (20)
- Core dumped when executing with long arguments HOT 5
- Link to code.jquery.com HOT 2
- UI / Report: highlight a partircular (or pattern) function call count as a dynamic metric
- Feature request: visualize static and instance methods differently
- Feature Request: SQL Query time HOT 1
- Accessibility issue. Light mode needed as not everyone can see the dark contrast. HOT 2
- PHP 5.4 support HOT 1
- Web UI not loading HOT 1
- Support for PHP 8.3
- Potential misinformation about leak HOT 3
- No UI on site hosted behind Reverse Proxy HOT 3
- ESM modules resolution error HOT 1
- File not found. HOT 1
- Install fails in MacOS Ventura HOT 4
- SPX does not intercept when using built-in server HOT 1
- configure error on macOS : cannot find zlib HOT 3
- spx.so: undefined symbol: gc_globals HOT 4
- perf_events HOT 7
- installation documentation not super clear HOT 1
- Callgraph and visualization generated with sampling can be inaccurate and misleading as described in the the description HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from php-spx.