Package Details: gcc-gcj 6.2.1-1

Git Clone URL: https://aur.archlinux.org/gcc-gcj.git (read-only)
Package Base: gcc-gcj
Description: The GNU Compiler for Java
Upstream URL: http://gcc.gnu.org
Licenses: GPL, LGPL
Submitter: Allan
Maintainer: valandil
Last Packager: valandil
Votes: 235
Popularity: 0.389910
First Submitted: 2009-05-08 17:48
Last Updated: 2016-09-14 20:38

Pinned Comments

valandil commented on 2016-05-11 14:02

This package, gcc-gcj, is a subset of the GNU Compiler Collection, specifically the Java compiler part. In Arch Linux, it is mostly used to compile pdftk, a very nifty command-line PDF tool.

It is *very* long to compile and takes up a lot of disk space while doing so. Do not AUR helpers to compile this thing, you'll probably end up filling your /tmp partition and crash the compilation process. Download the PKGBUILD (either with yaourt -G gcc-gcj, with the helper of your choice or even manually) and run makepkg.

If you do not want to compile this and only need it for pdftk, consider using pdftk-bin. As its name indicates, it is a precompiled version of pdftk and depends only on libgcj, also precompiled.

The latest update has changed the way we download gcc. We now use the git repo and specify a given commit. As mentioned in recent comments (as of May 11th, 2016), this can be a pain as the git repo is rather large. I will probably switch back to tarballs if I can in the near future.

Latest Comments

cfr42 commented on 2016-06-19 16:11

@valandil Thanks. The new version works fine. I don't remember but I routinely remove the src and pkg directories. (Actually, I routinely use a new directory and copy in anything I want, mostly any links to older packaged versions.) So although it is possible I failed to remove the src directory, it is relatively unlikely. This time I removed the git checkout of gcc from the relevant subdirectory of ~ as well. I don't know if that mattered, but it compiled fine this time.

valandil commented on 2016-05-12 13:35

@cfr42 I assume you used makepkg. Have you tried removing your src/ directory? Sometimes a previous failed build can cause problems the second time around. (For the record, I'm not sure this is the problem, but the fact that the recipe for `cc1` failed would be alarming if it were not for a trivial issue.)

@KlipperKyle Oh I wasn't aware of that syntax. I'll definitely use that in -3. For now I rely on the fact gcc-{_commit}{rest_of_sha_hash}/ is the only directory containing the string gcc-{_commit} and use cd gcc-{_commit}* to change directory. It's a bit of a kludge. Thanks for the suggestion!

KlipperKyle commented on 2016-05-12 04:39

@bidulock and @valandil, thank you for pointing out the Github snapshot trick. I almost forgot about that. And thank you for switching back to a tarball.

I did change one line to give the source tarball a reasonable name (I like to keep a small archive of source code in case e.g. a soname bump forces me to rebuild.):

"gcc-6.1.1.tar.gz::https://github.com/gcc-mirror/gcc/archive/${_commit}.tar.gz"

That's strange that there is no officially sanctioned 6.1.1 tarball yet. It seems weird that gcc would want to switch from 90MB tarballs to telling every build engineer to grab every single revision in history.

(I don't mean to knock git in any way. I use git quite a bit for revision control, and it is great. However, I think in this instance a tarball is more appropriate because of the sheer amount of bandwidth saved (about 90%).)

cfr42 commented on 2016-05-11 23:46

I tried to build the new version and ran out of space. Having freed some up, I tried again and the build failed with

collect2: error: ld returned 1 exit status
../../gcc/c/Make-lang.in:71: recipe for target 'cc1' failed
make[3]: *** [cc1] Error 1
make[3]: Leaving directory '/home/software/builds/gcc-gcj/src/gcc-80f78834ceffb73c04274c07e0fb2e47d23ff2ed/build/gcc'
Makefile:4472: recipe for target 'all-stage3-gcc' failed
make[2]: *** [all-stage3-gcc] Error 2
make[2]: Leaving directory '/home/software/builds/gcc-gcj/src/gcc-80f78834ceffb73c04274c07e0fb2e47d23ff2ed/build'
Makefile:22914: recipe for target 'stage3-bubble' failed
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory '/home/software/builds/gcc-gcj/src/gcc-80f78834ceffb73c04274c07e0fb2e47d23ff2ed/build'
Makefile:915: recipe for target 'all' failed
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
Aborting...

cfr42 commented on 2016-05-11 20:25

Thanks for trying to find another option. 1.7G is quite a hefty amount of disk space, even aside from the bandwidth issues. I'm trying out the -2 at the moment. (I'll probably regret this since I guess it isn't really needed.)

bidulock commented on 2016-05-11 17:22

@valandil, many thanks for all your work on the package!

valandil commented on 2016-05-11 17:08

A bit of a hack, but I now use the tarball generated by GitHub to fetch the source. Basically, you can ask GitHub for a given commit with

wget https://github.com/gcc-mirror/gcc/archive/{commit}.tar.gz

and it'll give it to you. I would prefer to use the official tarball, but like I said I didn't find one for gcc-6.1.1, only gcc-6.1.0. Downloading the proper commit from GitHub might be easier to maintain.

Let me know if you run into any issues.

@bidulock beat me to it by a couple seconds ;)

bidulock commented on 2016-05-11 17:08

You can download a .zip of that commit instead of cloning the entire repository.

https://github.com/gcc-mirror/gcc/archive/80f78834ceffb73c04274c07e0fb2e47d23ff2ed.zip

I think that you can also use:

https://github.com/gcc-mirror/gcc/archive/80f78834ceffb73c04274c07e0fb2e47d23ff2ed.tar.gz

if you prefer. These are likely twice the size of a .xz, but way better than 1.7G.

valandil commented on 2016-05-11 14:02

This package, gcc-gcj, is a subset of the GNU Compiler Collection, specifically the Java compiler part. In Arch Linux, it is mostly used to compile pdftk, a very nifty command-line PDF tool.

It is *very* long to compile and takes up a lot of disk space while doing so. Do not AUR helpers to compile this thing, you'll probably end up filling your /tmp partition and crash the compilation process. Download the PKGBUILD (either with yaourt -G gcc-gcj, with the helper of your choice or even manually) and run makepkg.

If you do not want to compile this and only need it for pdftk, consider using pdftk-bin. As its name indicates, it is a precompiled version of pdftk and depends only on libgcj, also precompiled.

The latest update has changed the way we download gcc. We now use the git repo and specify a given commit. As mentioned in recent comments (as of May 11th, 2016), this can be a pain as the git repo is rather large. I will probably switch back to tarballs if I can in the near future.

valandil commented on 2016-05-11 13:54

I can replicate this if I have already tried to install gcc-gcj using yaourt before. Simply remove your /tmp/yaourt-tmp-{user} directory and try again. The downside is that you will download the git repo all over again. You're better off using makepkg directly (yaourt -G gcc-gcj && cd gcc-gcj && makepkg).

(I wish I had the capability to pin this comment on here, or put it even earlier in the build process.)

UPDATE: Apparently I can pin comments. I'll write something up.

All comments