Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [Solved] Compiler error: qatomic_mips.h:129: error: output number 1 not directly addressable
Forum Updated to NodeBB v4.3 + New Features

[Solved] Compiler error: qatomic_mips.h:129: error: output number 1 not directly addressable

Scheduled Pinned Locked Moved Mobile and Embedded
3 Posts 2 Posters 1.9k 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.
  • J Offline
    J Offline
    jbarnesweb
    wrote on last edited by
    #1

    In file included from /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qatomic_arch.h:70,
    from k/home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qbasicatomic.h:227,
    from /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qatomic.h:46,
    from /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qsharedpointer.h:46,
    from /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/QSharedPointer:1,

                 from ../../include/fontatlas.h:9,
    
    
                 from ../../include/textlayout.h:4,
    
                 from ../../src/receiver/textlayout.cpp:1:
    

    /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qatomic_mips.h: In function '(static initializers for /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qatomic_mips.h)':
    /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qatomic_mips.h:129: error: output number 1 not directly addressable
    /home/jbarnes/rdk/pace/rng150/branches/fr_xre2723_091013/sdk/fsroot/ramdisk/usr/local/Qt/include/QtCore/qatomic_mips.h:129: warning: use of memory input without lvalue in asm operand 4 is deprecated

    As the compiler error shows, it comes from including QSharedPointer.

    Cross compiling using mipsel-linux-gcc-4.4.5 compiler.

    Googling the issue says to add -fno-strict-volatile-bitfields to CXXFLAGS. Doesn't seem to fix it in the .pro file.

    The source indicated in QBasicAtomicInt::ref() is
    @ asm volatile(".set push\n"
    SET_MIPS2
    "0:\n"
    "ll %[originalValue], %[_q_value]\n"
    "addiu %[newValue], %[originalValue], %[one]\n"
    "sc %[newValue], %[_q_value]\n"
    "beqz %[newValue], 0b\n"
    "nop\n"
    ".set pop\n"
    : [originalValue] "=&r" (originalValue),
    [_q_value] "+m" (_q_value),
    [newValue] "=&r" (newValue)
    : [one] "i" (1)
    : "cc", "memory");
    @

    I don't know enough assembler to know what the problem is. Has anybody seen this before? Fixes? Workarounds? Help?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jbarnesweb
      wrote on last edited by
      #2

      Ok, I found what caused it in my case.

      There was a #pragma pack(push (1)) preprocessor directive in my code without a corresponding pack(). I hope this helps someone else who runs into the same problem.

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        Great you found out and thanks for sharing the solution !

        Could you also update your thread title prepending [solved] so other forum users may know that a solution has been found :)

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved