You are not logged in.

#1 2012-07-06 06:09:03

rasteenb
Member
Registered: 2009-04-20
Posts: 19

Build of hamlib fails - cannot find any C preprocessor (cpp)

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[1]: 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[1]: *** [rpcrig_xdr.c] Error 1
make[1]: 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.

Rob

Offline

#2 2012-07-06 10:00:24

debdj
Member
Registered: 2012-01-19
Posts: 163

Re: Build of hamlib fails - cannot find any C preprocessor (cpp)

you have gcc installed right?

Offline

#3 2012-07-06 11:34:15

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: Build of hamlib fails - cannot find any C preprocessor (cpp)

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)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2012-07-06 12:03:44

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,441
Website

Re: Build of hamlib fails - cannot find any C preprocessor (cpp)

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.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2012-07-06 14:42:54

rasteenb
Member
Registered: 2009-04-20
Posts: 19

Re: Build of hamlib fails - cannot find any C preprocessor (cpp)

Thanks Trilby; that worked perfectly.

I posted the problem description and your solution in the comments for the package.
https://aur.archlinux.org/packages.php?ID=22311

Rob

Offline

Board footer

Powered by FluxBB