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

Server 10.1.17 fails to build using clang with c++11

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.1.17
    • 10.1.18, 5.5.53, 10.0.28
    • Compiling
    • FreeBSD 9.1-p24, amd46
      clang 3.4.2 from ports
      libc++ 208080 from ports
      CXXFLAGS+= -std=c++11 -stdlib=libc++
    • 10.1.18

    Description

      Clang fails to compile with "clang++ -std=c++11" or "clang++ -std=c++11 -stdlib=libc++". Issue was mostly fixed in MySQL in response to this 2012 bug

      /usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/sql/sql_view.cc:765:3: error: non-constant-expression cannot be narrowed from type 'size_t' (aka 'unsigned long') to 'int' in initializer list [-Wc++11-narrowing]
        my_offsetof(TABLE_LIST, mariadb_version),
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/include/my_global.h:884:9: note: expanded from macro 'my_offsetof'
              ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      /usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/sql/sql_view.cc:765:3: note: override this message by inserting an explicit cast
        my_offsetof(TABLE_LIST, mariadb_version),
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        static_cast<int>(                       )
      /usr/ports/databases/mariadb101-server/work/mariadb-10.1.17/include/my_global.h:884:9: note: expanded from macro 'my_offsetof'
              ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            fsbruva Matthew Kempe
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.