Is the problem the code, or my installation? Details follow...
I recently installed Arch (64 bit) version on my ASUS K50IJ laptop. I was trying to install xlog (a ham radio logging program) which requires hamlib 1.2.15-2. Hamlib won't compile and ends with the output below:
Making all in rpcrig make: Entering directory `/tmp/yaourt-tmp-rasteenb/aur-hamlib/src/hamlib-1.2.15/rpcrig' rm -f rpcrig_xdr.c abs_builddir=`pwd` ; \ cd . && rpcgen -c -C rpcrig.x -o $abs_builddir/rpcrig_xdr.c cannot find any C preprocessor (cpp) rpcgen: C preprocessor failed with exit code 1 make: *** [rpcrig_xdr.c] Error 1 make: Leaving directory `/tmp/yaourt-tmp-rasteenb/aur-hamlib/src/hamlib-1.2.15/rpcrig' make: *** [all-recursive] Error 1 ==> ERROR: A failure occurred in build(). Aborting... ==> ERROR: Makepkg was unable to build hamlib. ==> Restart building hamlib ? [y/N] ==> ------------------------------- ==>
So far, all other AUR packages have compiled with no trouble. I had previously compiled Hamlib on my netbook without any problems, but am not sure what version was on it.
Unfortunately, I'm mostly a scientist with some fortran programming long ago. So the answer isn't obvious to me by looking at the output. I took a look at the Make file, but really didn't know what to look for.
you have gcc installed right?
I can confirm this problem here with the current AUR package on an update system with base-devel.
The problem actually isn't with this package, it is with glibc's rpcgen. This has been seen elsewhere. rpcgen has the location of "cpp" hardcoded, and that location is wrong (in arch). So you must give rpcgen a -Y PATH flag to work. I fixed this with a manual edit to the Makefile. In a moment I'll have a fix for the PKGBUILD.
Last edited by Trilby (2012-07-06 11:56:38)
Solution: Add the following line to the PKGBUILD directly before the "make" line.
sed -i 's|= rpcgen|= rpcgen -Y /usr/bin|' */Makefile
Please contact the AUR maintainer to let them know of the problem, and direct them to this thread for a proposed fix to the PKGBUILD.
Thanks Trilby; that worked perfectly.
I posted the problem description and your solution in the comments for the package.