Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: I can't compile PHP :(

  1. #1

    Default I can't compile PHP :(

    Hello Geekos!!

    It's my first post here, but i'm using openSUSE since 2007. I'm trying to compile PHP 5.4.15 from source on openSUSE 12.3 but the process fails.

    The dependences that I installed:

    zypper install apache2-devel autoconf bison curl-devel db-devel enchant-devel freetype2-devel gcc-c++ gmp-devel imap-devel krb5-devel libbz2-devel libevent-devel libicu-devel libmcrypt-devel libpng-devel libtidy-devel libtiff-devel libtool libxslt-devel ncurses-devel net-snmp-devel openldap2-devel pam-devel pkgconfig postfix postgresql-devel tcpd-devel unixODBC-devel update-alternatives xorg-x11-devel freetds-devel mysql-devel aspell-devel libgcrypt-devel libjpeg rpm-devel libedit-devel libjpeg-devel pcre-devel re2c sqlite-devel sqlite2-devel t1lib-devel smtp_daemon tcpd-devel

    The script to compile:

    ./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/apache/conf --libdir=/usr/lib64 --with-apxs2=/usr/local/apache/bin/apxs --enable-sigchild --with-gd --with-mariadb --with-libdir=/lib64 --enable-ftp --with-zlib --with-bz2 --enable-zip --with-pear --with-layout=GN --enable-ctype --with-iconv --with-gettext --enable-xml --with-xmlrpc --enable-gd-native-ttf --with-imap-ssl --enable-soap --with-freetype-dir=/usr/include/freetype2/ --enable-bcmath --enable-mbstring --enable-sockets --with-gd --with-png-dir --with-openssl --with-oci8=instantclient,/usr/lib/oracle/11.2/client64/lib --with-pgsql=/usr/local/postgres --with-mcrypt --enable-shmop --enable-sysvsem

    The process ends with:

    "checking size of char... configure: error: cannot compute sizeof (char)"

    Thanks !!!

    Forgive my poor english.

  2. #2

    Default Re: I can't compile PHP :(

    At the very least you should probably post this in the
    programming/scripting forum. It may also be advisable to take this up
    with the PHP folks directly with a bit more data about where in the
    compilation process things fail. I'd start with the #php chnanel on IRC
    (irc.freenoe.net). Answers may be available somewhere on this forum, but
    to me this is probably something the PHP folks will have seen more often.

    Good luck.

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    25,766

    Default Re: I can't compile PHP :(

    Hello Deicidium,

    Welcome here.

    We hope you will fid you at home here. There is one thing I want to "teach" you and that is the usage of CODE tags. That is not easy to find, that is why we have to explain to every "newcomer" here.

    Whenever you want to post computer text here in a post (and we like that, because what the computer "says" is often more telling then what people say), please copy/paste that between CODE tags. You get those tags by clicking on the # button in the toolbar of the post editor.

    And please when you post output of a command, then make the copy sweep a bit wider: it should include the prompt, the command, the output and the next prompt.
    Henk van Velden

  4. #4
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,308
    Blog Entries
    14

    Default Re: I can't compile PHP :(

    Hi, welcome to the forums !!

    The usual question first: why compile this yourself? If the reason is other than "because I want to", don't. openSUSE has it's Buildservice where thousands of packages are built and being published in repositories. In your case PHP 5.4.15 is available from the official Devel/Languages/PHP repo. If you don't make manual changes in compiling PHP, doing so would in the best case lead to an identical install compared to the one from the repos.
    Start Yast - Software repositories - Add - Repositories maintained by the community, check the PHP repo, trust the key when prompted for.
    Next start the Softwaremanager, go View - Repositories, tick the PHP repo, and click the "link" on the top right that says "Switch system packages to ..."
    Restart apache2 or reboot and you're running PHP 5.4.15
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  5. #5
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,308
    Blog Entries
    14

    Default Re: I can't compile PHP :(

    Some addition: as you can see PHP would be installed in /usr/local, is expecting apache in /usr/local . On openSUSE these two aren't in /usr/local, but in /usr/lib64 or /usr/lib , depending on 64bit/32bit install.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  6. #6

    Default Re: I can't compile PHP :(

    Thanks for the advices, but I compile evetything from source, except mariadb, because it's a requeriment from my Work. It's a weird thing becuase I can compile this on Debian, Fedora, Red Hat Linux Enterprise, Oracle Linux and CentOS.

  7. #7

    Default Re: I can't compile PHP :(

    Well, you are missing basic packages for compiling software.
    Install "gcc" and "make" for starters.

    Or the easier way: Start YaST->Software Management and install one of the development patterns. (f.e. C/C++ Development)
    See openSUSE 12.3: Chapter 5. Installing or Removing Software for that.

  8. #8

    Default Re: I can't compile PHP :(

    I installed the Patterns for basic development, python, C/C++, Mono, Qt Development previously.

  9. #9

    Default Re: I can't compile PHP :(

    Quote Originally Posted by Deicidium View Post
    I installed the Patterns for basic development, python, C/C++, Mono, Qt Development previously.
    Well, have you ever tried to compile anything before?

    Maybe you should start with something smaller than PHP first. Maybe try to compile a helloworld program first to check that your compiler works.

    And regarding your original error message: ("checking size of char... configure: error: cannot compute sizeof (char)")
    you can see the reason for the failure in the file config.log.

  10. #10

    Default Re: I can't compile PHP :(

    I compiled Apache HTTP Server 2.4.4 sucessfully.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •