public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line
@ 2017-01-18 22:03 630dr7+9vgtozzjuj0gg at sharklasers dot com
  2017-01-18 22:03 ` [Bug runtime/21063] " 630dr7+9vgtozzjuj0gg at sharklasers dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: 630dr7+9vgtozzjuj0gg at sharklasers dot com @ 2017-01-18 22:03 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=21063

            Bug ID: 21063
           Summary: dtrace script causes mysterious build failures due to
                    improper forming of gcc command line
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: 630dr7+9vgtozzjuj0gg at sharklasers dot com
  Target Milestone: ---

From https://bugzilla.redhat.com/show_bug.cgi?id=1413762

When users provide a CFLAGS envar which containts newlines, the dtrace script
fails with:

gcc: error: 
   : No such file or directory

For example, the fedora rpm spec file for creating packages defines:

CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64
-mtune=generic -g \
               -D_LARGEFILE_SOURCE \
               -D_FILE_OFFSET_BITS=64 \
               -DZLIB_CONST \
               -fno-delete-null-pointer-checks"

and the multiple lines cause the dtrace script to die. Possibly, this error has
caused packagers to believe systemtap USDT's have not been available in project
where in fact it has been, because using "--with-dtrace" caused compilation
errors which were taken as due to general unavailability of the real dtrace
tool on linux.

The problem is towards the end of the `dtrace script`:

        cmd=split(cc1) + defines + includes + split(cflags) +\
             ["-fPIC", "-I.", "-I/usr/include", "-c", fname, "-o",
              filename + suffix]

where cflags should be sanitized so that examples like the above CFLAGS are
tolerated.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/21063] dtrace script causes mysterious build failures due to improper forming of gcc command line
  2017-01-18 22:03 [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line 630dr7+9vgtozzjuj0gg at sharklasers dot com
@ 2017-01-18 22:03 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
  2017-01-21  7:33 ` fche at redhat dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: 630dr7+9vgtozzjuj0gg at sharklasers dot com @ 2017-01-18 22:03 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=21063

Kinston Hughes <630dr7+9vgtozzjuj0gg at sharklasers dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugzilla.redhat.com
                   |                            |/show_bug.cgi?id=1413762

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/21063] dtrace script causes mysterious build failures due to improper forming of gcc command line
  2017-01-18 22:03 [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line 630dr7+9vgtozzjuj0gg at sharklasers dot com
  2017-01-18 22:03 ` [Bug runtime/21063] " 630dr7+9vgtozzjuj0gg at sharklasers dot com
@ 2017-01-21  7:33 ` fche at redhat dot com
  2017-01-21 22:36 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2017-01-21  7:33 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=21063

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fche at redhat dot com

--- Comment #1 from Frank Ch. Eigler <fche at redhat dot com> ---
I'm having trouble reproducing this with a plain set of commands lines.  Do you
have a copy&paste'able recipe to trigger the behaviour?

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/21063] dtrace script causes mysterious build failures due to improper forming of gcc command line
  2017-01-18 22:03 [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line 630dr7+9vgtozzjuj0gg at sharklasers dot com
  2017-01-18 22:03 ` [Bug runtime/21063] " 630dr7+9vgtozzjuj0gg at sharklasers dot com
  2017-01-21  7:33 ` fche at redhat dot com
@ 2017-01-21 22:36 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
  2017-01-21 23:00 ` fche at redhat dot com
  2017-01-22 22:22 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
  4 siblings, 0 replies; 6+ messages in thread
From: 630dr7+9vgtozzjuj0gg at sharklasers dot com @ 2017-01-21 22:36 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=21063

--- Comment #2 from Kinston Hughes <630dr7+9vgtozzjuj0gg at sharklasers dot com> ---
(In reply to Frank Ch. Eigler from comment #1)
> I'm having trouble reproducing this with a plain set of commands lines.  Do
> you have a copy&paste'able recipe to trigger the behaviour?

Sorry, this should do it.

```
#!/bin/sh

wget https://raw.githubusercontent.com/nodejs/node/master/src/node_provider.d

export CFLAGS='-g \
               -fno-delete-null-pointer-checks'
dtrace -G -s node_provider.d -o node_provider.h
```

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/21063] dtrace script causes mysterious build failures due to improper forming of gcc command line
  2017-01-18 22:03 [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line 630dr7+9vgtozzjuj0gg at sharklasers dot com
                   ` (2 preceding siblings ...)
  2017-01-21 22:36 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
@ 2017-01-21 23:00 ` fche at redhat dot com
  2017-01-22 22:22 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
  4 siblings, 0 replies; 6+ messages in thread
From: fche at redhat dot com @ 2017-01-21 23:00 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=21063

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from Frank Ch. Eigler <fche at redhat dot com> ---
commit 100bca3f124 should fix this.  The problem here seems to be the \
character in the string rather than new lines, but the patch nukes them both.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug runtime/21063] dtrace script causes mysterious build failures due to improper forming of gcc command line
  2017-01-18 22:03 [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line 630dr7+9vgtozzjuj0gg at sharklasers dot com
                   ` (3 preceding siblings ...)
  2017-01-21 23:00 ` fche at redhat dot com
@ 2017-01-22 22:22 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
  4 siblings, 0 replies; 6+ messages in thread
From: 630dr7+9vgtozzjuj0gg at sharklasers dot com @ 2017-01-22 22:22 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=21063

--- Comment #4 from Kinston Hughes <630dr7+9vgtozzjuj0gg at sharklasers dot com> ---
(In reply to Frank Ch. Eigler from comment #3)
> commit 100bca3f124 should fix this.  The problem here seems to be the \
> character in the string rather than new lines, but the patch nukes them both.

ah yes, a case of tunnel vision on my part. 

Thanks you again for being o responsive, I usually dread plunging into
bugzillaz for fear of either limbo or pedantic deflection but it's been simple
and quick to get hiccups in stap addressed. I salute you, sir.

-- 
You are receiving this mail because:
You are the assignee for the bug.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-01-22 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 22:03 [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line 630dr7+9vgtozzjuj0gg at sharklasers dot com
2017-01-18 22:03 ` [Bug runtime/21063] " 630dr7+9vgtozzjuj0gg at sharklasers dot com
2017-01-21  7:33 ` fche at redhat dot com
2017-01-21 22:36 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
2017-01-21 23:00 ` fche at redhat dot com
2017-01-22 22:22 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).