eAccelerator installation fails (eaccelerator.so nowhere to be found)

Q-BiC

Verified User
Joined
Apr 27, 2006
Messages
5
Hello,

I have PHP 4.4.2 installed on Fedora Core 5 with Apache 1.3.34 and the latest DirectAdmin. I installed autoconf, automake, libtool and m4. I followed the installation instructions for version 0.9.4 on eAccelerator's site. I can't see any error, so far so good... well not exactly.

When I look into the folder /usr/local/lib/php/extensions/no-debug-non-zts-20020429/, I can only see 1 file, named libeaccelerator.a. I can't find eaccelerator.so anywhere on the server.

Kind regards
 
Did you use these instructions from the README?
Code:
 export PHP_PREFIX="/usr/local"

  $PHP_PREFIX/bin/phpize

  ./configure \
  --enable-eaccelerator=shared \
  --with-php-config=$PHP_PREFIX/bin/php-config

  make

The --enable-eaccelerator=shared tells it to build a shared library, and not a static library like you have.
 
http://eaccelerator.net/wiki/InstallFromSource

this is what I did, but I replaced export PHP_PREFIX="/usr" by export PHP_PREFIX="/usr/local"


btw: I had the exact same problem last night when I tried to install APC (Advanced PHP Cache). It seems like my system is unable to make .so files.....

Any ideas?
 
Last edited:
If your system can make a static library it can make a shared library, the only difference during the build is a flag passed to the linker.

Try doing this:
Code:
make distclean
export PHP_PREFIX="/usr/local"
$PHP_PREFIX/bin/phpize
./configure  --enable-eaccelerator=shared   --with-php-config=$PHP_PREFIX/bin/php-config
make

If it is still only making the static library, then looking at your Makefile and config.log might show what the problem is.

Did you see any errors or warings when you ran configure?
 
this is the output from the configure script

./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config
checking build system type... i686-pc-linux-gnuoldld
checking host system type... i686-pc-linux-gnuoldld
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking whether gcc and cc understand -c and -o together... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for PHP prefix... /usr/local
checking for PHP includes... -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend
checking for PHP extension directory... /usr/local/lib/php/extensions/no-debug-non-zts-20020429
checking for re2c... exit 0;
checking for gawk... gawk
checking whether to enable eaccelerator support... yes, shared
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for unistd.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking mandatory system headers... yes
checking whether union semun is defined in sys/sem.h... no
checking for sysvipc shared memory support... yes
checking for mmap shared memory support... yes
checking for mmap on /dev/zero shared memory support... yes
checking for anonymous mmap shared memory support... yes
checking for posix mmap shared memory support... no
checking for best shared memory type... sysvipc
checking for spinlock semaphores support... yes
checking for pthread semaphores support... no
checking for posix semaphores support... no
checking for sysvipc semaphores support... yes
checking for fcntl semaphores support... yes
checking for flock semaphores support... yes
checking for best semaphores type... spinlock
checking for sched_yield... yes
checking for mprotect... yes
checking for ext/session/php_session.h... yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking command to parse /usr/bin/nm -B output... ok
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for ranlib... ranlib
checking for strip... strip
checking for objdir... .libs
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions... no
checking whether the linker (/usr/bin/ld) supports shared libraries... no
checking how to hardcode library paths into programs... unsupported
checking whether stripping libraries is possible... yes
checking dynamic linker characteristics... no
checking if libtool supports shared libraries... no
checking whether to build shared libraries... no

checking whether to build static libraries... yes
creating libtool
configure: creating ./config.status
config.status: creating config.h
config.status: config.h is unchanged

Now that you told me what .so files are, I noticed those bold-lines...

Unfortunately I'm no linux expert, so I don't know how to solve this....
 
That is weird, I have never seen that before with Linux. Almost everything is in a shared library.

The next step I would do, is look in the config.log and try to find the area where it was testing ld to see if it supports shared libraries. You should see the results of the test, and hopefully the error that occured when it tried to create one.
 
well it's kinda useless:

configure:7094: checking whether the linker (/usr/bin/ld) supports shared libraries
configure:7777: result: no
configure:7786: checking how to hardcode library paths into programs
configure:7810: result: unsupported
configure:7819: checking whether stripping libraries is possible
configure:7824: result: yes
configure:7839: checking dynamic linker characteristics
configure:8270: result: no
configure:8279: checking if libtool supports shared libraries
configure:8281: result: no
configure:8288: checking whether to build shared libraries
configure:8309: result: no
configure:8316: checking whether to build static libraries
configure:8320: result: yes
configure:9912: creating ./config.status


EDIT:
in the configure script, I found that in the switch-case that checks several Operating Systems and sets ld-related variables accordingly, my OS isn't listed in the case, and thus ends up here:
......................
# See if GNU ld supports shared libraries.
case $host_os in
........................
*)
ld_shlibs=no

;;
esac
......................

At least, I don't think its listed in there. How can I see what the name of my OS is, besides "Fedora Core 5" or something like that. The switch-case lists them like this "netbsd","openbsd","hpux9","cygwin","aix4", etc
 
Last edited:
Back
Top