← Back to team overview

maria-discuss team mailing list archive

Re: Cross compile issue

 

Hi, Johnson!

On Sep 01, Johnson Cheng wrote:
> 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.cc.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/portability/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*, stat*)’ 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 ’__nonnull’
>       __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 ’__nonnull’
>       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?

This looks like an issue with your system headers. TokuDB only makes it
fatal by using -Werror. If I were you I'd simply remove -Werror and
let the compilation continue.

Regards,
Sergei


Follow ups

References