Dear Sergei,

I am sorry that I meet another cross compile issue about this,

Linking CXX shared module ha_archive.so
[ 72%] Built target archive
Scanning dependencies of target tokuportability_static_conv
[ 72%] Building CXX object 
storage/tokudb/ft-index/portability/CMakeFiles/tokuportability_static_conv.dir/huge_page_detection.c
c.o
In file included from 
/home/johnson/SanSoft/model/Phoenix_130313-0831/build/sysroot/usr/include/features.h:378:0,
                 from 
/home/johnson/SanSoft/model/Phoenix_130313-0831/build/sysroot/usr/include/sys/mman.h:22,
                 from 
/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/storage/tokudb/ft-index/portab
ility/huge_page_detection.cc:91:
/home/johnson/SanSoft/model/Phoenix_130313-0831/build/sysroot/usr/include/sys/cdefs.h:286:63:
 error: ‘int stat(const char*, s
tat*)’ hides constructor for ‘struct stat’ [-Werror=shadow]
 # define __nonnull(params) __attribute__ ((__nonnull__ params))
                                                               ^
/home/johnson/SanSoft/model/Phoenix_130313-0831/build/sysroot/usr/include/sys/stat.h:219:6:
 note: in expansion of macro ‘__no
nnull’
      __nonnull ((1, 2));
      ^
/home/johnson/SanSoft/model/Phoenix_130313-0831/build/sysroot/usr/include/sys/cdefs.h:286:63:
 error: ‘int stat64(const char*,
 stat64*)’ hides constructor for ‘struct stat64’ [-Werror=shadow]
 # define __nonnull(params) __attribute__ ((__nonnull__ params))
                                                               ^
/home/johnson/SanSoft/model/Phoenix_130313-0831/build/sysroot/usr/include/sys/stat.h:229:47:
 note: in expansion of macro ‘__n
onnull’
      struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2));
                                               ^
cc1plus: all warnings being treated as errors


I am not sure which library I miss. Could you give me some suggestions?


Best Regards,
Johnson

-----Original Message-----
From: Johnson Cheng 
Sent: Friday, August 28, 2015 7:43 PM
To: 'Sergei Golubchik'
Cc: [email protected]
Subject: RE: [Maria-discuss] Cross compile issue

Dear Sergei,

You are right. My pcre version of cross compile is 8.30. Now I upgrade it to 
8.37.
Then I meet the another issue about strerror prototype define because it's 
different with my Linux 3.1.4.27.
  [ 62%] Building CXX object 
storage/connect/CMakeFiles/connect.dir/filamvct.cpp.o
  
/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/storage/connect/filamvct.cpp:70:23:
 error: declaration of ‘char* strerror(int)’ has a different exception 
specifier
     char *strerror(int num);
                       ^
  In file included from 
/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/storage/connect/global.h:9:0,
                 from 
/home/johnson/SanSoft/model/Phoenix_130313/Package/mariadb/mariadb-10.0.21/storage/connect/filamvct.cpp:51:
  
/home/johnson/SanSoft/model/Phoenix_130313/build/sysroot/usr/include/string.h:413:14:
 error: from previous declaration ‘char* strerror(int) throw ()’
   extern char *strerror (int __errnum) __THROW;
              ^
  make[2]: *** [storage/connect/CMakeFiles/connect.dir/filamvct.cpp.o] Error 1
  make[1]: *** [storage/connect/CMakeFiles/connect.dir/all] Error 2
  make: *** [all] Error 2

My solution is commend out strerror define in storage/connect/filamvct.cpp and 
storage/connect/tabvct.cpp files.
  #if defined(UNIX)
  // Add dummy strerror  (NGC)
  //char *strerror(int num);
  #endif   // UNIX

Is it right? Or have better solution?


Best Regards,
Johnson

-----Original Message-----
From: Sergei Golubchik [mailto:[email protected]]
Sent: Friday, August 28, 2015 4:48 PM
To: Johnson Cheng
Cc: [email protected]
Subject: Re: [Maria-discuss] 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
_______________________________________________
Mailing list: https://launchpad.net/~maria-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~maria-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to