Details

    Description

      cmake . \
      	-DMYSQL_DATADIR=/home/mysqldat \
      	-DCMAKE_INSTALL_PREFIX=/usr/local \
      	-DWITH_INNOBASE_STORAGE_ENGINE=on \
      	-DWITH_ARCHIVE_STORAGE_ENGINE=on \
      	-DMYSQL_UNIX_ADDR=/var/lib/mysql/mysql.sock \
      	-DWITH_LIBWRAP=on
      

      on redhat 6 results in the following : 10.3.16 compiled just fine...

      [ 16%] Building C object unittest/mysys/CMakeFiles/lf-t.dir/lf-t.c.o
      Linking CXX executable lf-t
      ../../mysys/libmysys.a(my_cpu.c.o): In function `my_cpu_init':
      /usr/local/src/mariadb-10.3.17/mysys/my_cpu.c:86: undefined reference to `__rdtsc'
      /usr/local/src/mariadb-10.3.17/mysys/my_cpu.c:88: undefined reference to `__rdtsc'
      /usr/local/src/mariadb-10.3.17/mysys/my_cpu.c:90: undefined reference to `__rdtsc'
      collect2: ld returned 1 exit status
      make[2]: *** [unittest/mysys/lf-t] Error 1
      make[1]: *** [unittest/mysys/CMakeFiles/lf-t.dir/all] Error 2
      make: *** [all] Error 2
      

      Attachments

        1. maria
          42 kB
        2. rdtsc.patch
          0.4 kB

        Issue Links

          Activity

            kenhys Kentaro Hayashi added a comment - - edited

            It was occurred on CentOS 6 (64bit), too. It seems that CentOS 6 (32bit) is not affected.

            I'm NOT sure but I guess MDEV-19845: Fix the build on some x86 targets is related.

            kenhys Kentaro Hayashi added a comment - - edited It was occurred on CentOS 6 (64bit), too. It seems that CentOS 6 (32bit) is not affected. I'm NOT sure but I guess MDEV-19845: Fix the build on some x86 targets is related.
            skokhan Sergey Kokhan added a comment -

            Faced with the same problem and it is because that CentOS 6 and RedHat 6 x86-64 using gcc-4.4.
            gcc-4.4 does not have support for rdtsc in x86intrin.h. It was added since gcc-4.5.

            This patch helped me solve the problem. rdtsc.patch

            --- ./a/mysys/my_cpu.c<>2019-07-27 20:18:31.000000000 -0400
            +++ ./b/mysys/my_cpu.c<>2019-08-05 07:16:48.780583139 -0400
            @@ -31,6 +31,8 @@ unsigned my_cpu_relax_multiplier = 200;
             instead of being inlined. Let us fall back to my_timer_cycles(), which
             internally invokes rdtsc. */
             #  include <my_rdtsc.h>
            +# elif GCC_VERSION < 4005
            +#  include <my_rdtsc.h>
             # else
             #  include <x86intrin.h>
             #  define my_timer_cycles __rdtsc
            

            skokhan Sergey Kokhan added a comment - Faced with the same problem and it is because that CentOS 6 and RedHat 6 x86-64 using gcc-4.4. gcc-4.4 does not have support for rdtsc in x86intrin.h. It was added since gcc-4.5. This patch helped me solve the problem. rdtsc.patch --- ./a/mysys/my_cpu.c<> 2019 - 07 - 27 20 : 18 : 31.000000000 - 0400 +++ ./b/mysys/my_cpu.c<> 2019 - 08 - 05 07 : 16 : 48.780583139 - 0400 @@ - 31 , 6 + 31 , 8 @@ unsigned my_cpu_relax_multiplier = 200 ; instead of being inlined. Let us fall back to my_timer_cycles(), which internally invokes rdtsc. */ # include <my_rdtsc.h> +# elif GCC_VERSION < 4005 +# include <my_rdtsc.h> # else # include <x86intrin.h> # define my_timer_cycles __rdtsc

            Sorry, I did not notice the report until now. This ought to have been caused by MDEV-19845.

            If I understand correctly, the 10.4 and later series should be unaffected, because it will require GCC 4.8.5 or later, for sufficient C++11 support.

            However, is this fix still needed? Red Hat Enterprise Linux 6 should reach its End of Life (EOL) on November 30, 2020. I am a bit reluctant to add tweaks for very old compilers.

            marko Marko Mäkelä added a comment - Sorry, I did not notice the report until now. This ought to have been caused by MDEV-19845 . If I understand correctly, the 10.4 and later series should be unaffected, because it will require GCC 4.8.5 or later, for sufficient C++11 support. However, is this fix still needed? Red Hat Enterprise Linux 6 should reach its End of Life (EOL) on November 30, 2020. I am a bit reluctant to add tweaks for very old compilers.

            Hey,

            I don't seem to be able to log into the ticket, and probably lost my
            password for this setup.

            We have migrated off of Redhat Enterprise 6 so ahead and do whatever you
            need to do with this.

            Thanks,
            Matt


            Matthew Goebel : m <goebel@emunix.emich.edu>goebel@emich.edu : Unix Jockey
            @ EMU : Hail Eris
            Neo-Student, Net Lurker, Donut consumer, and procrastinating medher...
            "Always with the negative waves, Moriarty" - Oddball
            "Comfort the troubled, and trouble the comfortable." - Dietrich Bonhoeffer

            mgoebel Matthew Goebel added a comment - Hey, I don't seem to be able to log into the ticket, and probably lost my password for this setup. We have migrated off of Redhat Enterprise 6 so ahead and do whatever you need to do with this. Thanks, Matt – Matthew Goebel : m <goebel@emunix.emich.edu>goebel@emich.edu : Unix Jockey @ EMU : Hail Eris Neo-Student, Net Lurker, Donut consumer, and procrastinating medher... "Always with the negative waves, Moriarty" - Oddball "Comfort the troubled, and trouble the comfortable." - Dietrich Bonhoeffer

            I am closing this, because RHEL 6 (and CentOS 6) have reached their End of Life. It could be possible to work around this by installing a newer compiler on that system. That is what we do in order to be able to build tarballs of MariaDB 10.5 or 10.6 on our CI system.

            marko Marko Mäkelä added a comment - I am closing this, because RHEL 6 (and CentOS 6) have reached their End of Life. It could be possible to work around this by installing a newer compiler on that system. That is what we do in order to be able to build tarballs of MariaDB 10.5 or 10.6 on our CI system.

            People

              marko Marko Mäkelä
              mgoebel Matthew Goebel
              Votes:
              2 Vote for this issue
              Watchers:
              7 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.