php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #26028 Compilation error in libmysql.c
Submitted: 2003-10-29 09:35 UTC Modified: 2003-11-04 04:13 UTC
Votes:1
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: martin at ibuildings dot nl Assigned:
Status: Not a bug Package: Compile Failure
PHP Version: 4.3.3 OS: Redhat 6.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: martin at ibuildings dot nl
New email:
PHP Version: OS:

 

 [2003-10-29 09:35 UTC] martin at ibuildings dot nl
Description:
------------
I try to compile PHP 4.3.3. It gives me an error at compilation.
My settings:

TARGET="/usr/local/apache_1.3.28"

./configure \
    --prefix=$TARGET \
    --with-apxs=$TARGET/bin/apxs \
    --with-config-file-path=$TARGET/conf \
    --enable-memory-limit \
    --with-mysql \
    --disable-cli \
    --with-oci8 \
    --with-gd=/usr/local/gd \
    --with-png-dir=/usr \
    --with-jpeg-dir=/usr \
    --with-ttf=/usr \
    --enable-gd-imgstrttf \
    --enable-gd-native-ttf \
    --with-gettext \
    --enable-track-vars \
    --enable-sigchild \
    --with-xml \
    --with-zlib \
    --with-java=/usr/local/jdk

configures runs ok but, when i do a make it fails with this:
In file included from /usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:4:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:260: warning: redefinition of `uint'
/usr/include/sys/types.h:131: warning: `uint' previously declared here
/usr/local/src/php-4.3.3/ext/mysql/libmysql/global.h:261: warning: redefinition of `ushort'
/usr/include/sys/types.h:130: warning: `ushort' previously declared here
In file included from /usr/local/src/php-4.3.3/ext/mysql/libmysql/libmysql.c:11:
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error before `__extension__'
/usr/local/src/php-4.3.3/ext/mysql/libmysql/m_string.h:183: parse error before `&&'
make: *** [ext/mysql/libmysql/libmysql.lo] Error 1

config.log says for ushort and uint:
configure:51709: checking for type ushort
configure:51728: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib -L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51717 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  ushort foo;
  foo++;
  exit(0);
}
configure:51666: checking for type uint
configure:51685: gcc -o conftest -g -O2   -Wl,-rpath,/usr/local/gd/lib -L/usr/local/gd/lib -Wl,-rpath,/usr
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_ThrowByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_NewObjectByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_GetEnv'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_ThrowNullPointerException'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `jio_snprintf'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_CallMethodByName'
/usr/local/jdk/jre/bin/libjpeg.so: undefined reference to `JNU_CallStaticMethodByName'
collect2: ld returned 1 exit status
configure: failed program was:
#line 51674 "configure"
#include "confdefs.h"
#include <stdio.h>
#include <sys/types.h>
main()
{
  uint foo;
  foo++;
  exit(0);
}

USHORT and UINT aren't defined in main/php_config.h

The problem looks a lot like bug 17809 and 12451



Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-10-29 12:40 UTC] elmicha@php.net
See #22590. Make sure that your system doesn't use /usr/local/jdk/jre/bin/libjpeg.so when it's not told to do so (i.e. adjust your /etc/ld.so.conf and run ldconfig afterwards).

 [2003-11-04 04:13 UTC] martin at ibuildings dot nl
/usr/local/jdk/jre/bin or other dirs from my java_home aren't listed in ld.so.conf.
ldconfig -v doesn't show the libraries. Rebuilding the cache makes no difference
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Sep 19 15:01:27 2024 UTC