1. Qpid
  2. QPID-2996

qmf/SchemaMethod.cpp fails to compile on s390


    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: C++ Broker
    • Labels:
    • Environment:

      Fedora Rawhide (to become Fedora 15) on s390x


      qmf/SchemaMethod.cpp fails to compile on s390 with the following error

      libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../include -I../include -I. -I=. -pedantic -Wall -Wextra -Wno-shadow -Wpointer-arith -Wcast-qual -Wcast-align -Wno-long-long -Wvolatile-register-var -Winvalid-pch -Wno-system-headers -Woverloaded-virtual -DQPID_LIBEXEC_DIR=\"/usr/libexec/qpid\" -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m31 -march=z9-109 -mtune=z10 -DNDEBUG -O3 -c qmf/SchemaMethod.cpp -fPIC -DPIC -o qmf/.libs/SchemaMethod.o
      qmf/SchemaMethod.cpp: In member function 'void qmf::SchemaMethodImpl::encodeV1(qpid::management::Buffer&) const':
      qmf/SchemaMethod.cpp:166:38: error: ambiguous overload for 'operator=' in 'map.std::map<_Key, _Tp, _Compare, _Alloc>::operator[] [with _Key = std::basic_string<char>, _Tp = qpid::types::Variant, _Compare = std::less<std::basic_string<char> >, _Alloc = std::allocator<std::pair<const std::basic_string<char>, qpid::types::Variant> >, mapped_type = qpid::types::Variant, key_type = std::basic_string<char>](((const std::map<std::basic_string<char>, qpid::types::Variant>::key_type&)(& std::basic_string<char>(((const char*)"argCount"), ((const std::allocator<char>&)((const std::allocator<char>)(& std::allocator<char>()))))))) = ((const qmf::SchemaMethodImpl)this)->qmf::SchemaMethodImpl::arguments.std::list<_Tp, _Alloc>::size [with _Tp = qmf::SchemaProperty, _Alloc = std::allocator<qmf::SchemaProperty>, std::list::size_type = long unsigned int]()'
      ../include/qpid/types/Variant.h:98:32: note: candidates are: qpid::types::Variant& qpid::types::Variant::operator=(bool)
      ../include/qpid/types/Variant.h:99:32: note: qpid::types::Variant& qpid::types::Variant::operator=(uint8_t)
      ../include/qpid/types/Variant.h:100:32: note: qpid::types::Variant& qpid::types::Variant::operator=(uint16_t)
      ../include/qpid/types/Variant.h:101:32: note: qpid::types::Variant& qpid::types::Variant::operator=(uint32_t)
      ../include/qpid/types/Variant.h:102:32: note: qpid::types::Variant& qpid::types::Variant::operator=(uint64_t)
      ../include/qpid/types/Variant.h:103:32: note: qpid::types::Variant& qpid::types::Variant::operator=(int8_t)
      ../include/qpid/types/Variant.h:104:32: note: qpid::types::Variant& qpid::types::Variant::operator=(int16_t)
      ../include/qpid/types/Variant.h:105:32: note: qpid::types::Variant& qpid::types::Variant::operator=(int32_t)
      ../include/qpid/types/Variant.h:106:32: note: qpid::types::Variant& qpid::types::Variant::operator=(int64_t)
      ../include/qpid/types/Variant.h:107:32: note: qpid::types::Variant& qpid::types::Variant::operator=(float)
      ../include/qpid/types/Variant.h:108:32: note: qpid::types::Variant& qpid::types::Variant::operator=(double)
      ../include/qpid/types/Variant.h:113:32: note: qpid::types::Variant& qpid::types::Variant::operator=(const qpid::types::Variant&)
      ../include/qpid/types/Variant.h:114:32: note: qpid::types::Variant& qpid::types::Variant::operator=(const qpid::types::Uuid&)
      make[3]: Leaving directory `/builddir/build/BUILD/qpid-0.8/cpp/src'
      make[3]: *** [qmf/SchemaMethod.lo] Error 1

      I think an explicit typecast of the arguments.size() call will solve it.

      excerpt from /usr/include/c+/4.5.1/s390-redhat-linux/bits/c+config.h
      /* Define if size_t is unsigned int. */
      /* #undef _GLIBCXX_SIZE_T_IS_UINT */

      link to Fedora/s390x build system - http://s390.koji.fedoraproject.org/koji/taskinfo?taskID=281714


        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        6d 23h 51m 1 Ted Ross 19/Jan/11 13:58
        Resolved Resolved Closed Closed
        922d 4h 55m 1 Justin Ross 29/Jul/13 18:53
        Justin Ross made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Ted Ross made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 0.9 [ 12315382 ]
        Resolution Fixed [ 1 ]
        Ted Ross added a comment -

        Thanks for the patch, I've committed it.

        Ted Ross added a comment - Thanks for the patch, I've committed it.
        Ted Ross made changes -
        Assignee Ted Ross [ tedross ]
        Dan Horák made changes -
        Field Original Value New Value
        Attachment qpid-0.8-size_t.patch [ 12468628 ]
        Dan Horák added a comment -

        happens when building for the s390 architecture (32-bit)

        Dan Horák added a comment - happens when building for the s390 architecture (32-bit)
        Dan Horák created issue -


          • Assignee:
            Ted Ross
            Dan Horák
          • Votes:
            0 Vote for this issue
            0 Start watching this issue


            • Created: