Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60079 closed defect (fixed)

Conflicts in the qt5-qtbase headers?

Reported by: mouse07410 (Mouse) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: qt5-qtbase

Description

MacOS Catalina 10.15.3, Xcode-11.3.1, everything current Macports-wise.

Attempting to build SleepyHead package, which uses Qt5. Compilation fails, indicating some conflict between the types in the header files. I wasn't able to trace it to the package source that provokes it:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -O2 -std=gnu++11  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.11 -frtti -Wall -Wextra -fPIC -DQT_DEPRECATED_WARNINGS -DLOCK_RESMED_SESSIONS -DQT_NO_DEBUG -DQT_PRINTSUPPORT_LIB -DQT_HELP_LIB -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_XML_LIB -DQT_SERIALPORT_LIB -DQT_SQL_LIB -DQT_CORE_LIB -I../../sleepyhead-code/sleepyhead -I. -I/opt/local/libexec/qt5/lib/QtPrintSupport.framework/Headers -I/opt/local/libexec/qt5/lib/QtHelp.framework/Headers -I/opt/local/libexec/qt5/lib/QtOpenGL.framework/Headers -I/opt/local/libexec/qt5/lib/QtWidgets.framework/Headers -I/opt/local/libexec/qt5/lib/QtGui.framework/Headers -I/opt/local/libexec/qt5/lib/QtNetwork.framework/Headers -I/opt/local/libexec/qt5/lib/QtXml.framework/Headers -I/opt/local/libexec/qt5/lib/QtSerialPort.framework/Headers -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I/opt/local/libexec/qt5/mkspecs/macx-clang -F/opt/local/libexec/qt5/lib -o daily.o ../../sleepyhead-code/sleepyhead/daily.cpp
In file included from ../../sleepyhead-code/sleepyhead/daily.cpp:26:
In file included from ../../sleepyhead-code/sleepyhead/daily.h:25:
In file included from ../../sleepyhead-code/sleepyhead/SleepLib/profiles.h:18:
../../sleepyhead-code/sleepyhead/SleepLib/machine.h:146:40: warning: 'sprintf' is
      deprecated: Use asprintf(), arg() or QTextStream instead [-Wdeprecated-declarations]
    QString hexid() { return QString().sprintf("%08lx", m_id); }
. . . . .
In file included from ../../sleepyhead-code/sleepyhead/daily.cpp:9:
In file included from /opt/local/libexec/qt5/lib/QtGui.framework/Headers/QTextCharFormat:1:
In file included from /opt/local/libexec/qt5/lib/QtGui.framework/Headers/qtextformat.h:43:
In file included from /opt/local/libexec/qt5/lib/QtGui.framework/Headers/qtguiglobal.h:43:
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qglobal.h:1050:9: error: assigning to
      'QDebug::Stream *' from incompatible type 'long'
    t = std::forward<U>(newValue);
        ^~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/libexec/qt5/lib/QtCore.framework/Headers/qdebug.h:118:46: note: in instantiation
      of function template specialization 'qExchange<QDebug::Stream *, long>' requested here
    QDebug(QDebug &&other) noexcept : stream{qExchange(other.stream, nullptr)} {}
                                             ^
7 warnings and 1 error generated.
make[1]: *** [daily.o] Error 1
make: *** [sub-sleepyhead-make_first-ordered] Error 2

Attachments (1)

sleepyhead-build-log.txt (18.4 KB) - added by mouse07410 (Mouse) 4 years ago.
Complete output of the failed "make"

Download all attachments as: .zip

Change History (8)

Changed 4 years ago by mouse07410 (Mouse)

Attachment: sleepyhead-build-log.txt added

Complete output of the failed "make"

comment:1 Changed 4 years ago by mf2k (Frank Schima)

Cc: MarcusCalhoun-Lopez removed
Owner: set to MarcusCalhoun-Lopez
Status: newassigned

comment:2 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Unfortunately, it is very difficult to track down errors for an application that was not built by MacPorts.
The prebuilt SleepyHead application is no longer available.
The last time I checked, the prebuilt SleepyHead application used Qt 5.5, while the latest MacPorts version is Qt 5.14.

The only two things I can think to do are:

  1. Uninstall qt5 and try qt55 instead
  2. Create a Portfile for the SleepyHead software so we can try to track down the error
  3. Try OSCAR

I am sorry I don't have any better suggestions.

comment:3 Changed 4 years ago by mouse07410 (Mouse)

Portfile would probably be good. My main concern is legal issues.

Thank for for pointing at OSCAR - I'm trying it as we speak.

comment:4 Changed 4 years ago by mouse07410 (Mouse)

OSCAR is exactly what I wanted - thank you, Marcus!

comment:5 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Resolution: fixed
Status: assignedclosed

comment:6 Changed 4 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

It turns out that SleepyHead and OSCAR were helpfully adding the following code

#ifndef nullptr
#define nullptr NULL
#endif

So nullptr was type long instead of the correct std::nullptr_t.

In tracking this problem down, I went ahead and created a port for OSCAR.
I added myself as the maintainer, but if you would like to take over, that is fine with me.

comment:7 Changed 4 years ago by mouse07410 (Mouse)

Marcus, thank you for your work!

I'm not ready yet to step up to being a maintainer - but I'll be happy to assist you in the meanwhile.

Note: See TracTickets for help on using tickets.