Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1106

Build failures with --enable-tests on 64 bit linux with GCC

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.4.0
    • tests
    • None
    • CentOS 4.6 64 bit, gcc 3.4.6

    Description

      There's a problem compiling some of the test modules on 64 bit linux with GCC when configured with --enable-tests.

      In all cases the problems are because some function declarations are not visible in the test module so the functions are implicitly declared as returning "int". This value os then cast to a pointer so generates a warning about "cast to pointer from integer of different size". Because the configuration script adds "-Werror" to CFLAGS if compiling with GCC this is counted as an error.

      The problem modules are all in util:
      util/test/utils/utils_test.c
      util/test/string_util/string_util_test.c
      util/test/properties/property_test.c

      The problems utils_test.c and string_util_test.c are easily solved by "#include"ing the appropriate header.

      The problem with property_test.c is not as simple as the offending function (axutil_properties_read) does not appear in a header file. In this case it's probably safest to just declare it in property_test.c (as I see it it can't just be added to util/include/axutil_properties.h as it would need to be marked AXIS2_EXTERN which would change the ABI of the axutil DSO).

      The attached patch fixes the problem.

      Cheers,
      Steve Nairn

      Attachments

        1. axis2c.patch
          3 kB
          Steve Nairn

        Activity

          People

            xydinesh Dinesh Weerapurage
            steve.nairn Steve Nairn
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: