pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc/mk

On 7/11/2012 06:55, OBATA Akio wrote:
On Wed, 11 Jul 2012 02:19:47 +0900, John Marino <> 

line 645 of mk/compiler/ is where these variables start getting
added to the list:
.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}ada)

Can you type:
bmake -V '${_GCCBINDIR}' '${_GCC_BIN_PREFIX}'
to see those variable values?
And then check to see if you've got a binary ending in "ada" that is
triggering this condition? Maybe the base compiler on Mac OSX has an
gcc driver called "ada" or "something-ada" like lang/gcc-aux does.

${_GCCBINDIR} point to ${WRKDIR}/.wrapper/bin and wrapper `ada' will be
picked up.
You can probably reproduce it by using sudo for SU_CMD.
(related to _ROOT_CMD in it will set PATH)

workaround is followings, avoid to pick up cc in wrapper.

Index: mk/compiler/
RCS file: /cvsroot/pkgsrc/mk/compiler/,v
retrieving revision 1.123
diff -u -r1.123
--- mk/compiler/ 9 Jul 2012 07:42:17 -0000 1.123
+++ mk/compiler/ 11 Jul 2012 04:25:29 -0000
@@ -126,7 +126,7 @@
# _CC is the full path to the compiler named by ${CC} if it can be found.
.if !defined(_CC)
_CC:= ${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. for _dir_ in ${PATH:C/\:/ /g}
+. for _dir_ in ${PATH:C/\:/ /g:N${WRAPPER_BINDIR}}
. if empty(_CC:M/*)
. if exists(${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//})
_CC:= ${_dir_}/${CC:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}

I haven't been able to reproduce it, but I might have a cleaner workaround for you guys to test.

"ada" will exist in ${WRKDIR}/.wrapper/bin for all packages due to the alias in the mk/wrapper/ For packages with "ada" set in "USE_LANGUAGES", it will also exist in ${WRKDIR}/.gcc/bin, along with gnat, gnatmake, gnatbind, gnatlink, etc. All the "gnat*" executables will only be in ${WRKDIR}/.gcc/bin and never in ${WRKDIR}/.wrapper/bin.

So the proposed change to might be the better fix:
--- a/mk/compiler/
+++ b/mk/compiler/
@@ -642,7 +642,8 @@ F77PATH=    ${_GCCBINDIR}/${_GCC_BIN_PREFIX}gfortran
 PKG_FC:=       ${_GCC_FC}
 PKGSRC_FORTRAN?=       gfortran
-.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}ada)
+.if exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}ada) \
+ && exists(${_GCCBINDIR}/${_GCC_BIN_PREFIX}gnatmake)
 _GCC_ADA=      ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}ada
 _GCC_GMK=      ${_GCC_DIR}/bin/${_GCC_BIN_PREFIX}gnatmake

Let me know if that fixes both cases and then I'll commit it.
The reason I check for both "ada" and "gnatmake" is that "gnatmake" is a common used name that may be on the system for other reasons reasons, but "ada" as a driver name is not commonly used. So checking for both may avoid another false positive.


Home | Main Index | Thread Index | Old Index