← Back to team overview

maria-developers team mailing list archive

Re: crosscompiling in buildroot: cannot find -laio and other link error

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On 14/10/15 20:27, Sylvain Raybaud wrote:
> On 02/10/2015 18:28, Sergei Golubchik wrote:
> 
>> On Oct 02, Sylvain Raybaud wrote:
>>> 1. I disabled building xtradb. I also had to patch 
>>> storage/xtradb/CMakeLists.txt (patch attached) otherwise 
>>> XTRADB_OK=0 would abort the build even if the module is not 
>>> requested.
> 
>> good point. it's a bug.
> 
>> https://mariadb.atlassian.net/browse/MDEV-8883
> 
>>> 2. I patched storage/innobase/CMakeLists.txt (also attached)
>>> in order to use CHECK_C_SOURCE_COMPILES instead of 
>>> CHECK_C_SOURCE_RUNS, which fails when cross compiling.
> 
>> I'm not sure we can do that, some of those checks were 
>> CHECK_C_SOURCE_COMPILES before and later changed to 
>> CHECK_C_SOURCE_RUNS because compiling was not enough (in some 
>> corner cases).
> 
>> I think doing CHECK_C_SOURCE_COMPILES in cross-compiling case and
>>  CHECK_C_SOURCE_RUNS otherwise could be a reasonable compromise.
> 
>>> I'd be happy to have your opinion on these patches.
>>> 
>>> However, I'm currently investigating whether or not the value
>>> of HAVE_IB_GCC_ATOMIC_BUILTINS could be guessed from that of 
>>> BR2_ARCH_HAS_ATOMICS.
> 
>> Please tell me whether it'll work (or add a comment directly to 
>> MDEV-8883)
> 
> Hi
> 
> It seems BR2_ARCH_HAS_ATOMICS cannot be used, because for example
> on 32bits architectures some atomic operations may not be available
> even though BR2_ARCH_HAS_ATOMICS is set to true. Therefore your
> solution should be used.
> 
> However I just realised that CHECK_C_SOURCE_RUNS should never be 
> invoked by this script in buildroot because it's enclosed in
> 
> IF(NOT CMAKE_CROSSCOMPILING) [...] ENDIF
> 
> (https://github.com/MariaDB/server/blob/10.1/storage/innobase/CMakeLis
ts
>
> 
.txt,
> line #75).
> 
> Is -DCMAKE_CROSSCOMPILING supposed to passed when invoking cmake or
> is it supposed to be determined automatically?
> 
> (I'm also posting this on the bugtracker. Not sure what the good 
> procedure is)
> 
> Cheers,
> 
> Sylvain

Hi

If I disable these tests by explicitely passing -DCMAKE_CROSSCOMPILING
then the build fails with:

[ 66%]
/home/sylvain/git/br/output/build/mariadb-galera-10.0.21/storage/innobas
e/srv/srv0conc.cc:
In function ‘void srv_conc_enter_innodb_without_atomics(trx_t*)’:
/home/sylvain/git/br/output/build/mariadb-galera-10.0.21/storage/innobas
e/srv/srv0conc.cc:425:45:
error: ‘wsrep_thd_is_brute_force’ was not declared in this scope
      wsrep_thd_is_brute_force(trx->mysql_thd)) {
                                             ^

I've not yet investigated this.

Regards,

Sylvain

- -- 
Sylvain Raybaud
www.green-communications.fr
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJWIOwoAAoJEEkkwl4JtJ9yR1MP/2wN7P6aOUKbw2NGxy8eeUrX
Lse/KvoL9iqikc21hIl59w+E89yjGqlZ6nS6vZ35Qods7Q52JT1fLwJA2C8UwOGw
32rYUNKjW4nFV4q7RpqJEdVOGoj28UEJKno6RiJ0oju6mIlqrlyjFN1pzOPaJ3Lu
XelZeyxb6VwMDqAvWk/HE+NdB9oWsrgGtihIb9QrOEXUatba3NyMi+lXusedYe5P
Bj5ABFm2Dro2thJuvGcFwyAEQ3+vElkTQovH64xt/jGBtltXmIcnK6pNlpdQW2X+
0DCGH6Uz/Oda9CJO7CjxXxFvkn0wORfMmnprxBu4N+BErsF6kTA6fnlvPeNpynaW
6o9YiMJLNYxqzXWVQu+MGOmtSgN3c2qZgan52COYbBTyFoNW42Y78RKtfBHSo6dy
YfdlvQNY2832Do7mPBvbptMuT1WbPgv32CGS7GLI8S1SjUb85IxKmLNevSe9GdSr
fiLMVITsqSA7HCWy9dQxKKNUHpqEro1yxKVX88syjIFK9C639j8DGDu9ElLCc8Lg
EQwDXA9Qxo+tsgMb5QEmh18zUDayC8eABVVlJXvBXi8fwfdYhkkGoAdBCtnG737v
bIokLeMZlMPwzyL7nDSoqSxJv40BKpmc/kz00CSZxZ7tuEnRkvACOuKcc4lh/ERv
91o4A8+uFyHt9aI/uEyK
=Xpjt
-----END PGP SIGNATURE-----


References