PHP 5 errors
PHP 5.3.1 and LibGcrypt error
Error
Undefined first referenced symbol in file __udiv_qrnnd /usr/local/lib/libgcrypt.so ld: fatal: Symbol referencing errors. No output written to sapi/cli/php collect2: ld returned 1 exit status make: *** [sapi/cli/php] Error 1
Mitigation
I was using the latest version of gcrypt (1.4.5) and I got this error. Rolling back to libgcrypt 1.2.4 resolved the issue.
PHP 5.2.3 and Oracle ELF CLass errors
Error
ld: fatal: file /oracle/10g/lib/libclntsh.so: wrong ELF class: ELFCLASS64
Mitigation
For me, all i had to do was point the compiler to use the appropriate libraries for oracle. I had to edit the configure script, change any instance of "PDO_OCI_IC_PREFIX/lib/" to "PDO_OCI_IC_PREFIX/lib32/". Worked like a charm after that.
PHP 5.x and IMAP support
Error
checking for utf8_mime2text signature... new checking for U8T_CANONICAL... no configure: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.
Mitigation
This was, hands down, the most difficult php error I've had to fix. The error itself is pretty annoying ('this should not happen, but it did...')
The root of the problem lies with IMAP, and lack of libraries. I thought the fix would be simple -- just install the IMAP package from sunfreeware.com. No, ohhhh no. It was much more difficult than that.
- download imap source [1].
- unzip & untar it, and cd to the source directory
# gunzip imap-2007e.tar.gz # tar -xf imap-2007e.tar # cd imap-2007e/ # make gso # cd c-client
- At this point, you need to edit the Makefile in the c-client/ folder. Search for 'gso'. In the gso section, change this line:
BASECFLAGS="$(GCCCFLAGS)" \
to this:
BASECFLAGS="-fPIC" \
- save the Makefile, and continue as below:
###pwd should be <imap src>/c-client/ # make gso # mkdir shared # cd shared # ar xv ../c-client.a # gcc -shared -o c-client.so *.o # mkdir -p /usr/local/imap/lib/ # mkdir -p /usr/local/imap/include/ # cp c-client.so /usr/local/imap/lib/ # cd .. # cp *.h /usr/local/imap/include/ # cp c-client.a /usr/local/imap/lib/libc-client.a
- Then i was able to compile php with the '--with-imap=/usr/local/imap' flag.
Jeez that was annoying.
GD Function Error
Error
Fatal error: Call to undefined function imageftbbox() in a.php
Mitigation
Recompile php with freetype (--with-freetype-dir=/usr/local/lib if you install the sun freetype package)