New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #22787 (closed defect: fixed)

Opened 5 years ago

Last modified 4 years ago

tomcat6 fail to compile on Snow Leopard

Reported by: idefix@… Owned by: ricci@…
Priority: Normal Milestone:
Component: ports Version: 1.8.1
Keywords: Cc: mpv@…, shrift@…, arto.bendiken@…, skaimauve@…, redwoodtree@…, carlton@…
Port: tomcat6

Description

I tried to compile tomcat6 today, after several problems with depending ports were fixed. But it fails with the following error message:

--->  Computing dependencies for tomcat6
--->  Fetching tomcat6
--->  Verifying checksum(s) for tomcat6
--->  Extracting tomcat6
--->  Applying patches to tomcat6
--->  Configuring tomcat6
--->  Building tomcat6
--->  Staging tomcat6 into destroot
# setting up needed dirs
# installing tomcat...
Error: Target org.macports.destroot returned: shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src && ant -Dversion=6.0.20 -Dversion.build=20 -Dbase.path=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/Repository -Dnsis.exe=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/.bogus -Dcommons-beanutils.jar=/opt/local/share/java/commons-beanutils.jar -Dcommons-collections.jar=/opt/local/share/java/commons-collections.jar -Dcommons-launcher.jar=/opt/local/share/java/commons-launcher.jar -Dcommons-daemon.jar=/opt/local/share/java/commons-daemon.jar -Dcommons-digester.jar=/opt/local/share/java/commons-digester.jar -Dcommons-el.jar=/opt/local/share/java/commons-el.jar -Dcommons-logging.jar=/opt/local/share/java/commons-logging.jar -Dcommons-logging-api.jar=/opt/local/share/java/commons-logging-api.jar -Dcommons-modeler.jar=/opt/local/share/java/commons-modeler.jar -Dcommons-httpclient.jar=/opt/local/share/java/commons-httpclient.jar -Dcommons-pool.jar=/opt/local/share/java/commons-pool.jar -Dcommons-dbcp.jar=/opt/local/share/java/commons-dbcp.jar -Dcommons-fileupload.jar=/opt/local/share/java/commons-fileupload.jar -Dregexp.jar=/opt/local/share/java/jakarta-regexp.jar -DxercesImpl.jar=/opt/local/share/java/xercesImpl.jar -Dxml-apis.jar=/opt/local/share/java/xml-apis.jar -Dlog4j.jar=/opt/local/share/java/jakarta-log4j.jar -Djmx.lib=/opt/local/share/java -Djunit.jar=/opt/local/share/java/junit.jar -Djaxen.jar=/opt/local/share/java/jaxen.jar -Dsaxpath.jar=/opt/local/share/java/saxpath.jar -Djasper.home=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/../jasper deploy" returned error 1
Command output:     [javac] 	at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:967)
    [javac] 	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
    [javac] 	at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:758)
    [javac] 	at com.sun.tools.javac.comp.Enter.complete(Enter.java:451)
    [javac] 	at com.sun.tools.javac.comp.Enter.main(Enter.java:429)
    [javac] 	at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819)
    [javac] 	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
    [javac] 	at com.sun.tools.javac.main.Main.compile(Main.java:353)
    [javac] 	at com.sun.tools.javac.main.Main.compile(Main.java:279)
    [javac] 	at com.sun.tools.javac.main.Main.compile(Main.java:270)
    [javac] 	at com.sun.tools.javac.Main.compile(Main.java:69)
    [javac] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [javac] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [javac] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [javac] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [javac] 	at org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
    [javac] 	at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1065)
    [javac] 	at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
    [javac] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
    [javac] 	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    [javac] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [javac] 	at java.lang.reflect.Method.invoke(Method.java:597)
    [javac] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    [javac] 	at org.apache.tools.ant.Task.perform(Task.java:348)
    [javac] 	at org.apache.tools.ant.Target.execute(Target.java:357)

BUILD FAILED
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/build.xml:119: Compile failed; see the compiler error output for details.

Total time: 31 seconds

Error: Status 1 encountered during processing.

Change History

comment:1 Changed 5 years ago by jmr@…

  • Keywords tomcat6 removed
  • Status changed from new to closed
  • Resolution set to duplicate

comment:2 Changed 5 years ago by idefix@…

I see this ticket not as a duplicate, because the ticket you refer to reports a problem with commons-dbcp but this here is a problem inside the Tomcat port itself.

That are two complete different problem.

comment:3 Changed 5 years ago by mpv@…

  • Cc mpv@… added

Cc Me!

comment:4 Changed 5 years ago by shrift@…

idefix is absolutely correct, this is not related. Please reopen this ticket! Nowhere in my build output can I find the error from #22498.

While my error does not appear to be identical, perhaps it is due to slightly different versions of java or xcode? If necessary I will open another ticket for my issue, but there definitely are some tomcat6 build issues going on other than #22498.

Here are the errors I'm seeing. For the record, I am building on two fresh and updated installs of 10.6.2.

--->  Computing dependencies for tomcat6
--->  Staging tomcat6 into destroot
# setting up needed dirs
# installing tomcat...
Error: Target org.macports.destroot returned: shell command "cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src && ant -Dversion=6.0.20 -Dversion.build=20 -Dbase.path=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/Repository -Dnsis.exe=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/.bogus -Dcommons-beanutils.jar=/opt/local/share/java/commons-beanutils.jar -Dcommons-collections.jar=/opt/local/share/java/commons-collections.jar -Dcommons-launcher.jar=/opt/local/share/java/commons-launcher.jar -Dcommons-daemon.jar=/opt/local/share/java/commons-daemon.jar -Dcommons-digester.jar=/opt/local/share/java/commons-digester.jar -Dcommons-el.jar=/opt/local/share/java/commons-el.jar -Dcommons-logging.jar=/opt/local/share/java/commons-logging.jar -Dcommons-logging-api.jar=/opt/local/share/java/commons-logging-api.jar -Dcommons-modeler.jar=/opt/local/share/java/commons-modeler.jar -Dcommons-httpclient.jar=/opt/local/share/java/commons-httpclient.jar -Dcommons-pool.jar=/opt/local/share/java/commons-pool.jar -Dcommons-dbcp.jar=/opt/local/share/java/commons-dbcp.jar -Dcommons-fileupload.jar=/opt/local/share/java/commons-fileupload.jar -Dregexp.jar=/opt/local/share/java/jakarta-regexp.jar -DxercesImpl.jar=/opt/local/share/java/xercesImpl.jar -Dxml-apis.jar=/opt/local/share/java/xml-apis.jar -Dlog4j.jar=/opt/local/share/java/jakarta-log4j.jar -Djmx.lib=/opt/local/share/java -Djunit.jar=/opt/local/share/java/junit.jar -Djaxen.jar=/opt/local/share/java/jaxen.jar -Dsaxpath.jar=/opt/local/share/java/saxpath.jar -Djasper.home=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/../jasper deploy" returned error 1
Command output:     [javac] 	at com.sun.tools.javac.jvm.ClassReader.fillIn(ClassReader.java:1845)
    [javac] 	at com.sun.tools.javac.jvm.ClassReader.complete(ClassReader.java:1777)
    [javac] 	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
    [javac] 	at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:758)
    [javac] 	at com.sun.tools.javac.jvm.ClassReader.loadClass(ClassReader.java:1951)
    [javac] 	at com.sun.tools.javac.comp.Resolve.loadClass(Resolve.java:842)
    [javac] 	at com.sun.tools.javac.comp.Resolve.findIdentInPackage(Resolve.java:1011)
    [javac] 	at com.sun.tools.javac.comp.Attr.selectSym(Attr.java:1921)
    [javac] 	at com.sun.tools.javac.comp.Attr.visitSelect(Attr.java:1835)
    [javac] 	at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:1522)
    [javac] 	at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:360)
    [javac] 	at com.sun.tools.javac.comp.Attr.attribType(Attr.java:390)
    [javac] 	at com.sun.tools.javac.comp.MemberEnter.attribImportType(MemberEnter.java:681)
    [javac] 	at com.sun.tools.javac.comp.MemberEnter.visitImport(MemberEnter.java:545)
    [javac] 	at com.sun.tools.javac.tree.JCTree$JCImport.accept(JCTree.java:495)
    [javac] 	at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
    [javac] 	at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:399)
    [javac] 	at com.sun.tools.javac.comp.MemberEnter.visitTopLevel(MemberEnter.java:512)
    [javac] 	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:446)
    [javac] 	at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
    [javac] 	at com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:819)
    [javac] 	at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
    [javac] 	at com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:758)
    [javac] 	at com.sun.tools.javac.comp.Enter.complete(Enter.java:451)
    [javac] 	at com.sun.tools.javac.comp.Enter.main(Enter.java:429)

BUILD FAILED
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/build.xml:119: Compile failed; see the compiler error output for details.

Total time: 28 seconds

Error: Status 1 encountered during processing.

comment:5 Changed 5 years ago by shrift@…

  • Cc shrift@… added

Cc Me!

comment:6 Changed 5 years ago by arto.bendiken@…

  • Cc arto.bendiken@… added

Cc Me!

comment:7 Changed 5 years ago by arto.bendiken@…

I, too, am experiencing this problem when trying to install the tomcat6 port.

comment:8 follow-ups: ↓ 11 ↓ 12 ↓ 19 Changed 5 years ago by skaimauve@…

SOLUTION: After the build fails, edit this file:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/build.xml

Insert the following lines inside the <javac> tag:

fork="true" memoryinitialsize="256m" memorymaximumsize="256m"

So the tag looks like:

<javac SOMESTUFF

fork="true" memoryinitialsize="256m" memorymaximumsize="256m" MORESTUFF>

There are four javac tags to change.

comment:9 Changed 5 years ago by skaimauve@…

Ticket should be reopened, this has nothing to do with commons-dbcp.

comment:10 Changed 5 years ago by skaimauve@…

  • Cc skaimauve@… added

Cc Me!

comment:11 in reply to: ↑ 8 Changed 5 years ago by mpv@…

Replying to skaimauve@…:

SOLUTION: After the build fails, edit this file:

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_java_tomcat6/work/apache-tomcat-6.0.20-src/build.xml

Insert the following lines inside the <javac> tag:

fork="true" memoryinitialsize="256m" memorymaximumsize="256m"

So the tag looks like:

<javac SOMESTUFF

fork="true" memoryinitialsize="256m" memorymaximumsize="256m" MORESTUFF>

There are four javac tags to change.

I have verified this works. Tomcat6 now builds an runs on Mac OSX 10.6.2. Thank you!

comment:12 in reply to: ↑ 8 Changed 5 years ago by idefix@…

Replying to skaimauve@…:

Insert the following lines inside the <javac> tag:

fork="true" memoryinitialsize="256m" memorymaximumsize="256m"

Thanks for this hint, after that change I was able to install the tomcat6 but if I start it, I get the following error message:

29/12/2009 13:30:05 13885 jsvc error: Cannot load required shell library /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/../Libraries/libjvm_compat.dylib
29/12/2009 13:30:05 13883 jsvc error: Service exit with a return value of 1 

comment:13 Changed 5 years ago by skaimauve@…

You have to install Java 1.5 from your Leopard CD or download it:

(1) Download the official Java package from Apple, “Java for Mac OS X 10.5 Update 4” dated June 15, 2009. Don't try with version 5 or 6.

(2) Meanwhile, go to /System/Library/Frameworks/JavaVM.framework/Versions and delete the two aliases (symlinks) “1.5” and “1.5.0”.

(3) Open "Java for Mac OS X 10.5 Update 4” with Pacifist, and drill down into Contents > System > Library > Frameworks > JavaVM.framework > Versions

(4) Still in Pacifist, select 1.5 and 1.5.0, right-click, and chose "Install to Default Location".

(5) Uncomment this line in /opt/local/share/java/tomcat6/conf/setenv.local #export JAVA_JVM_VERSION=1.5

(6) Start tomcat

comment:14 Changed 5 years ago by redwoodtree@…

  • Cc redwoodtree@… added

Cc Me!

comment:15 Changed 5 years ago by carlton@…

  • Cc carlton@… added

Cc Me!

comment:16 Changed 5 years ago by carlton@…

Can somebody with the appropriate power please reopen this? As documented in the comment thread, this isn't a duplicated of #22498, and it was still happening as of yesterday.

comment:17 Changed 5 years ago by macsforever2000@…

  • Status changed from closed to reopened
  • Resolution duplicate deleted

comment:18 Changed 5 years ago by macsforever2000@…

  • Status changed from reopened to new
  • Owner changed from macports-tickets@… to ricci@…

comment:19 in reply to: ↑ 8 Changed 4 years ago by info@…

Replying to skaimauve@…:

skaimauve's solution worked for me. I did not need to install Java from Apple sources (as far as I know, it was already on the machine).

comment:20 Changed 4 years ago by ricci@…

  • Status changed from new to closed
  • Resolution set to fixed

resolved in r69689 (with patches for build.xml - memory size- from this ticket), thanks!

Note: See TracTickets for help on using tickets.