Skip to content
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

Segmentation fault after "Generating autoload files" with php-5.6.0alpha3 #2774

Closed
sylvainfilteau opened this issue Mar 3, 2014 · 10 comments
Labels

Comments

@sylvainfilteau
Copy link
Contributor

I just compiled php-5.6.0alpha3 and tried installing dependencies of composer using... composer ! Unfortunately, I get a "Segmentation fault" error after the "Generating autoload files" message.

Here are the step used to compile php-5.6.0alpha3 on Ubuntu 13.10:

# Install base dependencies
sudo apt-get install apache2 apache2-dev build-essential libxml2-dev \
    libcurl4-openssl-dev libgmp-dev

# Necessary to make work the GMP extension
ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/include/gmp.h

# Download and install PHP 5.6.0alpha1
wget http://downloads.php.net/tyrael/php-5.6.0alpha3.tar.bz2
tar -xjvf php-5.6.0alpha3.tar.bz2
cd php-5.6.0alpha3
./configure --with-curl --with-gmp --enable-mysqlnd --enable-opcache \
    --with-openssl --with-pdo-pgsql --enable-phpdbg --with-pgsql --enable-zip \
    --with-apxs2
make

# Not all tests passed here
make test

make install

The I git cloned composer and runned composer:

~/composer# composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing justinrainbow/json-schema (1.3.5)
    Downloading: 100%

  - Installing seld/jsonlint (1.1.2)
    Downloading: 100%

  - Installing symfony/console (v2.4.2)
    Downloading: 100%

  - Installing symfony/finder (v2.4.2)
    Downloading: 100%

  - Installing symfony/process (v2.4.2)
    Downloading: 100%

  - Installing phpunit/php-token-stream (1.2.1)
    Downloading: 100%

  - Installing symfony/yaml (v2.4.2)
    Downloading: 100%

  - Installing phpunit/php-text-template (1.2.0)
    Downloading: 100%

  - Installing phpunit/phpunit-mock-objects (1.2.3)
    Downloading: 100%

  - Installing phpunit/php-timer (1.0.5)
    Downloading: 100%

  - Installing phpunit/php-file-iterator (1.3.4)
    Downloading: 100%

  - Installing phpunit/php-code-coverage (1.2.16)
    Downloading: 100%

  - Installing phpunit/phpunit (3.7.32)
    Downloading: 100%

symfony/console suggests installing symfony/event-dispatcher ()
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (>=2.0.5)
phpunit/phpunit suggests installing phpunit/php-invoker (>=1.1.0,<1.2.0)
Generating autoload files
Segmentation fault (core dumped)

I tried debugging it but I cannot run unit tests on the repository because I cannot install it's dependencies (fuck me). I think it may be related to the extensions I installed or something like that...

Maybe someone can help me generate the autoloader manually so I can properly unit test ?

Thanks !

@Seldaek
Copy link
Member

Seldaek commented Mar 3, 2014

Don't you have access to another php version you could run the initial install with?

@Seldaek Seldaek added the Support label Mar 3, 2014
@Seldaek
Copy link
Member

Seldaek commented Mar 3, 2014

The test suite runs on alpha1 at least - if you can't figure it out I'll try to get me an alpha3 later.

@sylvainfilteau
Copy link
Contributor Author

I wasn't able to run it on alpha1 too... so it must be something with my
setup then.

On Monday, March 3, 2014, Jordi Boggiano notifications@github.com wrote:

The test suite runs on alpha1https://travis-ci.org/composer/composer/jobs/19942724at least - if you can't figure it out I'll try to get me an alpha3 later.

Reply to this email directly or view it on GitHubhttps://github.com//issues/2774#issuecomment-36491947
.

Sylvain Filteau
http://www.cidsphere.com

@sylvainfilteau
Copy link
Contributor Author

I was able to pinpoint the exact line causing the Segmentation Fault. It is \Composer\Autoload\ClassMapGenerator::findClasses at line 101, the function php_strip_whitespace.

The following gist is the minimum to reproduce the problem: https://gist.github.com/sylvainfilteau/9359062

It's a PHP issue, you can see a bug report about that there: https://bugs.php.net/bug.php?id=66751

@Seldaek
Copy link
Member

Seldaek commented Mar 5, 2014

Yes it's definitely a php issue and please report it to bugs.php.net if
you haven't done so :) That's the kind of stuff we really want them to
fix before the stable release.

@Tyrael
Copy link

Tyrael commented Apr 13, 2014

hi,
should be fixed in the PHP-5.6 branch, you could test it with the latest snapshot or in the upcoming beta2:
https://bugs.php.net/bug.php?id=66660

@petk
Copy link
Contributor

petk commented Apr 14, 2014

Thank you for this fix. I can confirm Composer now works OK with the latest 5.6 snapshot. Regards.

@Seldaek Seldaek closed this as completed Apr 14, 2014
@fgm
Copy link

fgm commented Apr 21, 2014

Same problem (at least same symptom) with php-5.6.0beta1 (from Sury PPA) on Ubuntu 14.04. "Generating autoload files. Segmentation fault (core dumped)".

@Seldaek
Copy link
Member

Seldaek commented Apr 21, 2014

@fgm Tyrael said above it'll be fixed in beta2 so I guess it's been applied after beta1 was tagged :)

@fgm
Copy link

fgm commented Apr 21, 2014

Indeed this no longer happens with a custom PHP build of todays 5.6 HEAD (with unsupported Bison 3.0.2 !), thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants