public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "630dr7+9vgtozzjuj0gg at sharklasers dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line
Date: Wed, 18 Jan 2017 22:03:00 -0000	[thread overview]
Message-ID: <bug-21063-6586@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2017-01-18 22:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-18 22:03 630dr7+9vgtozzjuj0gg at sharklasers dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-21063-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).