Summary: | Can't build devel/xsd | ||
---|---|---|---|
Product: | Ports & Packages | Reporter: | Daniel J. O'Connor <darius> |
Component: | Individual Port(s) | Assignee: | freebsd-kde (group) <kde> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | alonso, darius, freebsd-2024, makc, robak |
Priority: | Normal | ||
Version: | Latest | ||
Hardware: | Any | ||
OS: | Any | ||
Attachments: |
Description
Daniel J. O'Connor
2013-03-16 13:50:00 UTC
Responsible Changed From-To: freebsd-ports-bugs->kde Over to maintainer (via the GNATS Auto Assign Tool) I found a work around - run the following and rebuild.. gm4 -I = /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-fro= ntend/semantic-graph = /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-fro= ntend/semantic-graph/fundamental.hxx.m4 = >/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-fr= ontend/semantic-graph/fundamental.hxx -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C > sed: 1: "s \ xsd-frontend/ \ /tm ...": unterminated substitute pattern
It fails when WRKDIRPREFIX is set, somebody need to look closely.
Max
Is this PR still relevant? It still fails for me. I tried it on a fairly fresh 10.0 system and I get.. i686 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/generic -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586/i686/x86_64 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586/i686 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386 -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/generic -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -O2 -pipe -fno-strict-aliasing -I/usr/local/include -o /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/xsd/xsd/xsd.o -c /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/xsd/xsd/xsd.cxx In file included from /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/xsd/xsd/xsd.cxx:21: In file included from /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/transformations/enum-synthesis.cxx:8: /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph.hxx:20:10: fatal error: 'xsd-frontend/semantic-graph/fundamental.hxx' file not found #include <xsd-frontend/semantic-graph/fundamental.hxx> ^ 1 error generated. and earlier.. nd/xsd-frontend/semantic-graph/enumeration.o.d.old; then if cmp -s /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/enumeration.o.d /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/enumeration.o.d.old; then rm -f /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/enumeration.o.d.old && false; else rm -f /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/enumeration.o.d.old && true; fi fi sed: 1: "s \ xsd-frontend/ \ /tm ...": unterminated substitute pattern c++: error: unable to execute command: Broken pipe c++: error: clang frontend command failed due to signal (use -v to see invocation) FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 I have WRKDIRPREFIX=/tmp/work in /etc/make.conf - if I comment it out the build works. There are a number of ports that execute applications (binaries or scripts with execute file mode) in ${WRKDIRPREFIX}, such as at least /tmp/[...]/xsd-3.3.0-2+dep/build-0.3/c/gnu/dep being executed as part of the if statement's condition evaluation in the first comment. This, however, breaks builds where WRKDIRPREFIX is inside a filesystem mounted with the noexec mount option, which I guess is the issue here. Can you check noexec bit (zfs get exec or mount) being set? No, / is just a plain ole vanilla UFS and /tmp is on that. [freebsd10 5:42] ~ >df -h /tmp/work Filesystem Size Used Avail Capacity Mounted on /dev/da0p2 18G 9.1G 7.8G 54% / [freebsd10 5:56] ~ >mount /dev/da0p2 on / (ufs, local, journaled soft-updates) devfs on /dev (devfs, local, multilabel) /dev/da1p1 on /src (ufs, NFS exported, local) Me too (FreeBSD-10.1), clang: /home/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph.hxx:20:10: fatal error: 'xsd-frontend/semantic-graph/fundamental.hxx' file not found #include <xsd-frontend/semantic-graph/fundamental.hxx> ^ 1 error generated. Created attachment 150476 [details] Explicitly call gm4 to generate libxsd-frontend/xsd-frontend/semantic-graph/fundamental.hxx The attached hunk implements the work-around suggested by Daniel in comment #2. I do not know, why sed is failing -- nor whether the sed's failure is even related to the xsd-frontend/semantic-graph/fundamental.hxx not being created. But the work-around helps and, considering this bug is 21 months old now, I am going to claim "maintainer timeout" very shortly... (In reply to Mikhail T. from comment #9) > Created attachment 150476 [details] > Explicitly call gm4 to generate > libxsd-frontend/xsd-frontend/semantic-graph/fundamental.hxx > > The attached hunk implements the work-around suggested by Daniel in comment > #2. > > I do not know, why sed is failing -- nor whether the sed's failure is even > related to the xsd-frontend/semantic-graph/fundamental.hxx not being created. The port builds fine on the package cluster, I don't see a reason for this workaround. If you want fix the build in your case, please fix it properly, so that the patch can be sumbitted upstream. > But the work-around helps and, considering this bug is 21 months old now, I > am going to claim "maintainer timeout" very shortly... "maintainer timeout" means "maintainer does not respond", not "the bug is old". (In reply to Max Brazhnikov from comment #10) > The port builds fine on the package cluster Could you provide a link to the build-log, please? I'd like to see, what is creating the missing file in the successful build... > I don't see a reason for this workaround. The reason is simple -- multiple people world-wide are experiencing the same problem. It is not just me and Daniel even -- try web-searching for the error-message. > "maintainer timeout" means "maintainer does not respond", not "the bug is > old". Timeout may also mean, "maintainer fails to address the problem"... (In reply to Mikhail T. from comment #11) > (In reply to Max Brazhnikov from comment #10) > > The port builds fine on the package cluster > > Could you provide a link to the build-log, please? I'd like to see, what is > creating the missing file in the successful build... http://beefy2.isc.freebsd.org/bulk/10amd64-default/latest-per-pkg/xsd-3.3.0_1.log Created attachment 150485 [details]
Patch gnu/dep and intel/dep (identical) to work with regular sed and sh
Dropping this patch into files/ fixes the problems for me -- no sed-errors, and dependencies are properly generated now. That, in turn, causes the missing file to be generated before it is used -- which for non-developers (such as people simply building the port) has the same effect, as the previously-suggested work-around was achieving...
Not sure, why this was not hurting all systems -- mine uses a non-standard PREFIX (/opt), not sure about Daniel's...
While here, change one more line in the dep-script to make it work with regular sh, not bash.
(In reply to Mikhail T. from comment #13) > Created attachment 150485 [details] > Patch gnu/dep and intel/dep (identical) to work with regular sed and sh > > Dropping this patch into files/ fixes the problems for me -- no sed-errors, > and dependencies are properly generated now. That, in turn, causes the > missing file to be generated before it is used -- which for non-developers > (such as people simply building the port) has the same effect, as the > previously-suggested work-around was achieving... > > Not sure, why this was not hurting all systems -- mine uses a non-standard > PREFIX (/opt), not sure about Daniel's... Now it fails for me with similar errors: if test -f /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d; then mv /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d.old; fi && c++ -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libfrontend-elements -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586/i686/x86_64 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586/i686 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/generic -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586/i686/x86_64 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586/i686 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486/i586 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386/i486 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/i386 -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/arch/generic -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -I/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult -O2 -pipe -fstack-protector -fno-strict-aliasing -I/usr/local/include -M -MG -MP -MQ /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d -MQ /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.cxx | /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/build-0.3/c/gnu/dep /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/xsd-frontend.l.cpp-options >/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d && if test -f /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d.old; then if cmp -s /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d.old; then rm -f /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d.old && false; else rm -f /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d.old && true; fi fi sed: 1: "s| xsd-frontend/| /home ...": unterminated substitute pattern ... In file included from /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/transformations/enum-synthesis.cxx:8, from /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/xsd/xsd/xsd.cxx:21: /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph.hxx:20:55: error: xsd-frontend/semantic-graph/fundamental.hxx: No such file or directory (In reply to Max Brazhnikov from comment #14) > sed: 1: "s| xsd-frontend/| /home ...": unterminated substitute pattern Can you alter the patch-dep to use "sh -x"? This will output the complete sed command-line... (In reply to Mikhail T. from comment #15) > (In reply to Max Brazhnikov from comment #14) > > sed: 1: "s| xsd-frontend/| /home ...": unterminated substitute pattern > > Can you alter the patch-dep to use "sh -x"? This will output the complete > sed command-line... + [ cult/ ] + prefix=cult/ + shift + path=/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/ + shift + script='s| xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/local/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s|^xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/local/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s| xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/local/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s|^xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/local/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s| cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/local/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s|^cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/local/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s| cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/local/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s|^cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/local/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;' + [ '' ] + epilogue='s% \([^/. \\]\)% /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/\1%g;s%^\([^/. ].*:\)%/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/\1%' + exec sed -e 's| xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/local/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s|^xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/local/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s| xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s| /usr/local/include/xsd-frontend/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|g;s|^xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s|^/usr/local/include/xsd-frontend/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/|;s| cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/local/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s|^cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/local/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s| cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s| /usr/local/include/cult/| /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|g;s|^cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s|^/usr/local/include/cult/|/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libcult/cult/|;s% \([^/. \\]\)% /home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/\1%g;s%^\([^/. ].*:\)%/home/makc/dev/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/\1%' sed: 1: "s| xsd-frontend/| /home ...": unterminated substitute pattern (In reply to Max Brazhnikov from comment #16) Max, could you attach the log-fragment instead of copy-pasting -- to avoid line-wrapping? Thank you! Created attachment 150513 [details]
sed failure
Apparently sed fails to handle long commands, it works fine if I replace /home/makc/dev/ with /usr.
(In reply to Max Brazhnikov from comment #18) > Apparently sed fails to handle long commands, it works fine if I replace > /home/makc/dev/ with /usr. Why would it have worked for you before -- but not for Daniel and myself? Created attachment 150514 [details]
Break sed-commands apart -- into separate -e arguments
How about this variant of patch-dep (final version does not need the -x)? This breaks the constructed sed command-line into separate -e arguments, instead of using a single one with ;-separated substitutions.
Max, you were right -- there IS a limit on the size of a single command in sed. It is the _POSIX2_LINE_MAX, found in <limits.h>. The compile_stream() function in src/usr.bin/sed/compile.c maintains a buffer of that size... My latest patch, which breaks the command into multiple -e arguments, should work around this limitation. I guess, gsed either has no limit at all, or its limit is higher, than ours... (In reply to Mikhail T. from comment #21) > Max, you were right -- there IS a limit on the size of a single command in > sed. It is the _POSIX2_LINE_MAX, found in <limits.h>. > > The compile_stream() function in src/usr.bin/sed/compile.c maintains a > buffer of that size... > > My latest patch, which breaks the command into multiple -e arguments, should > work around this limitation. I guess, gsed either has no limit at all, or > its limit is higher, than ours... ok, feel free to commit the patch. A commit references this bug: Author: mi Date: Sat Dec 13 00:20:08 UTC 2014 New revision: 374612 URL: https://svnweb.freebsd.org/changeset/ports/374612 Log: Patch upstream's custom script for dependency-generation to avoid using overly-long sed commands. This is achieved by separating one large command (-e "cmd1;cmd2;...") into multiple ones (-e "cmd1" -e "cmd2" ...). The long command was hitting our sed's limit of 2048... PR: 177018 Approved by: maintainer (makc) Sponsored by: United Wallabies Changes: head/devel/xsd/files/patch-dep The fix has been already committed, so I am closing this PR. |