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

cross compile fail on arm/mips musl

    XMLWordPrintable

Details

    Description

      trying to build mariadb 5.5.x on arm/mips targets with musl it gives me the following error

      *../libmysql/libmysqlclient.a(my_context.c.o): In function `my_context_spawn_internal':
      my_context.c:(.text+0x3c): undefined reference to `setcontext'
      my_context.c:(.text+0x40): undefined reference to `setcontext'
      ../libmysql/libmysqlclient.a(my_context.c.o): In function `my_context_continue':
      my_context.c:(.text+0xa4): undefined reference to `swapcontext'
      my_context.c:(.text+0xc4): undefined reference to `swapcontext'
      ../libmysql/libmysqlclient.a(my_context.c.o): In function `my_context_spawn':
      my_context.c:(.text+0x140): undefined reference to `getcontext'
      my_context.c:(.text+0x15c): undefined reference to `getcontext'
      my_context.c:(.text+0x180): undefined reference to `makecontext'
      my_context.c:(.text+0x1c0): undefined reference to `makecontext'
      ../libmysql/libmysqlclient.a(my_context.c.o): In function `my_context_yield':
      my_context.c:(.text+0x204): undefined reference to `swapcontext'
      my_context.c:(.text+0x218): undefined reference to `swapcontext'
      collect2: error: ld returned 1 exit status*
      

      with glibc it works properly, x86_64 and i386 are also working with musl and glibc

      patching the my_context.h file like this

      @@ -31,8 +31,6 @@
       #define MY_CONTEXT_USE_X86_64_GCC_ASM
       #elif defined(__GNUC__) && __GNUC__ >= 3 && defined(__i386__)
       #define MY_CONTEXT_USE_I386_GCC_ASM
      -#elif defined(HAVE_UCONTEXT_H)
      -#define MY_CONTEXT_USE_UCONTEXT
       #else
       #define MY_CONTEXT_DISABLE
       #endif
      

      is working, what could be the right approach ?

      Attachments

        Activity

          People

            cvicentiu Vicențiu Ciorbaru
            lucize Lucian Cristian
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

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