Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Analyzing make error output - one problem solved....

Analyzing make error output - one problem solved....

Scheduled Pinned Locked Moved C / C++ / MFC
helplinuxdata-structuresquestion
10 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vaclav_
    wrote on last edited by
    #1

    I could use some assistance deciphering enclosed "make" output. I like to start with "In file included..." The last number is probably source line (?) Does the sequence tells the "hierarchy " of the headers (?) Is there a single source of error - "error: size of array" (?) I am not asking for solution, I just need some guidance to logically analyze the output and correct the error. Thanks Cheers Addendum Does /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT' G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); tells me to look at definition of G_STATIC_ASSERT (?) Do I understand correctly that notes " note:...." being added by make are not necessarily in some relation / sequence and can start debugging from any place?

    jim@jim-desktop:/media/jim/DEV/BLUEZ/BLUEZ_RPI/bluez-5.50$ sudo make
    make --no-print-directory all-am
    CC lib/bluetooth.lo
    CC lib/hci.lo
    CC lib/sdp.lo
    CCLD lib/libbluetooth.la
    CC lib/uuid.lo
    CCLD lib/libbluetooth-internal.la
    arm-linux-gnueabihf-ar: `u' modifier ignored since `D' is the default (see `U')
    CC gdbus/mainloop.lo

    In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
    from /usr/include/glib-2.0/glib/gtypes.h:32,
    from /usr/include/glib-2.0/glib/galloca.h:32,
    from /usr/include/glib-2.0/glib.h:30,
    from gdbus/mainloop.c:28:
    /usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
    /usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
    #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
    ^
    /usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro 'G_PASTE_ARGS'
    #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
    ^
    /usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro 'G_PASTE'
    #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
    ^
    /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT'
    G_STATIC_ASSERT(sizeof (unsigned long long) == si

    CPalliniC L S 4 Replies Last reply
    0
    • V Vaclav_

      I could use some assistance deciphering enclosed "make" output. I like to start with "In file included..." The last number is probably source line (?) Does the sequence tells the "hierarchy " of the headers (?) Is there a single source of error - "error: size of array" (?) I am not asking for solution, I just need some guidance to logically analyze the output and correct the error. Thanks Cheers Addendum Does /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT' G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); tells me to look at definition of G_STATIC_ASSERT (?) Do I understand correctly that notes " note:...." being added by make are not necessarily in some relation / sequence and can start debugging from any place?

      jim@jim-desktop:/media/jim/DEV/BLUEZ/BLUEZ_RPI/bluez-5.50$ sudo make
      make --no-print-directory all-am
      CC lib/bluetooth.lo
      CC lib/hci.lo
      CC lib/sdp.lo
      CCLD lib/libbluetooth.la
      CC lib/uuid.lo
      CCLD lib/libbluetooth-internal.la
      arm-linux-gnueabihf-ar: `u' modifier ignored since `D' is the default (see `U')
      CC gdbus/mainloop.lo

      In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
      from /usr/include/glib-2.0/glib/gtypes.h:32,
      from /usr/include/glib-2.0/glib/galloca.h:32,
      from /usr/include/glib-2.0/glib.h:30,
      from gdbus/mainloop.c:28:
      /usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
      /usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
      #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
      ^
      /usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro 'G_PASTE_ARGS'
      #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
      ^
      /usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro 'G_PASTE'
      #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
      ^
      /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT'
      G_STATIC_ASSERT(sizeof (unsigned long long) == si

      CPalliniC Offline
      CPalliniC Offline
      CPallini
      wrote on last edited by
      #2

      It looks that the size of the unsigned long long provided by the platform you're (cross) compiling for, doesn't comply with the requested one (should be the same of guint64, that is 8 bytes).

      In testa che avete, signor di Ceprano?

      V 2 Replies Last reply
      0
      • CPalliniC CPallini

        It looks that the size of the unsigned long long provided by the platform you're (cross) compiling for, doesn't comply with the requested one (should be the same of guint64, that is 8 bytes).

        V Offline
        V Offline
        Vaclav_
        wrote on last edited by
        #3

        You may be right, I found this definition:

        guint64

        typedef unsigned long guint64;

        An unsigned integer guaranteed to be 64-bits on all platforms. Values of this type can range from 0 to G_MAXUINT64 (= 18,446,744,073,709,551,615).

        To print or scan values of this type, use G_GINT64_MODIFIER and/or G_GUINT64_FORMAT.

        Thanks

        1 Reply Last reply
        0
        • V Vaclav_

          I could use some assistance deciphering enclosed "make" output. I like to start with "In file included..." The last number is probably source line (?) Does the sequence tells the "hierarchy " of the headers (?) Is there a single source of error - "error: size of array" (?) I am not asking for solution, I just need some guidance to logically analyze the output and correct the error. Thanks Cheers Addendum Does /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT' G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); tells me to look at definition of G_STATIC_ASSERT (?) Do I understand correctly that notes " note:...." being added by make are not necessarily in some relation / sequence and can start debugging from any place?

          jim@jim-desktop:/media/jim/DEV/BLUEZ/BLUEZ_RPI/bluez-5.50$ sudo make
          make --no-print-directory all-am
          CC lib/bluetooth.lo
          CC lib/hci.lo
          CC lib/sdp.lo
          CCLD lib/libbluetooth.la
          CC lib/uuid.lo
          CCLD lib/libbluetooth-internal.la
          arm-linux-gnueabihf-ar: `u' modifier ignored since `D' is the default (see `U')
          CC gdbus/mainloop.lo

          In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
          from /usr/include/glib-2.0/glib/gtypes.h:32,
          from /usr/include/glib-2.0/glib/galloca.h:32,
          from /usr/include/glib-2.0/glib.h:30,
          from gdbus/mainloop.c:28:
          /usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
          /usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
          #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
          ^
          /usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro 'G_PASTE_ARGS'
          #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
          ^
          /usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro 'G_PASTE'
          #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
          ^
          /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT'
          G_STATIC_ASSERT(sizeof (unsigned long long) == si

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          You still seem to be floundering about with no real understanding of what is what. The error messages are clearly from the compiler and nothing to do with make. As K5054 said: Re: Using "R CMD INSTALL ..." to install package - Linux Programming Discussion Boards[^].

          1 Reply Last reply
          0
          • CPalliniC CPallini

            It looks that the size of the unsigned long long provided by the platform you're (cross) compiling for, doesn't comply with the requested one (should be the same of guint64, that is 8 bytes).

            V Offline
            V Offline
            Vaclav_
            wrote on last edited by
            #5

            One of the errors refers to line 422 in gtypes header - highlighted. Am I on the right track ? Apparently the type unsigned long long is not "typedef. It also looks line 422 should not be used per comment note.

            #ifndef _GLIB_TEST_OVERFLOW_FALLBACK
            #if __GNUC__ >= 5
            #define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
            #elif __has_builtin(__builtin_uadd_overflow)
            #define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
            #endif
            #endif

            #define g_uint_checked_add(dest, a, b) \
            _GLIB_CHECKED_ADD_U32(dest, a, b)
            #define g_uint_checked_mul(dest, a, b) \
            _GLIB_CHECKED_MUL_U32(dest, a, b)

            #define g_uint64_checked_add(dest, a, b) \
            _GLIB_CHECKED_ADD_U64(dest, a, b)
            #define g_uint64_checked_mul(dest, a, b) \
            _GLIB_CHECKED_MUL_U64(dest, a, b)

            #if GLIB_SIZEOF_SIZE_T == 8
            #define g_size_checked_add(dest, a, b) \
            _GLIB_CHECKED_ADD_U64(dest, a, b)
            #define g_size_checked_mul(dest, a, b) \
            _GLIB_CHECKED_MUL_U64(dest, a, b)
            #else
            #define g_size_checked_add(dest, a, b) \
            _GLIB_CHECKED_ADD_U32(dest, a, b)
            #define g_size_checked_mul(dest, a, b) \
            _GLIB_CHECKED_MUL_U32(dest, a, b)
            #endif

            /* The names of the following inlines are private. Use the macro
            * definitions above.
            */
            #ifdef _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
            static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) {
            return !__builtin_uadd_overflow(a, b, dest); }
            static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) {
            return !__builtin_umul_overflow(a, b, dest); }
            static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) {
            G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));

            return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); }
            static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) {
            return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); }
            #else
            static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) {
            *dest = a + b; return *dest >= a; }
            static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) {
            *dest = a * b; return !a || *dest / a == b; }
            static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) {

            S 1 Reply Last reply
            0
            • V Vaclav_

              I could use some assistance deciphering enclosed "make" output. I like to start with "In file included..." The last number is probably source line (?) Does the sequence tells the "hierarchy " of the headers (?) Is there a single source of error - "error: size of array" (?) I am not asking for solution, I just need some guidance to logically analyze the output and correct the error. Thanks Cheers Addendum Does /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT' G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); tells me to look at definition of G_STATIC_ASSERT (?) Do I understand correctly that notes " note:...." being added by make are not necessarily in some relation / sequence and can start debugging from any place?

              jim@jim-desktop:/media/jim/DEV/BLUEZ/BLUEZ_RPI/bluez-5.50$ sudo make
              make --no-print-directory all-am
              CC lib/bluetooth.lo
              CC lib/hci.lo
              CC lib/sdp.lo
              CCLD lib/libbluetooth.la
              CC lib/uuid.lo
              CCLD lib/libbluetooth-internal.la
              arm-linux-gnueabihf-ar: `u' modifier ignored since `D' is the default (see `U')
              CC gdbus/mainloop.lo

              In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
              from /usr/include/glib-2.0/glib/gtypes.h:32,
              from /usr/include/glib-2.0/glib/galloca.h:32,
              from /usr/include/glib-2.0/glib.h:30,
              from gdbus/mainloop.c:28:
              /usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
              /usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
              #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
              ^
              /usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro 'G_PASTE_ARGS'
              #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
              ^
              /usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro 'G_PASTE'
              #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
              ^
              /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT'
              G_STATIC_ASSERT(sizeof (unsigned long long) == si

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));

              The assert is telling you that the defined sizes of the guint64 and unsigned long long types are not the same, so the code cannot be built for the target that you are trying.

              1 Reply Last reply
              0
              • V Vaclav_

                I could use some assistance deciphering enclosed "make" output. I like to start with "In file included..." The last number is probably source line (?) Does the sequence tells the "hierarchy " of the headers (?) Is there a single source of error - "error: size of array" (?) I am not asking for solution, I just need some guidance to logically analyze the output and correct the error. Thanks Cheers Addendum Does /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT' G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); tells me to look at definition of G_STATIC_ASSERT (?) Do I understand correctly that notes " note:...." being added by make are not necessarily in some relation / sequence and can start debugging from any place?

                jim@jim-desktop:/media/jim/DEV/BLUEZ/BLUEZ_RPI/bluez-5.50$ sudo make
                make --no-print-directory all-am
                CC lib/bluetooth.lo
                CC lib/hci.lo
                CC lib/sdp.lo
                CCLD lib/libbluetooth.la
                CC lib/uuid.lo
                CCLD lib/libbluetooth-internal.la
                arm-linux-gnueabihf-ar: `u' modifier ignored since `D' is the default (see `U')
                CC gdbus/mainloop.lo

                In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0,
                from /usr/include/glib-2.0/glib/gtypes.h:32,
                from /usr/include/glib-2.0/glib/galloca.h:32,
                from /usr/include/glib-2.0/glib.h:30,
                from gdbus/mainloop.c:28:
                /usr/include/glib-2.0/glib/gtypes.h: In function '_GLIB_CHECKED_ADD_U64':
                /usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array '_GStaticAssertCompileTimeAssertion_0' is negative
                #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                ^
                /usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro 'G_PASTE_ARGS'
                #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2
                ^
                /usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro 'G_PASTE'
                #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED
                ^
                /usr/include/glib-2.0/glib/gtypes.h:422:3: note: in expansion of macro 'G_STATIC_ASSERT'
                G_STATIC_ASSERT(sizeof (unsigned long long) == si

                S Offline
                S Offline
                Stefan_Lang
                wrote on last edited by
                #7

                You have to interpret the error information back to front: 1. The make error

                Vaclav_ wrote:

                Makefile:5858: recipe for target 'gdbus/mainloop.lo' failed

                tells you that the target mainloop.lo could not be built, and the messages above are output from the compiler that was called in an attempt to build this target. 2. The compiler output gives you accurate information on how it tried to expand a macro, resulting in C code that doesn't compile, and why it doesn't compile (negative array index). 3 The last lines of the compiler output show the condition that is statically checked, and ultimately leading to the compile error: as already pointed out, apparently the type unsigned long long does not have the same size as guint64. The output further above above shows how the static assert macro expansion turns the value of this condition (false) into an invalid array type definition, but that information is not neede or useful to you; you only need to know that an assertion failed, find out why this happened, and (how (or if) you can fix it. 4. The static assert was invoked in function _GLIB_CHECKED_ADD_U64, and this function was called somewhere in mainloop.c (in line 28, according to the compiler). That means you should check the function call: maybe you're calling the wrong function for the job. Or maybe you shouldn't use guint64 for the target system you're compiling for.

                GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                V 2 Replies Last reply
                0
                • V Vaclav_

                  One of the errors refers to line 422 in gtypes header - highlighted. Am I on the right track ? Apparently the type unsigned long long is not "typedef. It also looks line 422 should not be used per comment note.

                  #ifndef _GLIB_TEST_OVERFLOW_FALLBACK
                  #if __GNUC__ >= 5
                  #define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
                  #elif __has_builtin(__builtin_uadd_overflow)
                  #define _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
                  #endif
                  #endif

                  #define g_uint_checked_add(dest, a, b) \
                  _GLIB_CHECKED_ADD_U32(dest, a, b)
                  #define g_uint_checked_mul(dest, a, b) \
                  _GLIB_CHECKED_MUL_U32(dest, a, b)

                  #define g_uint64_checked_add(dest, a, b) \
                  _GLIB_CHECKED_ADD_U64(dest, a, b)
                  #define g_uint64_checked_mul(dest, a, b) \
                  _GLIB_CHECKED_MUL_U64(dest, a, b)

                  #if GLIB_SIZEOF_SIZE_T == 8
                  #define g_size_checked_add(dest, a, b) \
                  _GLIB_CHECKED_ADD_U64(dest, a, b)
                  #define g_size_checked_mul(dest, a, b) \
                  _GLIB_CHECKED_MUL_U64(dest, a, b)
                  #else
                  #define g_size_checked_add(dest, a, b) \
                  _GLIB_CHECKED_ADD_U32(dest, a, b)
                  #define g_size_checked_mul(dest, a, b) \
                  _GLIB_CHECKED_MUL_U32(dest, a, b)
                  #endif

                  /* The names of the following inlines are private. Use the macro
                  * definitions above.
                  */
                  #ifdef _GLIB_HAVE_BUILTIN_OVERFLOW_CHECKS
                  static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) {
                  return !__builtin_uadd_overflow(a, b, dest); }
                  static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) {
                  return !__builtin_umul_overflow(a, b, dest); }
                  static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) {
                  G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64));

                  return !__builtin_uaddll_overflow(a, b, (unsigned long long *) dest); }
                  static inline gboolean _GLIB_CHECKED_MUL_U64 (guint64 *dest, guint64 a, guint64 b) {
                  return !__builtin_umulll_overflow(a, b, (unsigned long long *) dest); }
                  #else
                  static inline gboolean _GLIB_CHECKED_ADD_U32 (guint32 *dest, guint32 a, guint32 b) {
                  *dest = a + b; return *dest >= a; }
                  static inline gboolean _GLIB_CHECKED_MUL_U32 (guint32 *dest, guint32 a, guint32 b) {
                  *dest = a * b; return !a || *dest / a == b; }
                  static inline gboolean _GLIB_CHECKED_ADD_U64 (guint64 *dest, guint64 a, guint64 b) {

                  S Offline
                  S Offline
                  Stefan_Lang
                  wrote on last edited by
                  #8

                  The #defines above show that the offending function could (or should) have been invoked either through the alias g_uint64_checked_add() or g_size_checked_add(), but the latter only if sizeof (size_t) is 8 bytes. but that doesn't add any helpful information with respect to fixing the problem: that casting a guint64* to (unsigned long long)* is not a valid operation for the target system you are compiling for. What is in line 28 in mainloop.c? Have you called g_uint64_checked_add() when you should have called g_size_checked_add instead? What are the types of the arguments you use in the function call?

                  GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                  1 Reply Last reply
                  0
                  • S Stefan_Lang

                    You have to interpret the error information back to front: 1. The make error

                    Vaclav_ wrote:

                    Makefile:5858: recipe for target 'gdbus/mainloop.lo' failed

                    tells you that the target mainloop.lo could not be built, and the messages above are output from the compiler that was called in an attempt to build this target. 2. The compiler output gives you accurate information on how it tried to expand a macro, resulting in C code that doesn't compile, and why it doesn't compile (negative array index). 3 The last lines of the compiler output show the condition that is statically checked, and ultimately leading to the compile error: as already pointed out, apparently the type unsigned long long does not have the same size as guint64. The output further above above shows how the static assert macro expansion turns the value of this condition (false) into an invalid array type definition, but that information is not neede or useful to you; you only need to know that an assertion failed, find out why this happened, and (how (or if) you can fix it. 4. The static assert was invoked in function _GLIB_CHECKED_ADD_U64, and this function was called somewhere in mainloop.c (in line 28, according to the compiler). That means you should check the function call: maybe you're calling the wrong function for the job. Or maybe you shouldn't use guint64 for the target system you're compiling for.

                    GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                    V Offline
                    V Offline
                    Vaclav_
                    wrote on last edited by
                    #9

                    Thanks, this is exactly what I was asking for. All I wanted to know was answered in your first line. I certainly appreciate you taking the time to walk thru the process. I forgot to stress - this is not my code - it is a product of "make" produced with the aid of "configure" script which is part of canned "bluez" source code. The "configure" is optioned to build "C" library, not to install "bulez" package, for ARM architecture. The "configure" and associated processes ( make and make install) are run on X86 architecture - hence "the problem". All of this is "created" by autotools. So I need to be careful not to "disturb" the code created by autotools. Some of the code has very noticeable notes that "it was created bu autotools" , hence do not mess with it. Cheers

                    1 Reply Last reply
                    0
                    • S Stefan_Lang

                      You have to interpret the error information back to front: 1. The make error

                      Vaclav_ wrote:

                      Makefile:5858: recipe for target 'gdbus/mainloop.lo' failed

                      tells you that the target mainloop.lo could not be built, and the messages above are output from the compiler that was called in an attempt to build this target. 2. The compiler output gives you accurate information on how it tried to expand a macro, resulting in C code that doesn't compile, and why it doesn't compile (negative array index). 3 The last lines of the compiler output show the condition that is statically checked, and ultimately leading to the compile error: as already pointed out, apparently the type unsigned long long does not have the same size as guint64. The output further above above shows how the static assert macro expansion turns the value of this condition (false) into an invalid array type definition, but that information is not neede or useful to you; you only need to know that an assertion failed, find out why this happened, and (how (or if) you can fix it. 4. The static assert was invoked in function _GLIB_CHECKED_ADD_U64, and this function was called somewhere in mainloop.c (in line 28, according to the compiler). That means you should check the function call: maybe you're calling the wrong function for the job. Or maybe you shouldn't use guint64 for the target system you're compiling for.

                      GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

                      V Offline
                      V Offline
                      Vaclav_
                      wrote on last edited by
                      #10

                      It appears that the available source and 64 bit OS (I am using) is being confirmed as an issue. I would hope if quint64 was "typedef" it would be in gtypes.h header. It is not there, maybe it is not needed to be "typedef". I am still not sure why when (quint64) is used it is typecasted as "long long" when the define I found is just "long". I guess I need definition of "long" as used by glib code. Perhaps I could just try to change the typecast to (unsigned long) but not sure why it would work. What is really bothersome is that the comments in the header file clearly states "use the macros above " and not the failing function. .

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups