Build failed on computer behind a firewall. (see also #501176) Reproducible: Always
Created attachment 380758 [details] scala-2.11.1-build.log
# emerge -v dev-lang/scala These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ~] dev-lang/scala-2.11.1:0/2.11.1 USE="-binary -doc -emacs -source" 0 kB Total: 1 package (1 new), Size of downloads: 0 kB >>> Verifying ebuild manifests >>> Running pre-merge checks for dev-lang/scala-2.11.1 * Checking for at least 1532 MiB RAM ... [ ok ] >>> Emerging (1 of 1) dev-lang/scala-2.11.1 [..SKIPPING SEVERAL SCREENS OF LOG..] init.git: init: [mkdir] Created dir: /var/tmp/portage/dev-lang/scala-2.11.1/work/.m2/repository [artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.pom from repository central at http://repo1.maven.org/maven2 * ACCESS DENIED: mkdir: /root/.m2 * ACCESS DENIED: mkdir: /root/.m2 [artifact:dependencies] [WARNING] Unable to get resource 'biz.aQute:bnd:pom:1.50.0' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/biz/aQute/bnd/1.50.0 [artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.jar from repository central at http://repo1.maven.org/maven2 * ACCESS DENIED: mkdir: /root/.m2 * ACCESS DENIED: mkdir: /root/.m2 [artifact:dependencies] [WARNING] Unable to get resource 'biz.aQute:bnd:jar:1.50.0' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/biz/aQute/bnd/1.50.0 [artifact:dependencies] An error has occurred while processing the Maven artifact tasks. [artifact:dependencies] Diagnosis: [artifact:dependencies] [artifact:dependencies] Unable to resolve artifact: Missing: [artifact:dependencies] ---------- [artifact:dependencies] 1) biz.aQute:bnd:jar:1.50.0 [artifact:dependencies] [artifact:dependencies] Try downloading the file manually from the project website. [artifact:dependencies] [artifact:dependencies] Then, install it using the command: [artifact:dependencies] mvn install:install-file -DgroupId=biz.aQute -DartifactId=bnd -Dversion=1.50.0 -Dpackaging=jar -Dfile=/path/to/file [artifact:dependencies] [artifact:dependencies] Alternatively, if you host your own repository you can deploy the file there: [artifact:dependencies] mvn deploy:deploy-file -DgroupId=biz.aQute -DartifactId=bnd -Dversion=1.50.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [artifact:dependencies] [artifact:dependencies] Path to dependency: [artifact:dependencies] 1) org.apache.maven:super-pom:jar:2.0 [artifact:dependencies] 2) biz.aQute:bnd:jar:1.50.0 [artifact:dependencies] [artifact:dependencies] ---------- [artifact:dependencies] 1 required artifact is missing. [artifact:dependencies] [artifact:dependencies] for artifact: [artifact:dependencies] org.apache.maven:super-pom:jar:2.0 [artifact:dependencies] [artifact:dependencies] from the specified remote repositories: [artifact:dependencies] central (http://repo1.maven.org/maven2) [artifact:dependencies] [artifact:dependencies] BUILD FAILED
In Christian's case it is an obvious network malfunction, not a gentoo bug. In my case it is more puzzling. After merging >200 packages flawlessly, I had to do by hand: mkdir -p /root/.m2/repository/biz/aQute/bnd/1.50.0 mkdir -p /root/.m2/repository/junit/junit/4.10 mkdir -p /root/.m2/repository/org/hamcrest/hamcrest-core/1.1 mkdir -p /root/.m2/repository/org/hamcrest/hamcrest-parent/1.1 ... chmod -R 777 /root/.m2/ ebuild /usr/portage/dev-lang/scala/scala-2.11.1.ebuild compile , because I repeatedly get errors: init: [artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.pom from repository central at http://repo1.maven.org/maven2 [artifact:dependencies] Transferring 1K from central * ACCESS DENIED: rename: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp * ACCESS DENIED: remove: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp [artifact:dependencies] Downloading: biz/aQute/bnd/1.50.0/bnd-1.50.0.jar from repository central at http://repo1.maven.org/maven2 [artifact:dependencies] Transferring 809K from central * ACCESS DENIED: rename: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp * ACCESS DENIED: remove: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp [artifact:dependencies] Downloading: junit/junit/4.10/junit-4.10.pom from repository central at http://repo1.maven.org/maven2 * ACCESS DENIED: mkdir: /root/.m2/repository/junit * ACCESS DENIED: mkdir: /root/.m2/repository/junit [artifact:dependencies] [WARNING] Unable to get resource 'junit:junit:pom:4.10' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/junit/junit/4.10 [artifact:dependencies] Downloading: junit/junit/4.10/junit-4.10.jar from repository central at http://repo1.maven.org/maven2 * ACCESS DENIED: mkdir: /root/.m2/repository/junit * ACCESS DENIED: mkdir: /root/.m2/repository/junit [artifact:dependencies] [WARNING] Unable to get resource 'junit:junit:jar:4.10' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /root/.m2/repository/junit/junit/4.10 [..] * ACCESS DENIED: remove: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp.sha1.tmp * ACCESS DENIED: remove: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.jar.tmp * ACCESS DENIED: remove: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp.sha1.tmp * ACCESS DENIED: remove: /root/.m2/repository/biz/aQute/bnd/1.50.0/bnd-1.50.0.pom.tmp [..] * ACCESS DENIED: remove: /root/.m2/repository/junit/junit/4.10/junit-4.10.jar.tmp.sha1.tmp * ACCESS DENIED: remove: /root/.m2/repository/junit/junit/4.10/junit-4.10.jar.tmp * ACCESS DENIED: remove: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp.sha1.tmp * ACCESS DENIED: remove: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp * ERROR: dev-lang/scala-2.11.1 failed (compile phase): * eant failed * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 4046: Called eant '-Djavac.args=-encoding UTF-8' '-Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work' 'fastdist-opt' * environment, line 730: Called die * The specific snippet of code: * ant ${antflags} "${@}" || die "eant failed" * * If you need support, post the output of `emerge --info '=dev-lang/scala-2.11.1'`, * the complete build log and the output of `emerge -pqv '=dev-lang/scala-2.11.1'`. !!! When you file a bug report, please include the following information: GENTOO_VM=icedtea-bin-6 CLASSPATH="" JAVA_HOME="/opt/icedtea-bin-6.1.13.3" JAVACFLAGS="-source 1.6 -target 1.6" COMPILER="javac" and of course, the output of emerge --info =scala-2.11.1 * The complete build log is located at '/var/tmp/portage/dev-lang/scala-2.11.1/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-lang/scala-2.11.1/temp/environment'. * Working directory: '/var/tmp/portage/dev-lang/scala-2.11.1/work/scala-2.11.1' * S: '/var/tmp/portage/dev-lang/scala-2.11.1/work/scala-2.11.1' * --------------------------- ACCESS VIOLATION SUMMARY --------------------------- * LOG FILE: "/var/log/sandbox/sandbox-6001.log" * VERSION 1.0 FORMAT: F - Function called FORMAT: S - Access Status FORMAT: P - Path as passed to function FORMAT: A - Absolute Path (not canonical) FORMAT: R - Canonical Path FORMAT: C - Command Line F: rename S: deny P: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp A: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp R: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp C: /opt/icedtea-bin-6.1.13.3/bin/java -classpath /usr/share/ant-core/lib/ant-launcher.jar:/opt/icedtea-bin-6.1.13.3/lib/tools.jar -Dant.home=/usr/share/ant-core -Dant.library.dir=/usr/share/ant-core/lib org.apache.tools.ant.launch.Launcher -cp -Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore -Dmaven.test.skip=true -Djavac.args=-encoding UTF-8 -Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work fastdist-opt F: remove S: deny P: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp A: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp R: /root/.m2/repository/junit/junit/4.10/junit-4.10.pom.tmp C: /opt/icedtea-bin-6.1.13.3/bin/java -classpath /usr/share/ant-core/lib/ant-launcher.jar:/opt/icedtea-bin-6.1.13.3/lib/tools.jar -Dant.home=/usr/share/ant-core -Dant.library.dir=/usr/share/ant-core/lib org.apache.tools.ant.launch.Launcher -cp -Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore -Dmaven.test.skip=true -Djavac.args=-encoding UTF-8 -Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work fastdist-opt F: mkdir S: deny P: /root/.m2/repository/org A: /root/.m2/repository/org R: /root/.m2/repository/org C: /opt/icedtea-bin-6.1.13.3/bin/java -classpath /usr/share/ant-core/lib/ant-launcher.jar:/opt/icedtea-bin-6.1.13.3/lib/tools.jar -Dant.home=/usr/share/ant-core -Dant.library.dir=/usr/share/ant-core/lib org.apache.tools.ant.launch.Launcher -cp -Dnoget=true -Dmaven.mode.offline=true -Dbuild.sysclasspath=ignore -Dmaven.test.skip=true -Djavac.args=-encoding UTF-8 -Duser.home=/var/tmp/portage/dev-lang/scala-2.11.1/work fastdist-opt
It affects scala-2.11.2.ebuild as well. It is difficult to configure the maven ant task to not download stuff into ~/.m2/repository. I tried to find an easier way, but it seems I need to edit every artifact.dependencies in the build.xml file. It seems tedious to have to come up with a patch for that every time that scala is bumped, so instead I came up with this sed (which looks even more horrible after bugzilla inserts line breaks everywhere): sed -e "s@\(<mkdir dir=\"\)\${user.home}\(/.m2/repository\"/>\)@\1${WORKDIR}\2\n <artifact:localRepository id=\"localrepo\" path=\"${WORKDIR}/.m2/repository\" />@" \ -e "s@\${user.home}/.m2@${WORKDIR}/.m2@g" \ -e 's@\(<artifact:dependencies .*>\)@\1\n <localRepository refid="localrepo" />@g' \ -i "${S}/build.xml" \ || die "Could not change location of .m2 maven download directory in ${S}/build.xml" I'm running tests with that.
06 Oct 2014; Mark Wright <gienah@gentoo.org> scala-2.11.1.ebuild, scala-2.11.2.ebuild: Bug 517166 - dev-lang/scala-2.11.1 - Unable to resolve artifact: Missing: biz.aQute:bnd:jar:1.50.0. Thanks to Christian Strahl for reporting, mkaama for helping. sed the build.xml to add in a localRepository pointing to $WORKDIR/.m2/repository, and sed all of the artifact:dependencies to configure them to use this localRepository. The localRepository is provided with the ${P}-maven-deps.tar.gz file.