This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]