LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compile php4.3.10 (https://www.linuxquestions.org/questions/linux-newbie-8/compile-php4-3-10-a-298494/)

IchBin 03-06-2005 07:56 PM

Compile php4.3.10
 
This is the first compile attempt I'm making in linux. I've looked at at phpinfo() page on my site to see what I options have been configured in php. I took the configure line from that page and tried to use it to ./configure
Here's the line:
Code:

'./configure' '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu'
 '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
 '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
 '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec'
 '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d'
'--enable-force-cgi-redirect' '--disable-debug' '--enable-pic' '--disable-rpath'
'--enable-inline-optimization' '--with-bz2' '--with-db4=/usr' '--with-curl'
 '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr'
'--with-gd=shared' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext'
'--with-ncurses=shared' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-png' '--with-pspell' '--with-xml' '--with-expat-dir=/usr'
 '--with-dom=shared,/usr' '--with-dom-xslt=/usr' '--with-dom-exslt=/usr'
'--with-xmlrpc=shared' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU'
'--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes'
'--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm'
 '--enable-track-vars' '--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl'
'--with-kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr'
'--with-pgsql=shared' '--with-snmp=shared,/usr' '--with-snmp=shared'
'--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar' '--enable-dbx'
'--enable-dio' '--enable-mbstring=shared' '--enable-mbstr-enc-trans'
'--enable-mbregex' '--with-mime-magic=/usr/share/file/magic.mime'
'--with-apxs2=/usr/sbin/apxs'

The first error I get was the apxs error at the end. I deleted that line because maybe Apache wasn't built with that option. But why would it have it in my current php install? After I deleted that line it was one error after another. Couldn't find libxslt, libjpeg, libpng....
After looking at the paths for all these options I noticed everything was pointing to the /usr directory. So I changed the paths to point to some things. Still had same errors as before even though the paths were right. I'm a little flustered about now so I was hoping for any tips/help you guys might be able to offer. Thanks....

audibel 03-06-2005 08:41 PM

How about starting over with the original (non-messed with configure) and giving the actual error content?

IchBin 03-06-2005 09:06 PM

Ok so I ran the config. I got this error the first time.
Sorry, I cannot run apxs. Possible reasons follow:
1. Perl is not installed
2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page is displayed)
The output of /usr/sbin/apxs follows:
./configure: line 5086: /usr/sbin/apxs: No such file or directory
configure: error: Aborting

So I deleted the last line thinking maybe my apache wasn't compiled with that module or whatever. Now I get this error.
checking for DOM XSLT support... /usr/lib
checking for DOM EXSLT support... /usr/lib
not found
configure: error: Please reinstall the libxslt >= 1.0.3 distribution
I have libxslt1.1.1 or something and it is installed to /usr/lib/libxslt.so.1.1.11 or /usr/lib/libxslt.so.1
I don't know which it's asking for but those are the ones found when doing a locate libxslt. This is where I'm stuck at. Not sure if I even need libxslt.

btmiller 03-07-2005 12:16 AM

In many cases you need the appropriate library development (e.g. libxslt-devel) packages to actually build things against the library, since those development packages have things like header files which contain definitions of various programming constructs like structures, etc.

In any case, what you're probably best off doing is figuring out which options you really need. Many distros build their packages in a "one size fits all" manner so that it just works for as large a percentage of their user base as possible. One of the advantages of building from source is that you can compile in only what you need, which makes the resulting binaries smaller, and possibly faster (depending on the exact details of how the software works). For instance, if you don't use PostgreSQL you can take out the --with-pgsql-shared option, etc.

IchBin 03-07-2005 06:42 AM

Thank you for the great explanation btmiller. My problem is that I don't really know what I need, and what I don't need. I do however know that I don't have the devel package. How could these these things be in my php build in the first place if they are not installed? I do however know that I'll need the GD lib, mysql, and probably the png, jpg stuff I see in that command.


All times are GMT -5. The time now is 02:37 PM.