sensational / sassphp

PHP bindings to libsass - fast, native Sass parsing in PHP!
Other
229 stars 39 forks source link

Make test fails after installation #35

Closed abayob closed 7 years ago

abayob commented 7 years ago

Heya,

I am trying to use this library on CentOS 6.8. I know the gcc version was outdated, so I installed a different gcc (version 4.7.2) and edited the /sassphp/lib/libsass/Makefile and added the following lines:

export CC=/opt/centos/devtoolset-1.1/root/usr/bin/gcc export CPP=/opt/centos/devtoolset-1.1/root/usr/bin/cpp export CXX=/opt/centos/devtoolset-1.1/root/usr/bin/c++

(explained here: https://superuser.com/questions/381160/how-to-install-gcc-4-7-x-4-8-x-on-centos)

The installation went without issues.

However, when running the make test command, the first thing fails:

Warning: PHP Startup: Unable to load dynamic library '/var/www/http_docs/sassphp/modules/sass.so' - /var/www/http_docs/sassphp/modules/sass.so: undefined symbol: _ZSt11_Hash_bytesPKvmm in Unknown on line 0

All test are then skipped. This seems logical imo if the sass.so cannot be loaded?

Any idea what is going wrong? Which file is being called with the make test command? Do I need to add the lines mentioned above in that file too?

abayob commented 7 years ago

Oke, I figured out what was causing this issue. The PHP compiler uses the old gcc compiler, so by symlinking the new version (4.7), the compiling works!