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

[PATCH] solaris10 build fixes

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0, 10.1
    • 5.5.49
    • Compiling
    • None

    Description

      modifications to 10.0.23 to get it compiled on solaris 10 (patched up
      to current) using the latest solaris-studio compilers (12.4):
       
      configuration options used:
       
      env \
        CC=cc \
        CFLAGS="-xtarget=ultra2 -xarch=sparcvis -xO4 -xstrconst -mt" \
        LDFLAGS=-s \
        CXX=CC \
        CXXFLAGS="-xtarget=ultra2 -xarch=sparcvis -xO4 -noex -mt" \
          cmake . -L \
            -DCMAKE_INSTALL_PREFIX=/opt/mysql \
            -DINSTALL_SBINDIR=sbin \
            -DDEFAULT_SYSCONFDIR=/opt/mysql/etc \
            -DENABLED_LOCAL_INFILE=1 \
            -DMYSQL_UNIX_ADDR=/tmp/.mysql.sock \
            -DWITH_EXTRA_CHARSETS=complex \
            -DWITH_READLINE=ON \
            -DWITH_MYSQLD_LDFLAGS=-lmtmalloc
      gmake
       
       
      daemon can be installed, initialized and started, and does
      (at least :-) simple things, including handling of innodb databases.
       
      test suite passes with a minor handful of failures (some wrt. ipv6,
      which is neither configured nor used on the host; some because
      of differing error messages; one seems a bug in the test-suite)
       
      here is what i had to patch (see pull request), in order of
      appearance during build of the server:
       
      1)
      linking  unittest/strings/strings-t  and  unittest/mysys/my_vsnprintf-t
      throws undefined-symbol errors such as
      "undefined symbol strdup_root, first referenced in
       CMakeFiles/strings-t.dir/strings-t.c.o"
       
      this is solved for me by adding after "../../strings/libstrings.a"
      "../../mysys/libmysys.a ../../strings/libstrings.a -lrt"
      to the respective cmake-generated CMakeFiles/....dir/link.txt files
       
      i changed
        unittest/mysys/CMakeLists.txt, unittest/strings/CMakeLists.txt
      such that linkage works.  the change probably should be #ifdef'ed.
       
       
      2)
      studio-cplusplus seems not to like anonymous structs / unions the way as
      gnu-cplusplus does.
      this affects Gcalc_heap::Info in
        sql/item_geofunc.h
      and it's use in
        sql/item_geofunc.cc, sql/gcalc_slicescan.cc.
       
      i rewrote the code to use trivial struct / union names.
       
       
      3)
      for studio-compiler, when declaring an array, dimensions must be constant.
      affected files:
         storage/spider/spd_conn.cc, storage/spider/spd_db_conn.cc,
         storage/spider/spd_ping_table.cc, storage/spider/spd_table.cc,
         storage/spider/spd_trx.cc
       
      i rewrote the code to declare a pointer and use alloca()
       
       
      4)
      studio-compiler uses -W to propagate options to sub-commands of the
      compile-process and, in particular, error-terminates on -Wall.
      so i had to conditionalize the adding of -W (and -f) options in
        storage/connect/CMakeLists.txt.
       
      the attached patch should probably get generalized w.r.t. other compilers.
       
       
      5)
      another anonymous struct problem in
        storage/connect/xindex.h, storage/connect/xindex.cpp
       
       
      6)
      had to add a trivial cast in
        storage/connect/maputil.cpp
       
       
      7)
      studio-cplusplus has problem with template inside struct in
        storage/sphinx/ha_sphinx.cc
       
      i rearranged the code, so the template is outside the struct, and a
      union is used
       
       
      i still get oodles of warnings  "Identifier expected instead of }." (from
      enums or initializers like "{ foo, bar, }"), and  "bar hides foo::bar".
      oh, well.

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              svoj Sergey Vojtovich
              Votes:
              0 Vote for this issue
              Watchers:
              1 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.