pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/41359: rpcgen does not pick up pkgsrc wrapper of cpp on Linux



>Number:         41359
>Category:       pkg
>Synopsis:       rpcgen does not pick up pkgsrc wrapper of cpp on Linux
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 05 19:10:00 +0000 2009
>Originator:     Alexander Nasonov
>Release:        
>Organization:
>Environment:
Linux 2.6.27 i686, glibc-2.8-20090209 or libc6-dev 2.9-6 (debian)
>Description:
I have built Linux from Scratch version 6.4 with gcc installed to /opt (in 
other words, there is no gcc & cpp in /usr/bin). Pkgsrc bootstraps fine with 
Intel C++ Compiler version 10.1 but building databases/db4 fails at configure 
phase. The problem can also be reproduced on debian.

>How-To-Repeat:
The problem can be reproduced on debian if you move cpp to a separate 
directory, e. g.

$ file /usr/bin/cpp*
/usr/bin/cpp:     symbolic link to `cpp-4.3'
/usr/bin/cpp-4.1: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
/usr/bin/cpp-4.3: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), 
dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
# mkdir /usr/bin/xxx
# mv /usr/bin/cpp* /usr/bin/xxx

Then add CPP=/usr/bin/xxx/cpp to mk.conf and try ' bmake configure' in 
databases/db4. It will fail with

checking "rpcgen -C" build of db_server.h... no
checking "rpcgen" build of db_server.h... no
configure: error: Unable to build RPC support: rpcgen failed.
*** Error code 1


Do not forget to mov cpp* back to /usr/bin/ !
>Fix:
$ rpcgen --help 
...
-Y path         directory name to find C preprocessor (cpp)

$ cvs diff -u mk/tools/rpcgen.mk
Index: mk/tools/rpcgen.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/tools/rpcgen.mk,v
retrieving revision 1.10
diff -u -r1.10 rpcgen.mk
--- mk/tools/rpcgen.mk  17 Jul 2005 23:19:04 -0000      1.10
+++ mk/tools/rpcgen.mk  5 May 2009 18:52:09 -0000
@@ -53,6 +53,8 @@
 TOOLS_CMD.rpcgen=      ${TOOLS_DIR}/bin/rpcgen
 .if ${OPSYS} == "NetBSD"
 TOOLS_ARGS.rpcgen?=    -b
+.elif ${OPSYS} == "Linux"
+TOOLS_ARGS.rpcgen?=    -Y ${WRAPPER_BINDIR:Q}
 .endif
 TOOLS_SCRIPT.rpcgen=   CPP=${WRAPPER_BINDIR:Q}/cpp ${TOOLS_SCRIPT_DFLT.rpcgen}



Home | Main Index | Thread Index | Old Index