We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Travis "without" cphalcon

Hi,

I'm trying to run travis build with phalcon extension for vegas-cmf. What is really cool, before_install process going smooth, but when it comes to composer, I have troubles:

 $ sudo php composer.phar install --dev --no-interaction
 Loading composer repositories with package information
 Reading composer.json of phalcon/devtools (1.0.0)Installing dependencies (including require-dev)
 Your requirements could not be resolved to an installable set of packages.
   Problem 1
     - The requested PHP extension ext-phalcon >=1.3.0,<2 is missing from your system.
   Problem 2
     - Installation request for phalcon/incubator dev-master -> satisfiable by phalcon/incubator[dev-master].
     - phalcon/incubator dev-master requires ext-phalcon >=1.2.4 -> the requested PHP extension phalcon is missing from your system.
The command "sudo php composer.phar install --dev --no-interaction" failed and exited with 2 during .
Your build has been stopped.

My .travis.yml looks like this:

language: php

php:
  - 5.5
  - 5.4

services:
  - mongodb
  - memcached

before_install:
  - sudo apt-get install php5-dev libpcre3-dev gcc make php5-mysql
  - git clone --depth=1 git://github.com/phalcon/cphalcon.git
  - cd cphalcon/build
  - sudo ./install
  - cd ../..
  - echo "extension=phalcon.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  - sudo service php5-fpm restart

install:
  - curl -s https://getcomposer.org/installer | php
  - sudo php composer.phar install --dev --no-interaction

script:
  - mkdir -p build/logs
  - php vendor/bin/phpunit -c travis.phpunit.xml.dist

after_script:
  - php vendor/bin/coveralls -v

Any idea why composer doesn't see phalcon extenstion?



98.9k

Maybe the installation is not being compiled correctly, do you see any errors in compilation?



5.1k
edited Nov '14

Compiling is okay, I see the problem now, check lines 231 and 243:

https://pastebin.com/cVt6igMV

Any idea how can I bypass this? :)

EDIT: I figured out that there is also ./travis-install file. Used it insted ./install but still with the same result (but without information where .so file is after build).

EDIT2: Another approach:

  • sudo ./travis-install
  • echo "extension_dir=pwd/64bits/modules" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
  • echo "extension=phalcon.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini Failed with:
PHP Warning:  PHP Startup: Unable to load dynamic library '/home/travis/build/vegas-cmf/core/cphalcon/build/64bits/modules/phalcon.so' - /home/travis/build/vegas-cmf/core/cphalcon/build/64bits/modules/phalcon.so: undefined symbol: compiler_globals in Unknown on line 0

Maybe the installation is not being compiled correctly, do you see any errors in compilation?



5.1k
Accepted
answer

Well I ended using travis.yml from https://github.com/phalcon/incubator.