#37066 closed defect (fixed)
p5-shell-parser: sed: RE error: illegal byte sequence
Reported by: | amadeus24 | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.1.2 |
Keywords: | mountainlion | Cc: | blair.christensen@…, ryandesign (Ryan Carsten Schmidt), jeremyhu (Jeremy Huddleston Sequoia), cooljeanius (Eric Gallager) |
Port: | p5-shell-parser |
Description (last modified by ryandesign (Ryan Carsten Schmidt))
Last lines of build:
:debug:extract chowned /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-shell-parser/p5.12-shell-parser/work to macports :debug:extract euid/egid changed to: 503/501 :debug:extract Privilege de-escalation not attempted as not running as root. :debug:patch patch phase started at Tue Nov 20 20:43:34 CET 2012 :debug:patch Executing org.macports.patch (p5.12-shell-parser) :debug:patch Privilege de-escalation not attempted as not running as root. :debug:configure configure phase started at Tue Nov 20 20:43:34 CET 2012 :notice:configure ---> Configuring p5.12-shell-parser :debug:configure Using compiler 'Mac OS X clang' :debug:configure Executing org.macports.configure (p5.12-shell-parser) :debug:configure Environment: CPATH='/opt/local/include' CFLAGS='-pipe -O2' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-pipe -O2' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.8' CXX='/usr/bin/clang++' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-shell-parser/p5.12-shell-parser/work/.CC_PRINT_OPTIONS' F90FLAGS='-pipe -O2' LDFLAGS='-L/opt/local/lib' FCFLAGS='-pipe -O2' OBJC='/usr/bin/clang' INSTALL='/usr/bin/install -c' PERL_AUTOINSTALL='--skipdeps' OBJCFLAGS='-pipe -O2' FFLAGS='-pipe -O2' CC_PRINT_OPTIONS='YES' CC='/usr/bin/clang' :debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-shell-parser/p5.12-shell-parser/work/Shell-Parser-0.04" && /opt/local/bin/perl5.12 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/clang" LD="/usr/bin/clang"' :debug:configure Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-shell-parser/p5.12-shell-parser/work/Shell-Parser-0.04" && /opt/local/bin/perl5.12 Makefile.PL INSTALLDIRS=vendor CC="/usr/bin/clang" LD="/usr/bin/clang" :info:configure Checking if your kit is complete... :info:configure Looks good :info:configure Writing Makefile for Shell::Parser :debug:configure Executing proc-post-org.macports.configure-configure-0 :info:configure sed: RE error: illegal byte sequence :info:configure Command failed: find /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_perl_p5-shell-parser/p5.12-shell-parser/work/Shell-Parser-0.04 -name Makefile -type f -print0 | xargs -0 /usr/bin/sed -i "" '/^CCFLAGS *=/s/$/ /' ; :info:configure Exit code: 1 :error:configure org.macports.configure for port p5.12-shell-parser returned: command execution failed :debug:configure Error code: NONE :debug:configure Backtrace: command execution failed while executing "$post $targetname" :info:configure Warning: targets not executed for p5.12-shell-parser: org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install :error:configure Failed to install p5.12-shell-parser :debug:configure Registry error: p5.12-shell-parser not registered as installed & active. invoked from within "registry_active ${subport}" invoked from within "$workername eval registry_active \${subport}"
Attachments (1)
Change History (8)
Changed 12 years ago by amadeus24
comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | blair.christensen@… ryandesign@… added |
---|---|
Description: | modified (diff) |
Keywords: | mountainlion added; p5-shell-parser won't build removed |
Summary: | p5-shell-parser won't build → p5-shell-parser: sed: RE error: illegal byte sequence |
comment:2 follow-up: 3 Changed 12 years ago by jmroot (Joshua Root)
Firstly, it should be LC_CTYPE, not LANG; and secondly, setting it to C will produce incorrect results unless the non-UTF8 characters are confined to comments. You need to use the actual character encoding of the file (or convert it from that to UTF-8 before running sed).
comment:3 follow-up: 4 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | jeremyhu@… added |
---|
Replying to jmr@…:
Firstly, it should be LC_CTYPE, not LANG;
Oops, I didn't realize that. As these issues have come up, I've been setting LANG in the ports. This has worked, but LANG sets several environment variables in addition to LC_CTYPE. Not sure what adverse implications that might be having.
and secondly, setting it to C will produce incorrect results unless the non-UTF8 characters are confined to comments. You need to use the actual character encoding of the file (or convert it from that to UTF-8 before running sed).
Jeremy Huddleston Sequoia said using the C locale was fine, and that's what we've been doing for months already, since the release of Mountain Lion, in dozens of ports. If this was wrong, then there's a bit of cleanup to be done. Perhaps a recipe in PortfileRecipes would be good too, in either case.
Note that in the case of this specific ticket, we're talking about making a change to the perl5 portgroup, which does not know what encoding the file being changed is using. Or are you proposing that, instead of changing the perl5 portgroup, p5-shell-parser should change the file's encoding before the portgroup's code runs? That could be done. Looks like p5-shell-parser's Makefile is just ISO-8859-1. Maybe we want a proc in base for converting encodings so we don't have to call iconv
with system
manually.
comment:4 Changed 12 years ago by jeremyhu (Jeremy Huddleston Sequoia)
Replying to ryandesign@…:
Replying to jmr@…:
and secondly, setting it to C will produce incorrect results unless the non-UTF8 characters are confined to comments. You need to use the actual character encoding of the file (or convert it from that to UTF-8 before running sed).
Jeremy Huddleston Sequoia said using the C locale was fine, and that's what we've been doing for months already, since the release of Mountain Lion, in dozens of ports. If this was wrong, then there's a bit of cleanup to be done. Perhaps a recipe in PortfileRecipes would be good too, in either case.
If the reinplace is actually matching/changing what is written in that other locale, then it can cause a problem. If you want to just skip over it and continue as sed has done in the past, then LC_CTYPE=C is ok. The best solution would be to fix the file's encoding to UTF-8 and submit the change upstream, but that's not always a possibility as some files contain multiple encodings in embedded byte-streams on purpose (and thus you need to use the C LC_TYPE to deal with them).
comment:6 follow-up: 7 Changed 10 years ago by danielluke (Daniel J. Luke)
Resolution: | → fixed |
---|---|
Status: | new → closed |
this should be resolved now (r123725)
A common error seen on Mountain Lion, fixed by setting LANG to C at the appropriate point. In this case, the appropriate point will have to be the post-configure procedure in the perl5 portgroup.