This is the exact error I am getting::
/************* START *************/
...
-lpdf -lncurses -ljava -lcrypt -lpam -lgmp -lgd -lfreetype -lpng -lz -ljpeg -lz -lm -lz -lxml2 -ldb -lgdbm -lcurl -lcrypto -lssl -lz -ldl -lresolv -lcom_err -lk5crypto -lkrb5 -lgssapi_krb5 -lcrypto -lssl -lcurl -lbz2 -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lttf -lfreetype -lpng -ljpeg -lz -lnsl -lresolv -lcrypt
/usr/bin/ld: cannot find -ljava
collect2: ld returned 1 exit status
make[3]: *** [java.la] Error 1
make[3]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext/java'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext/java'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/php-4.2.2/build-cgi/ext'
make: *** [all-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.82099 (%build)
RPM build errors: Bad exit status from /var/tmp/rpm-tmp.82099 (%build) [root@chameleon SPECS]# /************* END *************/
I also tryed adding -L/... to the php.spec file::
LDFLAGS="-L/usr/kerberos/%{_lib}:/usr/local/javasdk/jre/lib/i386:/usr/local/javasdk/jre/lib/i386/server:/usr/local/javasdk/jre/bin";
And still geting the error above.
Sincerely, Serg ------------------------------------------------------------------------------------------------------------------------------------
From: Michael Schwendt <ms-nospam-0306@xxxxxxxx> Reply-To: shrike-list@xxxxxxxxxx To: shrike-list@xxxxxxxxxx Subject: Re: Problems geting php*.src.rpm to compile with java support Date: Mon, 15 Sep 2003 14:43:42 +0200
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Mon, 15 Sep 2003 17:12:02 +1000, Serg B. wrote:
> I am trying to enable java support in php (php-4.2.2-17.2.src.rpm) so I:
> install the src.rpm,
> add --with-java=/usr.local/javasdk to the php.spec file
> (java is installed in /usr/local/javasdk)
>
> add:
>
> /usr/local/javasdk/jre/lib/i386
> /usr/local/javasdk/jre/lib/i386/server
> to ld.so.conf
> run ldconf
> run ldd /usr/local/javasdk/jre/lib/i386/libverify.so
> (that gives the correct output)
> add java to path in /etc/profile (also works correctly)
>
> then run rpmbild -v -ba SPEC/php.spec
>
> and get this error::
> ----------------------------------------------------------------------------
> ...
> -lbz2 -lz -lcrypt -lssl -lcrypto -lresolv -lm -ldl -lttf -lfreetype -lpng
> -ljpeg -lz -lnsl -lresolv -lcrypt
> /usr/bin/ld: cannot find -ljava
> collect2: ld returned 1 exit status
You're missing an entry for the java libraries in the linker search path. An argument similar to
-L/usr/local/javasdk/somewhere
in the linker command-line before -ljava. /etc/ld.so.conf is not for "ld", but for the dynamic linker. Unfortunately, you didn't quote the rest of the error, so maybe only your --with-java=/somewhere argument was wrong.
- -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux)
iD8DBQE/ZbP+0iMVcrivHFQRAj32AJ96hsR8jGkr77/qmXPMd8PCfL161ACfSB2s nHJOtmJtTx5JELXLBPCRIA0= =k6tV -----END PGP SIGNATURE-----
-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list
_________________________________________________________________
Chat via SMS. Simply send 'CHAT' to 1889918. More info at http://ninemsn.com.au/mobilemania/MoChat.asp?blipid=6800
-- Shrike-list mailing list Shrike-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/shrike-list