← Back to team overview

maria-discuss team mailing list archive

Re: Cross compile issue

 

Dear Sergei,

Thanks for your reply.
I am sorry that I can NOT find any document about cross compile from knowledge base.
https://mariadb.com/kb/en/mariadb/getting-installing-and-upgrading-mariadb/

My host machine is Debian5. (gcc version is 4.3.2)
My target machine is Intel x86_64 with gcc version is 4.8.3
My Cmake version is 3.2.2 on host machine
Here is my cmake command to configure mariadb-10.0.21 for cross compile,
  PATH=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/:/bin:/sbin:/usr/bin:/usr/sbin AR=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-ar AS=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-as   LD=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-ld NM=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-nm CC=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-gcc GCC=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-gcc CXX=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-g++ RANLIB=/home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-ranlib \
  CFLAGS="-I/home/johnson/ cross_prj /sysroot/usr/include -I/home/johnson/ cross_prj /sysroot/include" \
  CXXFLAGS="-I/home/johnson/ cross_prj /:sysroot/usr/include -I/home/johnson/ cross_prj /sysroot/include" \
  LDFLAGS="-L/home/johnson/cross_prj/sysroot/lib -L/home/johnson/ cross_prj /sysroot/usr/lib -lm -lz -ldl -lcrypt -pthread" \
  CXXLDFLAGS="-L/home/johnson/ cross_prj /sysroot/lib -L/home/johnson/ cross_prj /sysroot/usr/lib -lm -lz -ldl -lcrypt -pthread" \
  ../../cmake/HOST-cmake/bin/cmake .

Unfortunately I meet the below error while typing "make VERBOSE=1",
[ 15%] Generating ../include/mysqld_error.h.tmp
cd /home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/extra && ./comp_err --charset=/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql/share/charsets --out-dir=/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql/share/ --header_file=/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/include/mysqld_error.h.tmp --name_file=/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/include/mysqld_ername.h.tmp --state_file=/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/include/sql_state.h.tmp --in_file=/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql/share/errmsg-utf8.txt
./comp_err: /lib/libc.so.6: version `GLIBC_2.14' not found (required by ./comp_err)
./comp_err: /lib/libc.so.6: version `GLIBC_2.17' not found (required by ./comp_err)
make[2]: *** [include/mysqld_error.h.tmp] Error 1

It tries to use my cross compiled extra/comp_err utility to do something at my host machine.
Could you give me some advice to fix this issue?

Best Regards,
Johnson

-----Original Message-----
From: Sergei Golubchik [mailto:serg@xxxxxxxxxxx] 
Sent: Wednesday, August 26, 2015 12:39 AM
To: Johnson Cheng
Cc: maria-discuss@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Maria-discuss] Cross compile issue

Hi, Johnson!

On Aug 25, Johnson Cheng wrote:
> Hi,
> 
> I have problem to do cross compile on mariadb-10.0.21.
> Where can I find the relative document?

Check the knowledgebase and if there's nothing there, then mailing list archives. I'm not sure about knowledgebase, but this topic was certainly discussed on the mailing list.

What is the problem that you have?

Regards,
Sergei


Follow ups

References