GlueDev / laravel-stackdriver

Enables logging, tracing and error reporting to Google Stackdriver for Laravel
MIT License
47 stars 26 forks source link

bug: opencensus.so: undefined symbol: ZVAL_DESTRUCTOR #6

Closed ibrunotome closed 4 years ago

ibrunotome commented 4 years ago

symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20180731/opencensus.so: undefined symbol: ZVAL_DESTRUCTOR

Seems to have been resolved in dev-master (https://github.com/census-instrumentation/opencensus-php/issues/235#issuecomment-576568564)

Could you please update it in the package dependencies?

DiederikvandenB commented 4 years ago

Hi, thank you for pointing this issue out.

I think that changing the dependency to dev-master might lead to problems for projects which have minimum-stability set to stable, in which case I am not a huge fan of that.

A temporary solution would be to change the dependency in this repo, but not releasing a new version to composer (yet). You can then select dev-master for this package, until OpenCensus (finally) release a new version. Would you be okay with that?

I’m on mobile now, so can’t push the change. I will have time tomorrow though.

ibrunotome commented 4 years ago

I'm ok with that if isn't a problem to you, thank you for your attention.

DiederikvandenB commented 4 years ago

It seemed like requiring dev-master for opencensus/opencensus lead to dependency errors for opencensus-php-exporter-stackdriver, as this has its minimum-stability set to stable and it also requires opencensus/opencensus.

In order to still resolve the issue, I think it's best to use a inline alias (more info) in your composer.json. This works for me:

"require": {
    "gluedev/laravel-stackdriver": "^0.1.2",
    "opencensus/opencensus": "dev-master as 0.5.2"
},

I will keep this issue open until a new OpenCensus version is released. I started an issue for that here.

ibrunotome commented 4 years ago

Just a feedback, even with dev-master the /usr/local/lib/php/extensions/no-debug-non-zts-20180731/opencensus.so: undefined symbol: ZVAL_DESTRUCTOR persists 😞

ibrunotome commented 4 years ago

Ok, I got it, here's what I did:

  1. Created an opencensus folder in the root of my project.
  2. Copied https://github.com/census-instrumentation/opencensus-php/tree/master/ext content to it.
  3. Deleted docker and tests folder that was come in step 2.
  4. Installed opencensus from source code:
COPY opencensus/* /tmp/opencensus/

RUN cd /tmp/opencensus \
    && phpize \
    && ./configure --enable-opencensus \
    && make -j "$(nproc)" \
    && make install \
    && cd ~ \
    && rm -r /tmp/opencensus \
    && docker-php-ext-enable opencensus

And it's working now.

DiederikvandenB commented 4 years ago

Glad it is working for you now!

rediphone commented 3 years ago

I am also having this problem, I am attempting to use @ibrunotom's suggested solution. I am not using laravel-stackdriver though, just opencensus-php and getting the same error he has described.... so could be completely barking up the wrong tree here

there are other threads with this issue. I cant find a solution so just trying some stuff.. :(