error while compiling log4j

Andrew Haley aph@redhat.com
Tue May 3 08:46:00 GMT 2011


On 02/05/11 07:26, Mac Smith wrote:
> Hi,
> 
> I am getting this error while compiling log4j
> 
> # gcj -c -fjni log4j.jar -o log4j.oorg/apache/log4j/net/SMTPAppender.java:0: error: cannot find file for class javax.mail.Authenticator
> org/apache/log4j/net/SMTPAppender.java:0: error: cannot find file for class javax.mail.Authenticator
> org/apache/log4j/net/SMTPAppender.java:183: confused by earlier errors, bailing out

I think you need to compile log4j as a shared library with -fPIC,
-findirect-dispatch, etc.  GNU JavaMail provides javax.mail.Authenticator,
and that package is available as  classpathx-mail on Fedora, and something
similar in other distros.

Andrew.



More information about the Gcc-help mailing list