Closed denji closed 10 years ago
Thanks for contributing, @denji!
I'm getting a problem with gcc building Phalcon successfully:
==> default: /bin/bash /tmp/cphalcon.z23OXJ/build/64bits/libtool --mode=compile gcc -I. -I/tmp/cphalcon.z23OXJ/build/64bits -DPHP_ATOM_INC -I/tmp/cphalcon.z23OXJ/build/64bits/include -I/tmp/cphalcon.z23OXJ/build/64bits/main -I/tmp/cphalcon.z23OXJ/build/64bits -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /tmp/cphalcon.z23OXJ/build/64bits/phalcon.c -o phalcon.lo
==> default: libtool: compile: gcc -I. -I/tmp/cphalcon.z23OXJ/build/64bits -DPHP_ATOM_INC -I/tmp/cphalcon.z23OXJ/build/64bits/include -I/tmp/cphalcon.z23OXJ/build/64bits/main -I/tmp/cphalcon.z23OXJ/build/64bits -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /tmp/cphalcon.z23OXJ/build/64bits/phalcon.c -fPIC -DPIC -o .libs/phalcon.o
==> default: gcc: internal compiler error: Killed (program cc1)
==> default: Please submit a full bug report,
==> default: with preprocessed source if appropriate.
==> default: See <file:///usr/share/doc/gcc-4.9/README.Bugs> for instructions.
==> default: make:
==> default: *** [phalcon.lo] Error 1
To confirm the build of the library failed, I double checked the loaded modules:
$ php -m | grep phalcon
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20121212/phalcon.so' - /usr/lib/php5/20121212/phalcon.so: cannot open shared object file: No such file or directory in Unknown on line 0
Have you run across this before?
@slogsdon yes problem gcc48/gcc49 more memory usage... 512mb gcc overrflow
Is there a way to get around the overflow issue? If not, would the default gcc suffice, or does the issue affect that as well?
@slogsdon fixed https://gist.github.com/denji/7f517e8cb8fd1ff0ad8c
-fno-delete-null-pointer-checks
regression gcc4.8/4.9
-fno-builtin-memcmp
regression gcc4.8/4.9
-pie -fPIC -Wl,-z,relro,-z,now -fstack-protector --param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2
, RedHat uses them by default, they remove memory leaks and security issues, factor productivity dropping 1%-ftrack-macro-expansion=0
regression gcc4.8/4.9
==> default: Build complete.
==> default: Don't forget to run 'make test'.
==> default: Installing shared extensions: /usr/lib/php5/20121212/
==> default: Thanks for compiling Phalcon!
==> default: Build succeed: Please restart your web server to complete the installation
==> default: Restarting web services
==> default: php5-fpm stop/waiting
==> default: php5-fpm start/running, process 28489
==> default: PHP extension for Phalcon has been updated
==> default: Running provisioner: shell...
default: Running: /var/folders/7b/6wvl7vm52bz4t29fxktsxbmw0000gn/T/vagrant-shell20140922-74719-jpy756.sh
==> default: stdin: is not a tty
==> default: ### Phalcon dev-tools ###
==> default: Installing Phalcon dev-tools
==> default: Cloning into '/opt/phalcon-devtools'...
$ php -m|grep phalcon
phalcon
top 10 memory usage
$ ps aux --sort -rss | head
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
mysql 18825 0.0 7.4 558552 37416 ? Ssl 02:47 0:02 /usr/sbin/mysqld
root 1270 0.0 7.0 186572 35400 ? Ssl 02:42 0:01 /usr/bin/ruby /usr/bin/puppet agent
root 1394 0.0 6.8 112692 34472 ? Sl 02:42 0:00 ruby /usr/bin/chef-client -d -P /var/run/chef/client.pid -c /etc/chef/client.rb -i 1800 -s 20 -L /var/log/chef/client.log
root 28489 0.0 4.6 452952 23576 ? Ss 02:49 0:00 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
www-data 28501 0.0 2.3 453096 11940 ? S 02:49 0:00 php-fpm: pool www
www-data 28500 0.0 2.3 453096 11740 ? S 02:49 0:00 php-fpm: pool www
root 29702 0.0 0.8 103556 4148 ? Ss 04:32 0:00 sshd: vagrant [priv]
vagrant 29756 0.0 0.8 21604 4036 pts/1 Ss 04:32 0:00 -bash
root 29596 0.0 0.6 61364 3076 ? Ss 04:32 0:00 /usr/sbin/sshd -D
Looks great! Thanks, @denji!
GCC 4.9 default used