Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-7028

mysql_config produces invalid cflags (was: udf_example.c couldn't compile)

    XMLWordPrintable

Details

    Description

      [mikhail@localhost udf]$ ls -la
      total 36
      drwxrwxr-x. 1 mikhail mikhail    26 ноя  5 23:02 .
      drwxrwxr-x. 1 mikhail mikhail  5816 ноя  5 22:42 ..
      -rw-r--r--. 1 mikhail mikhail 33593 сен 25 04:29 udf_example.c
       
      [mikhail@localhost udf]$ mysql_config --cflags
      -I/usr/include/mysql -g -pipe -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 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIC -fno-delete-null-pointer-checks  -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing
       
      [mikhail@localhost udf]$ gcc $(mysql_config --cflags) -shared -fPIC -o udf_example.so udf_example.c
      cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security]
      In file included from /usr/include/pthread.h:21:0,
                       from /usr/include/mysql/my_global.h:294,
                       from udf_example.c:128:
      /usr/include/features.h:328:4: warning: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Wcpp]
       #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
          ^
      cc1: some warnings being treated as errors

      Attachments

        Activity

          People

            serg Sergei Golubchik
            mikhail Mikhail Gavrilov
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.