Package Details: gcc-gcj 6.2.1-1

Git Clone URL: (read-only)
Package Base: gcc-gcj
Description: The GNU Compiler for Java
Upstream URL:
Licenses: GPL, LGPL
Submitter: Allan
Maintainer: valandil
Last Packager: valandil
Votes: 239
Popularity: 2.561392
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.

When reporting any build issue, please provide your current version of gcc and any error message.

It is *very* long to compile and takes up a lot of disk space while doing so. Do not use 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.

Latest Comments

valandil commented on 2016-10-31 15:19

@Alad Please provide your gcc version.

Alad commented on 2016-10-31 11:23

Doesn't build:

./.libs/ undefined reference to `__cxa_throw_bad_array_new_length'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:9535: jv-convert] Error 1
make[3]: *** Waiting for unfinished jobs....
./.libs/ undefined reference to `__cxa_throw_bad_array_new_length'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:9482: gcj-dbtool] Error 1
/home/archie/.cache/aursync/gcc-gcj/src/gcc-c2103c17ed399b38670fbcdb8c0d5bd750a9e754/build/x86_64-pc-linux-gnu/libjava/.libs/ undefined reference to `__cxa_throw_bad_array_new_length'
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:9496: gij] Error 1

kal commented on 2016-10-20 11:52


Thanks a lot for your tip about pdftk-bin. I desperately needed to edit some pdfs fast and your help was really appreciated.

Keep up the good work !

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.):


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/ 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().

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


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 ;)

All comments