← Back to team overview

maria-discuss team mailing list archive

Re: Issues cross-compiling MariaDB for ARM

 

Update:

Apparently, according to
http://uhurumkate.blogspot.com/2014/07/a-newer-kernel-is-required-to-run-this.html,

this is an issue with GCC 4.7 - the version of the cross compiler I'm using.

When I try with GCC 4.6.2, using the same toolchain file, and the same
cmake options and so on (double checked), it fails with:

[  5%] Building C object
storage/myisammrg/CMakeFiles/myisammrg.dir/myrg_range.c.o
In file included from
/home/wmt/Downloads/mariadb-10.3.16/storage/myisammrg/ha_myisammrg.cc:105:0:
/home/wmt/Downloads/mariadb-10.3.16/sql/sql_class.h: In function 'void
update_global_memory_status(int64)':
/home/wmt/Downloads/mariadb-10.3.16/sql/sql_class.h:914:3: error:
'my_atomic_add64' was not declared in this scope
[  5%] Building C object
storage/myisammrg/CMakeFiles/myisammrg.dir/myrg_rfirst.c.o
[  5%] Building C object
storage/myisammrg/CMakeFiles/myisammrg.dir/myrg_rkey.c.o
[  5%] Building C object
storage/myisammrg/CMakeFiles/myisammrg.dir/myrg_rlast.c.o
[  5%] Building C object pcre/CMakeFiles/pcre.dir/pcre_tables.c.o
make[2]: ***
[storage/myisammrg/CMakeFiles/myisammrg.dir/ha_myisammrg.cc.o] Error 1
make[1]: *** [storage/myisammrg/CMakeFiles/myisammrg.dir/all] Error 2
[  5%] Building C object strings/CMakeFiles/strings.dir/ctype-win1250ch.c.o
[  5%] Building C object pcre/CMakeFiles/pcre.dir/pcre_ucd.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/ctype.c.o
[  5%] Building C object pcre/CMakeFiles/pcre.dir/pcre_valid_utf8.c.o
[  5%] Building C object pcre/CMakeFiles/pcre.dir/pcre_version.c.o
[  5%] Building C object pcre/CMakeFiles/pcre.dir/pcre_xclass.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/decimal.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/dtoa.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/int2str.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/is_prefix.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/llstr.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/longlong2str.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/my_strtoll10.c.o
[  5%] Building C object strings/CMakeFiles/strings.dir/my_vsnprintf.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/str2int.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strcend.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strend.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strfill.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strmake.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strmov.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strnmov.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strxmov.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strxnmov.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/xml.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strmov_overlapp.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/my_strchr.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strcont.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/strappend.c.o
[  6%] Building C object strings/CMakeFiles/strings.dir/json_lib.c.o
Linking C static library libstrings.a
[  6%] Built target strings
Linking C static library libpcre.a
[  6%] Built target pcre
make: *** [all] Error 2

I'm kind of at a loss with this now. Any more ideas from anyone?

Hamish

On 01/07/2019 12:21, Hamish MB wrote:
> Okay, so after some more toil, I've managed to get it to compile.
>
> However, when I run mysqld, I get the error "A newer kernel is required
> to run this binary."
>
> My cross compiler compiles for Linux 2.6.27, and the target kernel is
> 2.6.31.8 - ancient I know, but I can't upgrade it.
>
> If I run "file" on mysqld, I get the following:
> ./nas-sysroot/usr/local/mysql/bin/mysqld: ELF 32-bit LSB  shared object,
> ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for
> GNU/Linux 2.6.27, not stripped
>
> This all seems fine, so has anyone got any ideas why this is happening?
>
> Hamish
>
>
> On 28/06/2019 17:50, Hamish MB wrote:
>> I didn't realise, I assumed it was essential. Oops, sorry! I'll give
>> that a go now.
>>
>> Hamish
>>
>> On 28/06/2019 17:17, Marko Mäkelä wrote:
>>> Hamish,
>>>
>>> The error comes from the Connect storage engine, which is a virtual
>>> storage engine that connects to other servers. If you do not need
>>> that, you can disable it. Similar storage engines are Federated,
>>> FederatedX, Spider.
>>>
>>> cmake -DPLUGIN_CONNECT=NO
>>>
>>> (which was part of my initial reply).
>>>
>>> Best regards,
>>> Marko
>> _______________________________________________
>> Mailing list: https://launchpad.net/~maria-discuss
>> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~maria-discuss
>> More help   : https://help.launchpad.net/ListHelp
> _______________________________________________
> Mailing list: https://launchpad.net/~maria-discuss
> Post to     : maria-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~maria-discuss
> More help   : https://help.launchpad.net/ListHelp

References