New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to install xdebug #538

Closed
Niehztog opened this Issue Jul 3, 2015 · 4 comments

Comments

Projects
None yet
3 participants
@Niehztog

Niehztog commented Jul 3, 2015

I installed a fresh phpbrew on my debian 8 system. i then installed php 5.2 using the following command:

phpbrew install 5.3.22 +default

then switched it on using

phpbrew use php-5.3.22

but installation of xdebug gives an error:

phpbrew ext install xdebug 
===> Downloading from http://pecl.php.net/get/xdebug-2.3.2.tgz
[==================================================================] 260.05/260.05KB 100%
===> /home/nilgot/.phpbrew/distfiles/xdebug-2.3.2.tgz downloaded.
===> Extracting to /home/nilgot/.phpbrew/build/php-5.3.22/ext...
===> Installing xdebug extension...
Log stored at: /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/build.log
Changing directory to /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug
===> Phpize...
===> Configuring...
===> Building...
===> Running make all: make -C /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug  all  >> /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/build.log 2>&1
Exception: Command failed: make -C /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug  all  >> /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/build.log 2>&1 returns

    0) PhpBrew\Utils::system(['make', '-C', '/home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug', '', 'all', ' >> /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/build.log 2>&1'], CLIFramework\Logger)
    1) PhpBrew\Tasks\MakeTask->make('/home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug', 'all')
    2) PhpBrew\Tasks\MakeTask->run(PhpBrew\Extension\PeclExtension)
    3) PhpBrew\Extension\ExtensionInstaller->install(PhpBrew\Extension\PeclExtension, [])
    4) PhpBrew\Extension\ExtensionManager->installExtension(PhpBrew\Extension\PeclExtension, [])
    5) PhpBrew\Command\ExtensionCommand\InstallCommand->execute('xdebug')
    6) call_user_func_array([PhpBrew\Command\ExtensionCommand\InstallCommand, 'execute'], ['xdebug'])
    7) CLIFramework\CommandBase->executeWrapper(['xdebug'])
    8) CLIFramework\Application->run(['/usr/bin/phpbrew', 'ext', 'install', 'xdebug'])
    9) CLIFramework\Application->runWithTry(['/usr/bin/phpbrew', 'ext', 'install', 'xdebug'])
    10) require('phar:///usr/bin/phpbrew/scripts/phpbrew-emb.php')

Here are the contens of de build logfile:

tail /home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/build.log
/home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/xdebug.c:1672:42: error: ‘zend_op’ has no member named ‘result_type’
    zval *ret = xdebug_zval_ptr(cur_opcode->result_type, &(cur_opcode->result), current_execute_data TSRMLS_CC);
                                          ^
/home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/xdebug.c: In function ‘xdebug_compile_file’:
/home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug/xdebug.c:1711:81: error: ‘ZEND_ACC_DONE_PASS_TWO’ undeclared (first use in this function)
   if (XG(do_code_coverage) && XG(code_coverage_unused) && (op_array->fn_flags & ZEND_ACC_DONE_PASS_TWO)) {
                                                                                 ^
Makefile:198: recipe for target 'xdebug.lo' failed
make: *** [xdebug.lo] Error 1
make: Leaving directory '/home/nilgot/.phpbrew/build/php-5.3.22/ext/xdebug'
@stefanchiriac

This comment has been minimized.

Show comment
Hide comment
@stefanchiriac

stefanchiriac Jul 9, 2015

tried on ubuntu 14.04 with php 5.4.42 and I get the same error
Edit:
Now it works. After I switched to 5.4.42, I opened a new terminal, tried again and worked. Also I had to make the extensions directory writable

stefanchiriac commented Jul 9, 2015

tried on ubuntu 14.04 with php 5.4.42 and I get the same error
Edit:
Now it works. After I switched to 5.4.42, I opened a new terminal, tried again and worked. Also I had to make the extensions directory writable

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Jul 22, 2015

Member

@stefanchiriac the ext dir should always be writable, unless you did some exotic setup.

Member

marcioAlmada commented Jul 22, 2015

@stefanchiriac the ext dir should always be writable, unless you did some exotic setup.

@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Jul 22, 2015

Member

@Niehztog did you try an older version of xdebug? We got reports that the latest version of xdebug is not compiling against php 5.3 without a patch. Try this version:

phpbrew ext install xdebug 2.2.7

You can get a list of available extension versions with:

$ phpbrew ext known xdebug                                                       

2.3.2, 2.3.1, 2.3.0, 2.2.7, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0,
2.2.0RC2, 2.2.0RC1, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.1.1RC1, 2.1.0, 2.1.0RC1,
2.1.0beta3, 2.1.0beta2, 2.1.0beta1, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0,
2.0.0RC4, 2.0.0RC3, 2.0.0RC2, 2.0.0RC1, 2.0.0beta6, 2.0.0beta5, 2.0.0beta4,
2.0.0beta3, 2.0.0beta2, 2.0.0beta1, 1.3.2, 1.3.1, 1.3.0, 1.3.0rc2, 1.3.0rc1,
1.2.0
Member

marcioAlmada commented Jul 22, 2015

@Niehztog did you try an older version of xdebug? We got reports that the latest version of xdebug is not compiling against php 5.3 without a patch. Try this version:

phpbrew ext install xdebug 2.2.7

You can get a list of available extension versions with:

$ phpbrew ext known xdebug                                                       

2.3.2, 2.3.1, 2.3.0, 2.2.7, 2.2.6, 2.2.5, 2.2.4, 2.2.3, 2.2.2, 2.2.1, 2.2.0,
2.2.0RC2, 2.2.0RC1, 2.1.4, 2.1.3, 2.1.2, 2.1.1, 2.1.1RC1, 2.1.0, 2.1.0RC1,
2.1.0beta3, 2.1.0beta2, 2.1.0beta1, 2.0.5, 2.0.4, 2.0.3, 2.0.2, 2.0.1, 2.0.0,
2.0.0RC4, 2.0.0RC3, 2.0.0RC2, 2.0.0RC1, 2.0.0beta6, 2.0.0beta5, 2.0.0beta4,
2.0.0beta3, 2.0.0beta2, 2.0.0beta1, 1.3.2, 1.3.1, 1.3.0, 1.3.0rc2, 1.3.0rc1,
1.2.0
@marcioAlmada

This comment has been minimized.

Show comment
Hide comment
@marcioAlmada

marcioAlmada Jul 22, 2015

Member

Ways to fix that:

  • Patch xdebug automatically if php is 5.3 but this will not work forever as the latest xdebug source will change over time, specially when ported to php7, and the patch will fail.
  • Make phpbrew prefer xdebug 2.2.7 automatically when php is 5.3.
  • Accept that it only get's harder to use outdated software, php 5.3 and 5.2 are on this threshold, and picking a compatible extension version is not that bad.

Thoughts?

Member

marcioAlmada commented Jul 22, 2015

Ways to fix that:

  • Patch xdebug automatically if php is 5.3 but this will not work forever as the latest xdebug source will change over time, specially when ported to php7, and the patch will fail.
  • Make phpbrew prefer xdebug 2.2.7 automatically when php is 5.3.
  • Accept that it only get's harder to use outdated software, php 5.3 and 5.2 are on this threshold, and picking a compatible extension version is not that bad.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment