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

Manual Installation - can't find C compiler?

Hey,

I have just installed new Ubuntu 14.04 and did everything is said in tutorial. Build essential is the newest version, but when I'm trying to install Phalcon i get:

checking for grep that handles long lines and -e... /bin/grep

checking for egrep... /bin/grep -E

checking for a sed that does not truncate output... /bin/sed

checking for cc... cc

checking whether the C compiler works... no

configure: error: in `/home/peter/cphalcon/build/64bits':

configure: error: C compiler cannot create executables

See `config.log' for more details

I've searched on the Internet but it looks that my C C++ compilers are fine, no idea why it doesn't pass this phase.



98.9k

Could you please post the contents of config.log?



98.9k

Are you manually setting CFLAGS for the installation?

as it was in tutorial (I hope)

[email protected]:/home/peter/cphalcon/build# cd 64bits

[email protected]:/home/peter/cphalcon/build/64bits# export CFLAGS="-02 --fvisibility=hidden"

[email protected]:/home/peter/cphalcon/build/64bits# ./configure --enable-phalcon



98.9k
Accepted
answer
edited Sep '14

Flags must be:

export CFLAGS="-O2 -fvisibility=hidden"
  • -O2 (upper vowel "o" and number two)
  • -fvisibility=hidden just one - instead of two --

Worked like a charm, problem solved.

You have great (fast) support here, if my 'start-up' works your framework will be more known ;)

I didn't knew it exist before i googled 'fastest php framework' yesterday

edited Nov '14

Hi,

My error is

configure:2535: $? = 0 configure:2524: cc -v >&5 Using built-in specs. COLLECT_GCC=cc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-amazon-linux/4.8.2/lto-wrapper Target: x86_64-amazon-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,fortran,ada,lto --enable-plugin --enable-initfini-array --disable-libgcj --without-isl --without-cloog --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-amazon-linux Thread model: posix gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) configure:2535: $? = 0 configure:2524: cc -V >&5 cc: error: unrecognized command line option '-V' cc: fatal error: no input files compilation terminated. configure:2535: $? = 4 configure:2524: cc -qversion >&5 cc: error: unrecognized command line option '-qversion' cc: fatal error: no input files compilation terminated. configure:2535: $? = 4 configure:2555: checking whether the C compiler works configure:2577: cc -O2 -fvisibility=hidden conftest.c >&5 collect2: fatal error: cannot find 'ld' compilation terminated. configure:2581: $? = 1 configure:2619: result: no configure: failed program was:

Could tell me how to solve it?

Regards,

Edison