← Back to team overview

maria-discuss team mailing list archive

Re: Cross compile issue

 

Dear Sergei,

Thanks for your reply.
I am not sure what it happened because it is disappeared when I re-cross-compile mariaDB at another new environment.
Actually I am dig out a problem about DB_TXN error message as below,
  [ 80%] Building CXX object storage/tokudb/CMakeFiles/tokudb.dir/ha_tokudb.cc.o
  In file included from /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/ha_tokudb.cc:122:0:
  /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/hatoku_defines.h: In function int txn_begin(DB_ENV*, DB_TXN*, DB_TXN**, uint32_t, THD*):
  /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/hatoku_defines.h:407:19: error: DB_TXN has no member named ‘set_client_id
         this_txn->set_client_id(this_txn, thd_get_thread_id(thd));
                   ^
  In file included from /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/ha_tokudb.cc:139:0:
  /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/tokudb_status.h: In function int tokudb::remove_metadata(DB*, void*, uint, DB_TXN*):
  /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/tokudb_status.h:159:58: error: DB_DELETE_ANY was not declared in this scope
         int error = status_db->del(status_db, txn, &key, DB_DELETE_ANY);
                                                          ^
  /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/tokudb_status.h: In function int tokudb::open_status(DB_ENV*, DB**, const char*, DB_TXN*):
  /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/tokudb_status.h:212:36: error: DB has no member named change_pagesize
                 error = status_db->change_pagesize(status_db, status_dict_pagesize);
                                    ^
  .........
  /home/johnson/SanSoft/model/Phoenix_130313-0901/Package/maria/mariadb-10.0.21/storage/tokudb/tokudb_card.h:265:62: error: TOKUDB_INTERRUPTED was not declared in this scope
                         if (error == DB_NOTFOUND || error == TOKUDB_INTERRUPTED)
                                                              ^

Fortunately, I find out the root cause because I have installed BerkeleyDB at first.
It seems mariaDB and BerkeleyDB can't co-exist.
Now I can cross compile mariaDB every time, and I am doing the final fine tune.


Best Regards,
Johnson

-----Original Message-----
From: Sergei Golubchik [mailto:serg@xxxxxxxxxxx] 
Sent: Wednesday, September 02, 2015 10:14 PM
To: Johnson Cheng
Cc: maria-discuss@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Maria-discuss] 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/incl
> ude/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/incl
> ude/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