drupal-vm icon indicating copy to clipboard operation
drupal-vm copied to clipboard

undefined symbol: zend_sort

Open sbubaron opened this issue 9 years ago • 10 comments

Issue Type

  • Bug Report / Support Request

Your Environment

Vagrant 1.9.1
bash: vboxmanage: command not found
VirtualBox
bash: ansible: command not found

VirtualBox: Version 5.0.30 r112061

Your OS

  • Windows 10

Full console output

N/A

Summary

After switching from php7.0 to 5.6 and running vagrant provision the following error would pop up in the console randomly while running drush commands:

Failed loading /usr/lib/php5/modules/xdebug.so:  /usr/lib/php5/modules/xdebug.so: undefined symbol: zend_sort

vagrant destroy and vagrant up seemed to fix it -- but oxyc requested I open a new issue.

sbubaron avatar Dec 22 '16 20:12 sbubaron

Found the bug. It's because https://github.com/geerlingguy/ansible-role-php-xdebug/blob/master/tasks/main.yml#L33:L42 (and xhprof, uploadprogress) do not re-compile as there's no name change. It simply copies the old version in place.

TASK [geerlingguy.php-xdebug : Build Xdebug.] ********************************** ok: [drupalvm_project] => (item=phpize) ok: [drupalvm_project] => (item=./configure) ok: [drupalvm_project] => (item=make)

For reference: https://github.com/geerlingguy/drupal-vm/pull/1043#issuecomment-268879545

oxyc avatar Dec 23 '16 00:12 oxyc

ping @thom8 @geerlingguy maybe fix this in the upstream roles by changing it to something like:

- name: Build Xdebug.
  shell: >
    {{ item }}
    chdir={{ workspace }}/xdebug-{{ php_xdebug_version }}-php{{ php_version }}
    creates={{ workspace }}/xdebug-{{ php_xdebug_version }}-php{{ php_version }}/modules/xdebug.so
  with_items:
    - phpize
    - ./configure
    - make
  notify: restart webserver

That introduces a dependency on the php_version variable though (php_extension_conf_paths is already a dependency).

oxyc avatar Dec 23 '16 00:12 oxyc

@oxyc as a workaround we make workspace PHP version specific -- https://github.com/beetboxvm/beetbox/blob/master/provisioning/ansible/config/default.config.yml#L282

thom8 avatar Dec 23 '16 00:12 thom8

Hehe I just realized my suggestion didn't work as it was supposed to be the name of the downloaded file.

Hmm sucks to recompile stuff such as solr etc because of a php version change though.

oxyc avatar Dec 23 '16 00:12 oxyc

agreed it's not ideal but it's only an issue when switching php versions on an existing VM.

thom8 avatar Dec 23 '16 00:12 thom8

True, it doesn't happen that often.

oxyc avatar Dec 23 '16 00:12 oxyc

@oxyc IIRC the xdebug role always downloads and compiles but won't copy new changes in place due to "creates={{ php_xdebug_module_path }}/xdebug.so"

I tried to address that in PR https://github.com/geerlingguy/ansible-role-php-xdebug/pull/30 but it needs refreshing ( and now would need php version change like above).

joestewart avatar Dec 23 '16 13:12 joestewart

@joestewart / @oxyc - If you can get that PR updated for Xdebug, I'll get it incorporated ASAP.

geerlingguy avatar Dec 24 '16 04:12 geerlingguy

@thom8 's PR 42 looks like a better solution that 30 https://github.com/geerlingguy/ansible-role-php-xdebug/pull/42

joestewart avatar Dec 24 '16 16:12 joestewart

@joestewart - Thanks, yes that looks best, so I've merged it upstream.

geerlingguy avatar Dec 27 '16 15:12 geerlingguy