← Back to team overview

maria-developers team mailing list archive

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

 

Hi

I'm trying to get the latest version of mariadb-galera (10.0.21) into
buildroot. I'm running into two errors which I have a feeling are
related. But I may be wrong.

These problems arise during the build of the host variant of the
package. I get the two following errors (build does not stop at the
first one because they happen in parallel jobs):

1:
Linking CXX shared module ha_connect.so
/home/sylvain/git/br/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libxml2.so:
error adding symbols: File in wrong format

 --> for host variant ha_connect.so should be linked against
/home/sylvain/git/br/output/host/usr/lib/libxml2.so

2:
Linking CXX shared module ha_innodb.so
/usr/bin/ld: cannot find -laio


The thing is, libaio and libxml2 are both present in
/home/sylvain/git/br/output/host/usr/lib/.

The link command present in
storage/connect/CMakeFiles/connect.dir/link.txt
(http://pastebin.com/Qn1ZCw2X) contains:
/home/sylvain/git/br/output/host/usr/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libxml2.so
which is incorrect, should be:
/home/sylvain/git/br/output/host/usr/lib/libxml2.so

The link command present in
storage/innobase/CMakeFiles/innobase.dir/link.txt
(http://pastebin.com/it6W9WVs) does not contain
-L/home/sylvain/git/br/output/host/usr/lib/. I think it should. At
least, when I manually run this command adding
-L/home/sylvain/git/br/output/host/usr/lib, it works.

I'm really not sure how these link.txt are generated. I checked
connect/CMakeLists.txt and innobase/CMakeLists.txt and could not find
anything obvious problem. Beside, toplevel CMakeCache.txt does contain:
CMAKE_EXE_LINKER_FLAGS:STRING=-L/home/sylvain/git/br/output/host/lib
-L/home/sylvain/git/br/output/host/usr/lib
-Wl,-rpath,/home/sylvain/git/br/output/host/usr/lib
which seems correct. I don't know why this setting does not reach
storage/innobase and I'm also not sure why ha_connect.so tries to link
against target variant of libxml2.

It basically comes down to have cmake look for shared libraries in the
right place, but I don't seem to be able to determine which lever to
pull. Any hint as to how to achieve that is therefore welcome.

Cheers,

-- 
Sylvain Raybaud
www.green-communications.fr



Follow ups