From:             php_public at macfreek dot nl
Operating system: Mac OS X (10.2.6)
PHP version:      4.3.2
PHP Bug Type:     Java related
Bug description:  --with-java does not compile on Mac OS X

Description:
------------
In short, Java does not compile on Mac OS X, because 
the Java headers are at an other location then java.c 
expects them. configure does work.

Reproduce code:
---------------
On Mac OS X (Darwin):
./configure --with-java=/usr (you can leave the =/usr out).
make

Actual result:
--------------
/Users/freek/Downloads/php-4.3.2/ext/java/java.c:39:24: 
JavaVM/jni.h: No such file or directory

This is due to this code:
#if HAVE_JAVAVM_JAVAVM_H
#include <JavaVM/JavaVM.h>
#include <JavaVM/jni.h>
#define JNI_12
#else
#include <jni.h>
#endif

In php_config.h, the precompiler directive 
HAVE_JAVAVM_JAVAVM_H was set, even though there is no 
file on my system called JavaVM/JavaVM.h

As an ugly workaround, specifying the full path did 
work:
#include </System/Library/Frameworks/JavaVM.framework/
Versions/A/Headers/JavaVM.h>
#include </System/Library/Frameworks/JavaVM.framework/
Versions/1.3.1/Headers/jni.h

Apparently, jni.h is not in Java VM 1.4.1, which is 
also installed on Mac OS X. But to be honest, I got 
crazy about all symbolic links in /System/Library/
Frameworks/JavaVM.framework/

-- 
Edit bug report at http://bugs.php.net/?id=24204&edit=1
-- 
Try a CVS snapshot:         http://bugs.php.net/fix.php?id=24204&r=trysnapshot
Fixed in CVS:               http://bugs.php.net/fix.php?id=24204&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=24204&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=24204&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=24204&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=24204&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=24204&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=24204&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=24204&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=24204&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24204&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=24204&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=24204&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=24204&r=gnused

Reply via email to