Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 175016 - tomcat-6.0.10-r2 fails to compile, --build-only error, [resolved]
Summary: tomcat-6.0.10-r2 fails to compile, --build-only error, [resolved]
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: William L. Thomson Jr. (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-18 03:06 UTC by Adeel
Modified: 2007-04-19 16:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
updated ebuild (tomcat-6.0.10-r2.ebuild,6.23 KB, text/plain)
2007-04-18 03:11 UTC, Adeel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adeel 2007-04-18 03:06:34 UTC
Issuing a simple 'emerge tomcat' results in tomcat's compilation crashing complaining of an error ('attempting to use ant-core without specifying --build-only') on line 62 of the ebuild.

>>> Emerging (10 of 10) www-servers/tomcat-6.0.10-r2 to /
 * apache-tomcat-6.0.10-src.tar.gz RMD160 ;-) ...                           [ ok ]
 * apache-tomcat-6.0.10-src.tar.gz SHA1 ;-) ...                             [ ok ]
 * apache-tomcat-6.0.10-src.tar.gz SHA256 ;-) ...                           [ ok ]
 * apache-tomcat-6.0.10-src.tar.gz size ;-) ...                             [ ok ]
 * checking ebuild checksums ;-) ...                                        [ ok ]
 * checking auxfile checksums ;-) ...                                       [ ok ]
 * checking miscfile checksums ;-) ...                                      [ ok ]
 * checking apache-tomcat-6.0.10-src.tar.gz ;-) ...                         [ ok ]
 * Adding group 'tomcat' to your system ...
 *  - Groupid: 265
 * Adding user 'tomcat' to your system ...
 *  - Userid: 265
 *  - Shell: /sbin/nologin
 *  - Home: /dev/null
 *  - Groups: tomcat
 * Using: sun-jdk-1.5
>>> Unpacking source...
>>> Unpacking apache-tomcat-6.0.10-src.tar.gz to /var/tmp/portage/www-servers/tomc                at-6.0.10-r2/work
 * Applying build-xml.patch ...                                             [ ok ]
>>> Source unpacked.
Rewriting source attributes
Using Sax to rewrite the build.xml files
Rewriting ./res/deployer/build.xml
Rewriting ./webapps/ROOT/build.xml
Rewriting ./webapps/docs/build.xml
Rewriting ./build.xml
Rewriting target attributes
Using Sax to rewrite the build.xml files
Rewriting ./res/deployer/build.xml
Rewriting ./webapps/ROOT/build.xml
Rewriting ./webapps/docs/build.xml
Rewriting ./build.xml
>>> Compiling source in /var/tmp/portage/www-servers/tomcat-6.0.10-r2/work/apache-                tomcat-6.0.10-src ...
 * Using following ANT_TASKS: ant-trax
Unknown argument: --build-only,
ant [options] [target [target2 [target3] ...]]
Options:
  -help, -h              print this message
  -projecthelp, -p       print project help information
  -version               print the version information and exit
  -diagnostics           print information that might be helpful to
                         diagnose or report problems.
  -quiet, -q             be extra quiet
  -verbose, -v           be extra verbose
  -debug, -d             print debugging information
  -emacs, -e             produce logging information without adornments
  -lib <path>            specifies a path to search for jars and classes
  -logfile <file>        use given file for log
    -l     <file>                ''
  -logger <classname>    the class which is to perform logging
  -listener <classname>  add an instance of class as a project listener
  -noinput               do not allow interactive input
  -buildfile <file>      use given buildfile
    -file    <file>              ''
    -f       <file>              ''
  -D<property>=<value>   use value for given property
  -keep-going, -k        execute all targets that do not depend
                         on failed target(s)
  -propertyfile <name>   load all properties from file with -D
                         properties taking precedence
  -inputhandler <class>  the class which will handle input requests
  -find <file>           (s)earch for buildfile towards the root of
    -s  <file>           the filesystem and use it
  -nice  number          A niceness value for the main thread:
                         1 (lowest) to 10 (highest); 5 is the default
  -nouserlib             Run ant without using the jar files from
                         ${user.home}/.ant/lib
  -noclasspath           Run ant without using CLASSPATH
  -autoproxy             Java1.5+: use the OS proxy settings
  -main <class>          override Ant's normal entry point


!!! ERROR: www-servers/tomcat-6.0.10-r2 failed.
Call stack:
  ebuild.sh, line 1614:   Called dyn_compile
  ebuild.sh, line 971:   Called qa_call 'src_compile'
  environment, line 4749:   Called src_compile
  tomcat-6.0.10-r2.ebuild, line 62:   Called eant 'build-jasper-jdt' 'deploy' '-Db                ase.path=/var/tmp/portage/www-servers/tomcat-6.0.10-r2/temp' '-Dcompile.debug=fals                e' '-Dant.jar=' '*' 'The' 'ebuild' 'is' 'attempting' 'to' 'use' 'ant-core,' 'witho                ut' 'specifying' '--build-only,' 'that' 'is' 'not' 'declared' 'in' 'RDEPEND.' '*'                 'Because' 'you' 'have' 'this' 'package' 'installed' 'the' 'package' 'will' '*' 'bu                ild' 'without' 'problems,' 'but' 'please' 'report' 'this' 'to' '*' 'http://bugs.ge                ntoo.org' '/usr/share/ant-core/lib/ant.jar' '-Dcommons-daemon.jar=/usr/share/commo                ns-daemon/lib/commons-daemon.jar' '-Djdt.jar=/usr/share/eclipse-ecj-3.2/lib/ecj.ja                r' '-Djsp-api.jar=/usr/share/tomcat-servlet-api-2.5/lib/jsp-api.jar' '-Dservlet-ap                i.jar=/usr/share/tomcat-servlet-api-2.5/lib/servlet-api.jar'
  java-utils-2.eclass, line 1723:   Called die

!!! eant failed
!!! If you need support, post the topmost build error, and the call stack if relev                ant.
!!! A complete build log is located at '/var/tmp/portage/www-servers/tomcat-6.0.10                -r2/temp/build.log'.

!!! When you file a bug report, please include the following information:
GENTOO_VM=sun-jdk-1.5  CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.11"
JAVACFLAGS="-source 1.5 -target 1.5" COMPILER="javac"
and of course, the output of emerge --info


Reproducible: Always

Steps to Reproduce:
1. emerge tomcat
Comment 1 Adeel 2007-04-18 03:11:26 UTC
Created attachment 116598 [details]
updated ebuild

This ebuild reflects the changes needed for tomcat 6.0.10 to compile without any errors. The problem lay on lines 57-61 where the flags were being defined without the necessary '--build-only' flag. 

Before:
        antflags="${antflags} -Dant.jar=$(java-pkg_getjar ant-core ant.jar)"
        antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjar commons-daemon commons-daemon.jar)"
        antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.2 ecj.jar)"
        antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.5 jsp-api.jar)"
        antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.5 servlet-api.jar)"


After:
        antflags="${antflags} -Dant.jar=$(java-pkg_getjar --build-only ant-core ant.jar)"
        antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjar --build-only commons-daemon commons-daemon.jar)"
        antflags="${antflags} -Djdt.jar=$(java-pkg_getjar --build-only eclipse-ecj-3.2 ecj.jar)"
        antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar --build-only tomcat-servlet-api-2.5 jsp-api.jar)"
        antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar --build-only tomcat-servlet-api-2.5 servlet-api.jar)"


Tomcat now compiles without any reported problems. Please test and leave feedback
Comment 2 Petteri Räty (RETIRED) gentoo-dev 2007-04-18 09:17:46 UTC
(In reply to comment #1)
> Created an attachment (id=116598) [edit]
> updated ebuild
> 

        antflags="${antflags} -Dant.jar=$(java-pkg_getjar --build-only ant-core ant.jar)"
        antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjar --build-only commons-daemon commons-daemon.jar)"
        antflags="${antflags} -Djdt.jar=$(java-pkg_getjar --build-only eclipse-ecj-3.2 ecj.jar)"
        antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar --build-only tomcat-servlet-api-2.5 jsp-api.jar)"
        antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar --build-only tomcat-servlet-api-2.5 servlet-api.jar)"

This is just wrong. --build-only means that the jars are used only by the build system or for example unit tests. This is not the case with commons-daemon etc. The right way to silence it is by making sure the needed stuff is both in DEPEND and RDEPEND. But for now unless you set JAVA_PKG_STRICT on RDEPEND it should compile fine as I silenced the errors in the eclass when inside a subshell.
Comment 3 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-04-19 16:36:03 UTC
Ok, added ant-core to RDEPEND and introduce COMMON_DEPEND. Should resolve bug, please re-open if problem remains.