Bug 177018 - Can't build devel/xsd
Summary: Can't build devel/xsd
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-16 13:50 UTC by Daniel J. O'Connor
Modified: 2015-03-29 11:11 UTC (History)
5 users (show)

See Also:


Attachments
Explicitly call gm4 to generate libxsd-frontend/xsd-frontend/semantic-graph/fundamental.hxx (483 bytes, patch)
2014-12-11 14:57 UTC, Mikhail T.
no flags Details | Diff
Patch gnu/dep and intel/dep (identical) to work with regular sed and sh (1.63 KB, patch)
2014-12-11 19:16 UTC, Mikhail T.
no flags Details | Diff
sed failure (5.30 KB, text/plain)
2014-12-12 20:32 UTC, Max Brazhnikov
no flags Details
Break sed-commands apart -- into separate -e arguments (1.16 KB, patch)
2014-12-12 21:14 UTC, Mikhail T.
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel J. O'Connor 2013-03-16 13:50:00 UTC
devel/xsd doesn't build. At least one header is not being generated due to a sed error, eg

if test -f /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d; then mv /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d.old; fi && c++  -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend -I/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libfrontend-elements -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/cul
 t/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 -M -MG -MP -MQ /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/sem
 antic-graph/annotation.o.d -MQ /tmp/work/usr!
 /ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.cxx | /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/build-0.3/c/gnu/dep /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/xsd-frontend.l.cpp-options >/tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.o.d && if test -f /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.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/annotation.o.d /tmp/work/usr/ports/devel/xsd/work/xsd-3.3.0-2+dep/libxsd-frontend/xsd-frontend/semantic-graph/annotation.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/annotation.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/annotation.o.d.old && true; fi fi
sed: 1: "s \ xsd-frontend/ \ /tm ...": unterminated substitute pattern

Full log is available at http://www.dons.net.au/~darius/xsd-build.log

How-To-Repeat: cd /usr/ports/devel/xsd
make
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-03-16 13:50:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->kde

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Daniel O'Connor 2013-03-16 22:03:07 UTC
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
Comment 3 Max Brazhnikov freebsd_committer freebsd_triage 2013-03-17 16:41:43 UTC
> sed: 1: "s \ xsd-frontend/ \ /tm ...": unterminated substitute pattern

It fails when WRKDIRPREFIX is set, somebody need to look closely.

Max
Comment 4 Carlo Strub freebsd_committer freebsd_triage 2014-09-11 20:12:29 UTC
Is this PR still relevant?
Comment 5 Daniel O'Connor 2014-09-12 01:07:55 UTC
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.
Comment 6 Alonso Schaich freebsd_committer freebsd_triage 2014-09-12 05:40:09 UTC
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?
Comment 7 Daniel O'Connor 2014-09-12 05:57:06 UTC
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)
Comment 8 Mikhail T. 2014-12-11 13:34:45 UTC
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.
Comment 9 Mikhail T. 2014-12-11 14:57:01 UTC
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...
Comment 10 Max Brazhnikov freebsd_committer freebsd_triage 2014-12-11 17:16:44 UTC
(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".
Comment 11 Mikhail T. 2014-12-11 17:20:49 UTC
(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"...
Comment 12 Max Brazhnikov freebsd_committer freebsd_triage 2014-12-11 17:49:10 UTC
(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
Comment 13 Mikhail T. 2014-12-11 19:16:41 UTC
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.
Comment 14 Max Brazhnikov freebsd_committer freebsd_triage 2014-12-11 20:56:01 UTC
(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
Comment 15 Mikhail T. 2014-12-11 21:08:10 UTC
(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...
Comment 16 Max Brazhnikov freebsd_committer freebsd_triage 2014-12-12 13:01:40 UTC
(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
Comment 17 Mikhail T. 2014-12-12 14:07:09 UTC
(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!
Comment 18 Max Brazhnikov freebsd_committer freebsd_triage 2014-12-12 20:32:12 UTC
Created attachment 150513 [details]
sed failure

Apparently sed fails to handle long commands, it works fine if I replace /home/makc/dev/ with /usr.
Comment 19 Mikhail T. 2014-12-12 20:59:44 UTC
(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?
Comment 20 Mikhail T. 2014-12-12 21:14:55 UTC
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.
Comment 21 Mikhail T. 2014-12-12 22:31:40 UTC
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...
Comment 22 Max Brazhnikov freebsd_committer freebsd_triage 2014-12-12 22:36:17 UTC
(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.
Comment 23 commit-hook freebsd_committer freebsd_triage 2014-12-13 00:20:36 UTC
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
Comment 24 Bartek Rutkowski freebsd_committer freebsd_triage 2015-03-29 11:11:43 UTC
The fix has been already committed, so I am closing this PR.