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

MariaDB 10.0.13 compilation fails on Raspberry Pi and rpl_parallel.cc

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.0.13
    • Fix Version/s: 10.0.14
    • Component/s: Compiling
    • Labels:
      None
    • Environment:
      Linux raspberrypi 3.12.22+ #691 PREEMPT Wed Jun 18 18:29:58 BST 2014 armv6l GNU/Linux

      MariaDB 10.0.13 trunk

      Description

      Compilation from the current trunk version of MariaDB 10.0.13 fails on the Raspberry Pi using Raspbian. I did use the "apt-get build-dep mysql-server" dependencies. (I tried this a few months ago and it failed on that file too.)

      [ 41%] Building CXX object sql/CMakeFiles/sql.dir/rpl_parallel.cc.o
      cd /home/pi/mariadb/maria/trunk/sql && /usr/bin/c++ -DHAVE_CONFIG_H -DMYSQL_SERVER -DHAVE_EVENT_SCHEDULER -DHAVE_POOL_OF_THREADS -Wall -Wall -Wno-unused-parameter -fno-exceptions -fno-rtti -O3 -g -static-libgcc -fno-omit-frame-pointer -fno-strict-aliasing -Wno-uninitialized -DDBUG_OFF -I/home/pi/mariadb/maria/trunk/include -I/home/pi/mariadb/maria/trunk/sql -I/home/pi/mariadb/maria/trunk/pcre -I/home/pi/mariadb/maria/trunk/zlib -I/home/pi/mariadb/maria/trunk/extra/yassl/include -I/home/pi/mariadb/maria/trunk/extra/yassl/taocrypt/include -DHAVE_YASSL -DYASSL_PREFIX -DHAVE_OPENSSL -DMULTI_THREADED -o CMakeFiles/sql.dir/rpl_parallel.cc.o -c /home/pi/mariadb/maria/trunk/sql/rpl_parallel.cc
      /home/pi/mariadb/maria/trunk/sql/rpl_parallel.cc: In function ‘void* handle_rpl_parallel_thread(void*)’:
      /home/pi/mariadb/maria/trunk/sql/rpl_parallel.cc:800:11: error: ‘rli’ was not declared in this scope
      /home/pi/mariadb/maria/trunk/sql/rpl_parallel.cc:813:7: error: ‘rli’ was not declared in this scope
      make[2]: *** [sql/CMakeFiles/sql.dir/rpl_parallel.cc.o] Error 1
      make[2]: Leaving directory `/home/pi/mariadb/maria/trunk'
      make[1]: *** [sql/CMakeFiles/sql.dir/all] Error 2
      make[1]: Leaving directory `/home/pi/mariadb/maria/trunk'
      make: *** [all] Error 2

      Deleting the functions starting from line 800 and 813 respectively, resulted in a complete compilation. But i did try this just to see if this is the only thing blocking it.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            mchevalier Melanie Chevalier added a comment -

            Just confirming this exact compilation error when building on an ARM7 Allwinner A10 SoC.

            gcc version is irrelevant, it really is an undeclared variable. I've dug up that the offending lines came over from one of the patches mentioned on this mailing list post:

            https://lists.launchpad.net/maria-developers/msg07484.html

            Show
            mchevalier Melanie Chevalier added a comment - Just confirming this exact compilation error when building on an ARM7 Allwinner A10 SoC. gcc version is irrelevant, it really is an undeclared variable. I've dug up that the offending lines came over from one of the patches mentioned on this mailing list post: https://lists.launchpad.net/maria-developers/msg07484.html
            Hide
            nmalinoski Nathan Malinoski added a comment -

            I'm also experiencing the same 10.0.13 compilation errors at the same lines (7, 11) in rpl_parallel.cc, though on gentoo sparc.

            Show
            nmalinoski Nathan Malinoski added a comment - I'm also experiencing the same 10.0.13 compilation errors at the same lines (7, 11) in rpl_parallel.cc, though on gentoo sparc.
            Hide
            serg Sergei Golubchik added a comment - - edited

            Somehow cmake decides that gcc on your platform does not support __sync_* builtins.
            And then it falls back to using rwlocks, and gets that error that you have.

            As far as I know, both ARM and sparc support atomic ops just fine, and I suspect that any reasonable gcc version would support __sync_* builtins on these architectures. May be gcc 2.95 doesn't.

            You can try using -DWITH_ATOMIC_OPS=smp (optionally with -DHAVE_SOLARIS_ATOMIC=1 on sparc). But this, really, should've been detected by cmake.

            For Raspberry PI you can consider using -DWITH_ATOMIC_OPS=up this will use the dummy implementation of atomic ops that isn't atomic against threads executing on other CPUs, but perfectly fine on uni-processor system (with no inter-CPU synchronization overhead).

            I'll fix the compilation error when rwlocks are used. But you shouldn't have been using in the first place.

            Show
            serg Sergei Golubchik added a comment - - edited Somehow cmake decides that gcc on your platform does not support __sync_* builtins. And then it falls back to using rwlocks, and gets that error that you have. As far as I know, both ARM and sparc support atomic ops just fine, and I suspect that any reasonable gcc version would support __sync_* builtins on these architectures. May be gcc 2.95 doesn't. You can try using -DWITH_ATOMIC_OPS=smp (optionally with -DHAVE_SOLARIS_ATOMIC=1 on sparc). But this, really, should've been detected by cmake. For Raspberry PI you can consider using -DWITH_ATOMIC_OPS=up this will use the dummy implementation of atomic ops that isn't atomic against threads executing on other CPUs, but perfectly fine on uni-processor system (with no inter-CPU synchronization overhead). I'll fix the compilation error when rwlocks are used. But you shouldn't have been using in the first place.
            Hide
            nmalinoski Nathan Malinoski added a comment -

            I'm using gcc 4.7.3, the latest marked as stable for Gentoo sparc.

            -DWITH_ATOMIC_OPS=smp doesn't seem to make a difference; fails at the same spot: https://gist.github.com/anonymous/bc0b6435ade6f30d9bfe
            -DHAVE_SOLARIS_ATOMIC=1 added to -DWITH_ATOMIC_OPS=smp causes the build to fail much earlier: http://dpaste.com/1E4T5YJ

            After discussing it with the #gentoo-sparc devs, I'm going to file a bug on Gentoo's Bugzilla; might be a misconfiguration with GCC.

            Show
            nmalinoski Nathan Malinoski added a comment - I'm using gcc 4.7.3, the latest marked as stable for Gentoo sparc. -DWITH_ATOMIC_OPS=smp doesn't seem to make a difference; fails at the same spot: https://gist.github.com/anonymous/bc0b6435ade6f30d9bfe -DHAVE_SOLARIS_ATOMIC=1 added to -DWITH_ATOMIC_OPS=smp causes the build to fail much earlier: http://dpaste.com/1E4T5YJ After discussing it with the #gentoo-sparc devs, I'm going to file a bug on Gentoo's Bugzilla; might be a misconfiguration with GCC.
            Hide
            brad0 Brad Smith added a comment -

            Also ran into this on OpenBSD/powerpc utilizing GCC 4.2.1.

            Show
            brad0 Brad Smith added a comment - Also ran into this on OpenBSD/powerpc utilizing GCC 4.2.1.
            Hide
            brad0 Brad Smith added a comment -

            I was looking at the commit list to try and see if I could spot a commit to fix the rw locks. Any word on this?

            Show
            brad0 Brad Smith added a comment - I was looking at the commit list to try and see if I could spot a commit to fix the rw locks. Any word on this?
            Show
            serg Sergei Golubchik added a comment - it's revid:sergii@pisem.net-20140908105957-90cv53n21kokv1uk
            Hide
            brad0 Brad Smith added a comment -

            Yes, thanks. I am using 10.0.14 now and noticed the issue has been fixed.

            Show
            brad0 Brad Smith added a comment - Yes, thanks. I am using 10.0.14 now and noticed the issue has been fixed.

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                eonMcT eonMcT
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour
                  1h