← 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 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/CMakeLists
.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

> 
> Regards, Sergei
> 

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

iQIcBAEBAgAGBQJWHp6ZAAoJEEkkwl4JtJ9yo1UQAIQOZOTi+vZWTlxUJlVZi26g
hguTyPrrFutsFjqyKkcxBXJf5jbkVVXhNovGIi0f1ldHZcOkBidx5BJIewJueRy6
36v2ZnLZwyOvEvpvv1ZrrmdG1LsJMKAE6V2PcTJ+W16bSNlIBFUPLivl6wzgbwWp
uJFxYWCfWJmRuQ7YlY4bpbu1D3N0NIGcWXzFWHeviORht7KvKyd3REKNefSWLVEH
0WAp2ZVipBu2gg2Af/Aifc1piA9ADGSmdDz6mmh2D76oe364ugqYwvrKgSh8IoIQ
hwBXYlPnFwPqXkHYtP/xkNDNAi9PHXjbUe1zX5hz/wld2V4FuTCatET144s6suWE
/04IDBEny4YBZatpoh2AlCfjJPpwqp3QB5BdgOBvrIHONWeRDzWvfvt6EovM7SsE
QSjZ3/MM3ScpbR4cfRBrYUjyHgW0or9AXGZYHJbhJpGtcX//he2Nc07vTGLwDu7I
b+33+IX5VNzVJjO3WF2VSJGxhZfqjht9F2Ziu0r4tz/W0JaN7tfW1QeZhoFszqaZ
I91W9l4Ugk01+XMelpI3l5nQiicc+NMY3K/ondH0po1NCiHQi52v9vLNdWeVRL6F
6GHBxbzf9AhrYPhYQL5gqNdqxxoqg4RP881wBZToN/8rW/T4MB5kg1glzDQQ5HgV
BlfrxgC1TsJG2JLanZSH
=sfiv
-----END PGP SIGNATURE-----


Follow ups

References