[MDEV-8721] AIX: Compile error xtradb:log0log.cc Created: 2015-09-01  Updated: 2015-12-15  Resolved: 2015-12-15

Status: Closed
Project: MariaDB Server
Component/s: Compiling
Affects Version/s: 10.0.21
Fix Version/s: 10.0.23

Type: Bug Priority: Critical
Reporter: Chris Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None
Environment:

AIX 6.1
XLC 13.0.1 Compiler
cmake 3.3.1


Issue Links:
Duplicate
is duplicated by MDEV-8516 AIX xtradb -> log -> log0log.cc.o Closed
Sprint: 10.0.23

 Description   

"/usr/include/alloca.h", line 34.9: 1540-1401 (I) An unknown "pragma __alloca" is specified.
[ 43%] Building CXX object storage/xtradb/CMakeFiles/xtradb.dir/log/log0log.cc.o
"/usr/local/src/mariadb-10.0.21/storage/xtradb/log/log0log.cc", line 259.53: 1540-0216 (S) An expression of type "char *" cannot be converted to type "unsigned char *".
storage/xtradb/CMakeFiles/xtradb.dir/build.make:1262: recipe for target 'storage/xtradb/CMakeFiles/xtradb.dir/log/log0log.cc.o' failed
gmake[2]: *** [storage/xtradb/CMakeFiles/xtradb.dir/log/log0log.cc.o] Error 1
CMakeFiles/Makefile2:5184: recipe for target 'storage/xtradb/CMakeFiles/xtradb.dir/all' failed
gmake[1]: *** [storage/xtradb/CMakeFiles/xtradb.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
gmake: *** [all] Error 2

used CFLAGS/LDFLAGS/cmake options

export CFLAGS="-q64 -qsmp -qmaxmem=-1 -qlanglvl=extended:extc89:extc99 -DNDEBUG -DSYSV -D_AIX -D_AIX64 -D_AIX41 -D_AIX43 -D_AIX51 -D_AIX52 -D_AIX53 -D_AIX61 -D_AIX71 -D_ALL_SOURCE -DFUNCPROTO=15 -O2 \
-I$APPATH/include -I/opt/freeware/include -L$APPATH/lib -L/opt/freeware/lib64 -L/opt/freeware/lib -bmaxdata:0x80000000 -b64 -blibpath:$APPATH/lib:/usr/lib:/lib -bnoipath -bexpall -lxlsmp"
export CXX="xlC_r"
export CXXFLAGS=$CFLAGS
export LDFLAGS="-L$APPATH/lib -L/opt/freeware/lib64 -L/opt/freeware/lib \
-Wl,-blibpath:$APPATH/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000 -Wl,-b64 -Wl,-bexpall -Wl,-bnoipath -Wl,-lxlsmp"
 
cmake . -DCMAKE_INSTALL_PREFIX=$APPATH -DCMAKE_C_FLAGS="$CFLAGS" -DCMAKE_CXX_FLAGS="$CFLAGS" -DCMAKE_EXE_LINKER_FLAGS="$LDFLAGS" -DCMAKE_SHARED_LINKER_FLAGS="$LDFLAGS"
 
 



 Comments   
Comment by Elena Stepanova [ 2015-09-01 ]

bar, you fixed AIX compilation failures some time ago, maybe you could give it another run.

Comment by Chris [ 2015-09-02 ]

changed static_cast to reinterpret_cast in log0log.cc, which seems obvious. the world is not gcc only, and a real compiler will not accept this gnuisms.

log_buffer_extend(
        ulint   len)
{
        ulint   move_start;
        ulint   move_end;
        byte*   tmp_buf = reinterpret_cast<byte *>(alloca(OS_FILE_LOG_BLOCK_SIZE));
 
        mutex_enter(&(log_sys->mutex));
 
        while (log_sys->is_extending) {
                /* Another thread is trying to extend already.
                Needs to wait for. */
                mutex_exit(&(log_sys->mutex));
 
                log_buffer_flush_to_disk();
 
                mutex_enter(&(log_sys->mutex));
 
                if (srv_log_buffer_size > len / UNIV_PAGE_SIZE) {
                        /* Already extended enough by the others */
                        mutex_exit(&(log_sys->mutex));
                        return;
                }
 

Comment by Chris [ 2015-09-02 ]

there is also one in log0recv.cc at line 3101.24

Generated at Thu Feb 08 07:29:17 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.