Subject: Re: need a C++ compiler? (was: CVS commit: pkgsrc)
To: Jeremy C. Reed <reed@reedmedia.net>
From: Johnny C. Lam <jlam@buildlink.org>
List: tech-pkg
Date: 02/03/2004 03:50:06
On Mon, Feb 02, 2004 at 11:23:36AM -0800, Jeremy C. Reed wrote:
> On pkgsrc-changes on Mon, 2 Feb 2004, Johnny C. Lam wrote:
>
> > Log Message:
> > These packages need a C++ compiler.
>
> At this time, all packages using buildlinking need a C++ compiler.
> Because the linking has CXX. (Unless something changed recently.) Can we
> make buildlinking work if a C++ compiler is not installed?
Yes, this should now work with a recent pkgsrc.
> I can not test now because the new mk/compiler/gcc.mk fails for me:
>
> sh: line 1: type: -pipe: not found
> sh: -c: line 2: syntax error: unexpected end of file
> bmake:
> "../../mk/compiler/../../mk/compiler/../../mk/compiler/../../mk/compiler/gcc.mk"
> line 185: warning: "if /usr/sbin/pkg_info -K /var/db/pkg -qe gcc; then
> /usr/sbin/pkg_info -K /var/db/pkg -f gcc |
> /usr/bin/grep "File:.*bin/gcc" | /bin/sed
> -e "s/.*File: *//;s/bin\/gcc.*//;q"; else
> gccpath="`type cc -pipe | /usr/bin/awk '{ print $NF }'`"; case
> $gccpath in /usr/*)
> /bin/echo "`/usr/bin/basename $gccpath`/"; ;;
> *) /bin/echo
> "not_found/"; ;; esac"
> returned non-zero status
> bmake:
> "../../mk/compiler/../../mk/compiler/../../mk/compiler/../../mk/compiler/gcc.mk"
> line 186: Unassociated shell command "fi"
> bmake:
> "../../mk/compiler/../../mk/compiler/../../mk/compiler/../../mk/compiler/gcc.mk"
> line 1: Could not find ../../lang/gcc/buildlink3.mk
> bmake: Fatal errors encountered -- cannot continue
This should also be fixed now with a recent pkgsrc. I've modified the
code to only use the first word of ${CC} and to avoid relying on the
format of the "type" output to find the path to ${CC}.
Cheers,
-- Johnny Lam <jlam@buildlink.org>