apm-agent-php
apm-agent-php copied to clipboard
Fixed building error on Mac OS
Closes #308
This does not build on OSX still.
In file included from /tmp/apm-agent-php/src/ext/ConfigManager.c:33:
In file included from ./elastic_apm_alloc.h:28:
./platform.h:24:17: fatal error: 'features.h' file not found
# include <features.h>
^~~~~~~~~~~~
GCC is installed, hence the issue I would assume.
try ifndef __APPLE__
perhaps? The issue is this is not the only build error. The sys/sysinfo.h stuff also fails after this one is fixed as that also doesn't exist on osx.
:green_heart: Build Succeeded
the below badges are clickable and redirect to their specific view in the CI or DOCS
![]()
![]()
![]()
![]()
![]()
Expand to view the summary
Build stats
-
Start Time: 2022-12-29T10:20:19.823+0000
-
Duration: 47 min 51 sec
Test stats :test_tube:
Test | Results |
---|---|
Failed | 0 |
Passed | 15907 |
Skipped | 0 |
Total | 15907 |
:green_heart: Flaky test report
Tests succeeded.
:robot: GitHub comments
Expand to view the GitHub comments
To re-run your PR in the CI, just comment with:
-
/test
: Re-trigger the build. -
run
elasticsearch-ci/docs
: Re-trigger the docs validation. (use unformatted text in the comment!)
@dangoscomb Hi. Did you have a chance to test the latest update (i.e., with ! defined( __APPLE__ )
) to this PR?
Hi
I have not, however I did it this way:
https://github.com/dangoscomb/apm-agent-php/tree/osx-build
As mentioned in the issue it builds but I have not yet tested it works properly. Have you considered a build and test on a GitHub action running on OSX?
Latest version still has an error compiling. Would be nice to have this compiling an a Mac.
./TextOutputStream.h:47:33: error: redefinition of typedef 'TextOutputStream' is a C11 feature [-Werror,-Wtypedef-redefinition]
typedef struct TextOutputStream TextOutputStream;
^
./elastic_apm_assert.h:210:33: note: previous definition is here
typedef struct TextOutputStream TextOutputStream;
^
2 errors generated.
make: *** [AST_instrumentation.lo] Error 1
using home-brew installed php and build tools:
gcc -v
Apple clang version 13.1.6 (clang-1316.0.21.2.3)
Target: x86_64-apple-darwin21.4.0
Thread model: posix
run docs-build
We will close it for now as it has low priority. We can always can back to MacOS build in future.