using any UTF-8 locale breaks the build (LC_CTYPE de_DE.UTF-8 in my case). Fix: i used the following: (before) ... ./minitests > minitests.out uniq -u < minitests.out > minitests.output.i386-unknown-freebsd5.3 uniq: stdin: Illegal byte sequence *** Error code 1 (after, using bash(1)) # export LANG=C LC_ALL=C # localname=$(pwd) && portupgrade -vw ${localname#*/p/} ---> Reading default options: -v -D -W -l /var/pkgtools/portupgrade.results -L /var/pkgtools/%s__%s.log ---> Session started at: Sun, 23 Jan 2005 00:52:23 +0100 ... and the build completed. i'm not sure where to insert this little fix in the ports "Makefile", though. regards, clemens How-To-Repeat: "setenv LC_CTYPE de_DE.UTF-8" and build. there's an innocent looking uniq(1) command in there, which is the culprit.
State Changed From-To: open->feedback To which port or ports does this PR apply? http://www.freebsd.org/cgi/query-pr.cgi?pr=76585 Adding to audit trail: sorry. this one is for "ports/lang/clisp", but i suspect many others exhibit mysterious build errors because of UTF-8 settings in $LANG, $LC_CTYPE etc. clemens
State Changed From-To: feedback->open Feedback received.
State Changed From-To: open->closed Ok I committed LANG=C bandaid to the port, please test with your locale.
"LANG=C" didn't cut it. environ(7) says the "$LC*" variables take precedence, so i thought: -MAKE_ENV+= CC="${CC}" LANG=C +MAKE_ENV+= CC="${CC}" LC_ALL=C but this didn't fix it, either. an explicit "export LC_ALL=C" is needed and sufficient before starting the build. unfortunately, i don't know how to achieve this using make(1). we'd need a shell wrapper if only for globally setting "$LC*" stuff. as a workaround, "LC_ALL=C make LC_ALL=C" works. "ports/ftp/curl" contains: # Setting LC_ALL=C is a kludge; maybe curl/libcurl shouldn't actually use # the user's locale when dates are sent to the server. test: build @cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} LC_ALL=C ${MAKE} test would it be possible to use a "pre-build" target in a similiar way? clemens
* 2005-02-07 Pav Lucistnik: > Hmm interesting. So you have a working tested patch? this one works. i got it from ports/lang/perl5.8. seems one has to reset each and every one of the locales-related environment variables. i think you can safely commit it, and it might well work in other cases where locales break building. clemens --- Makefile.0 Mon Feb 14 13:06:26 2005 +++ Makefile Mon Feb 14 13:12:35 2005 @@ -22,11 +22,18 @@ USE_GCC= 2.95 USE_GETTEXT= yes +# -ino: 20050214-1307 taken from lang/perl5.8: +LOCALE_CLEANUP= LANG="" LC_ALL="" LC_COLLATE="" LC_CTYPE="" \ + LC_MESSAGES="" LC_MONETARY="" LC_NUMERIC="" \ + LC_TIME="" +CONFIGURE_ENV+= ${LOCALE_CLEANUP} +MAKE_ENV+= ${LOCALE_CLEANUP} + # In clisp-2.28, the build dies in the "regexp" module: the build target # invokes a configure script, which encounters a different CC variable than # the one the top-level configure cached. We'll explicitly set CC to avoid # this. -MAKE_ENV+= CC="${CC}" LANG=C +MAKE_ENV+= CC="${CC}" CONFIGURE_ENV+= CC="${CC}" # The build uses INSTALL_* to copy files around, but since the Ports
Clemens Fischer pí¹e v po 14. 02. 2005 v 16:46 +0100: > * 2005-02-07 Pav Lucistnik: > > > Hmm interesting. So you have a working tested patch? > > this one works. i got it from ports/lang/perl5.8. seems one has to reset > each and every one of the locales-related environment variables. i think you > can safely commit it, and it might well work in other cases where locales > break building. It looks fine. I just checked it in. Thank you! -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> The Phase Spider. A spider that never seems quite there.