Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-4941

make: AIX fails with 'Identifier not allowed in cast'; syntax error in include/my_global.h

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Incomplete
    • Affects Version/s: 5.5.33a-galera
    • Fix Version/s: N/A
    • Component/s: OTHER
    • Labels:
      None
    • Environment:
      AIX 5.3 TL07 (5300-07-01-0748) - old to be more backwards compatible;
      IBM XL C/C++ for AIX, V11.1 (5724-X13)
      Version: 11.01.0000.0013

      Description

      after successful cmake, make fails at about 5%.
      As the block with the error is/was made for AIX, perhaps it was developed for gcc rather than vacpp/vac.

      tail of make output:

      [  5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/compat.c.o
      [  5%] Building C object cmd-line-utils/readline/CMakeFiles/readline.dir/savestring.c.o
      Linking C static library libreadline.a
      Target "cmd-line-utils/readline/CMakeFiles/readline.dir/build" is up to date.
      [  5%] Built target readline
      Scanning dependencies of target mytap
      [  5%] Building C object unittest/mytap/CMakeFiles/mytap.dir/tap.c.o
      "/data/prj/mariadb/mariadb-5.5.31/include/my_global.h", line 300.74: 1506-272 (E) Identifier not allowed in cast or sizeof declarations.
      "/data/prj/mariadb/mariadb-5.5.31/include/my_global.h", line 300.76: 1506-046 (S) Syntax error.
      "/data/prj/mariadb/mariadb-5.5.31/unittest/mytap/tap.c", line 352.49: 1506-234 (W) Expecting a new-line character on #ifdef directive.
      make: 1254-004 The error code from the last command is 1.
      
      
      Stop.
      make: 1254-004 The error code from the last command is 2.
      
      
      Stop.
      make: 1254-004 The error code from the last command is 2.
      
      
      Stop.
      

      ===
      FYI: from include/my_global.h

       +292  /* Go around some bugs in different OS and compilers */
        +293  #ifdef _AIX                     /* By soren@t.dk */
        +294  #define _H_STRINGS
        +295  #define _SYS_STREAM_H
        +296  /* #define _AIX32_CURSES */     /* XXX: this breaks AIX 4.3.3 (others?). */
        +297  #define ulonglong2double(A) my_ulonglong2double(A)
        +298  #define my_off_t2double(A)  my_ulonglong2double(A)
        +299  C_MODE_START
        +300  inline double my_ulonglong2double(unsigned long long A) { return (double A); }
        +301  C_MODE_END
        +302  #endif /* _AIX */
        +303
        +304  #ifdef UNDEF_HAVE_INITGROUPS                    /* For AIX 4.3 */
        +305  #undef HAVE_INITGROUPS
        +306  #endif
        +307
        +308  /* gcc/egcs issues */
        +309
        +310  #if defined(__GNUC) && defined(__EXCEPTIONS)
        +311  #error "Please add -fno-exceptions to CXXFLAGS and reconfigure/recompile"
        +312  #endif
      

      ===
      No idea how to proceed here - will test suggestions!

        Gliffy Diagrams

          Attachments

          1. aix_make_mariadb-5.5.33a.script
            144 kB
          2. aix_make_with_ignore_mariadb-5.5.33a.script
            105 kB
          3. aix.storage_myisam.diff
            0.6 kB
          4. aix.storage_xtradb.diff
            54 kB
          5. alloca.h
            1 kB
          6. alloca.h
            1 kB
          7. mariadb_aix.patch
            2 kB
          8. nohup.out
            506 kB
          9. nohup.out
            506 kB
          10. nohup.out.bz2
            31 kB

            Activity

            Hide
            MichaelFelt Michael Felt added a comment -

            diff -u outputs to convert C++, c99 style comments, i.e. //
            to c89 comments /* .... */

            Show
            MichaelFelt Michael Felt added a comment - diff -u outputs to convert C++, c99 style comments, i.e. // to c89 comments /* .... */
            Hide
            MichaelFelt Michael Felt added a comment -

            Downloaded mariadb-5.5.33a.tar.gz
            unpacked
            cmake . -DWITH_JEMALLOC=no

            applied Franks "mariadb_aix.patch"
            made lots of // comment corrections in storage - see two diff files attached.

            And come up, again, with ld errors.

            ld: 0711-224 WARNING: Duplicate symbol: mutex_list
            ld: 0711-224 WARNING: Duplicate symbol: concurrency
            ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
            ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
            ld: 0711-317 ERROR: Undefined symbol: .unpack_row(const Relay_log_info*,TABLE*,const unsigned int,const unsigned char* const,const unsigned char*,const st_bitmap*,const unsigned char** const,unsigned long* const)
            make[2]: *** [unittest/mysys/explain_filename-t] Error 8
            make[1]: *** [unittest/mysys/CMakeFiles/explain_filename-t.dir/all] Error 2
            make: *** [all] Error 2

            Also, lots of warning messages from the IBM compiler that are repeated many many times, will upload a scripted session with the messages - soon.

            Michael

            Show
            MichaelFelt Michael Felt added a comment - Downloaded mariadb-5.5.33a.tar.gz unpacked cmake . -DWITH_JEMALLOC=no applied Franks "mariadb_aix.patch" made lots of // comment corrections in storage - see two diff files attached. And come up, again, with ld errors. ld: 0711-224 WARNING: Duplicate symbol: mutex_list ld: 0711-224 WARNING: Duplicate symbol: concurrency ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. ld: 0711-317 ERROR: Undefined symbol: .unpack_row(const Relay_log_info*,TABLE*,const unsigned int,const unsigned char* const,const unsigned char*,const st_bitmap*,const unsigned char** const,unsigned long* const) make [2] : *** [unittest/mysys/explain_filename-t] Error 8 make [1] : *** [unittest/mysys/CMakeFiles/explain_filename-t.dir/all] Error 2 make: *** [all] Error 2 Also, lots of warning messages from the IBM compiler that are repeated many many times, will upload a scripted session with the messages - soon. Michael
            Hide
            MichaelFelt Michael Felt added a comment -

            script files: first one is as far as make gets without stopping: second one - continue from there with ignore flag (i.e., make -i)
            also attached: AIX 5.3 /usr/include/alloca.h file as there is a frequent warning for line 34 re: an undefined pragma - consider this FYI

            Hope this helps.

            a lot of "failures" will be resolved one the duplicate symbol issue for:
            ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env
            is addressed.

            regards,
            Michael F

            Show
            MichaelFelt Michael Felt added a comment - script files: first one is as far as make gets without stopping: second one - continue from there with ignore flag (i.e., make -i) also attached: AIX 5.3 /usr/include/alloca.h file as there is a frequent warning for line 34 re: an undefined pragma - consider this FYI Hope this helps. a lot of "failures" will be resolved one the duplicate symbol issue for: ld: 0711-224 WARNING: Duplicate symbol: __fe_def_env is addressed. regards, Michael F
            Hide
            elenst Elena Stepanova added a comment -

            I see the last comment came with a bunch of attachments, which we probably didn't realize back then.
            Is this issue still relevant at all?
            If it is, are these diffs and other attachments make a complete patch which solves all compilation problems on AIX?
            If they are, can anyone of the participants put them together in a single patch which applies to recent MariaDB tree, so Sergei could apply it?

            Show
            elenst Elena Stepanova added a comment - I see the last comment came with a bunch of attachments, which we probably didn't realize back then. Is this issue still relevant at all? If it is, are these diffs and other attachments make a complete patch which solves all compilation problems on AIX? If they are, can anyone of the participants put them together in a single patch which applies to recent MariaDB tree, so Sergei could apply it?
            Hide
            elenst Elena Stepanova added a comment -

            Closing as Incomplete for now, please comment to re-open if necessary.

            Show
            elenst Elena Stepanova added a comment - Closing as Incomplete for now, please comment to re-open if necessary.

              People

              • Assignee:
                Unassigned
                Reporter:
                MichaelFelt Michael Felt
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: