Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 10.0.21
    • Fix Version/s: 10.0
    • Component/s: Compiling
    • Labels:
      None
    • Environment:
      AIX 6.1
      XLC 13.0.1 Compiler
      cmake 3.3.1

      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"
      
      
      

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

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

            Show
            elenst Elena Stepanova added a comment - Alexander Barkov , you fixed AIX compilation failures some time ago, maybe you could give it another run.
            Hide
            johnnyrotten73 Chris added a comment -

            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;
                            }
            
            
            Show
            johnnyrotten73 Chris added a comment - 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 ; }
            Hide
            johnnyrotten73 Chris added a comment -

            there is also one in log0recv.cc at line 3101.24

            Show
            johnnyrotten73 Chris added a comment - there is also one in log0recv.cc at line 3101.24

              People

              • Assignee:
                bar Alexander Barkov
                Reporter:
                johnnyrotten73 Chris
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: