maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #02900
Re: Cross compile issue
Hi, Johnson!
On Aug 28, Johnson Cheng wrote:
> Dear Sergei,
>
> My tool chain support atomic oops, but HAVE_IB_GCC_ATOMIC_BUILTINS will not set because I use cross-compiling. (from storage/xtradb/CMakeLists.txt rule)
> Yes. I use "-DHAVE_IB_GCC_ATOMIC_BUILTINS=1" instead of "-DXTRADB_OK=1" to work around this issue because my tool chain really support atomic opps.
> As you said, I will meet the cross compile issue. It failed at the below message,
> [ 47%] Building CXX object sql/CMakeFiles/sql.dir/mysqld.cc.o
> cd /home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql && /home/johnson/x86_64_TCglibc-2.19-3/usr/bin/x86_64-buildroot-linux-gnu-g++ -DHAVE_CONFIG_H -DHAVE_EVENT_SCHEDULER -DHAVE_OPENSSL -DHAVE_POOL_OF_THREADS -DMYSQL_SERVER -I/home/johnson/SanSoft/model/Phoenix_130313/build/sysroot/usr/include -I/home/johnson/SanSoft/model/Phoenix_130313/build/sysroot/include -fno-exceptions -fno-rtti -O2 -g -DNDEBUG -DDBUG_OFF -I/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/include -I/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql -I/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/pcre -I/home/johnson/SanSoft/model/Phoenix_130313/build/sysroot/usr/include -o CMakeFiles/sql.dir/mysqld.cc.o -c /home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql/mysqld.cc
> /home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql/mysqld.cc: In function ‘void init_pcre()’:
> /home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/sql/mysqld.cc:3585:3: error: ‘pcre_stack_guard’ was not declared in this scope
> pcre_stack_guard= check_enough_stack_size_slow;
> ^
> make[2]: *** [sql/CMakeFiles/sql.dir/mysqld.cc.o] Error 1
>
> Could you give me some advice?
pcre_stack_guard was our addition to pcre to fix stack overflow issues.
we have pcre in the source tree and it was patched to have
pcre_stack_guard. We've also submitted the patch upstream and it got
into pcre-8.34 (iirc). So our CMakeLists.txt tests whether
pcre_stack_guard is present in the system pcre and if not - uses bundled
pcre.
I suspect that your native system pcre is 8.34 or later and your
cross-compilation pcre is older, so cmake thought that it can use system
pcre and later that failed. You can fix it either by upgrading your
cross-compilation pcre or by forcing bundled pcre.
Regards,
Sergei
Follow ups
References