Opened 17 months ago

Closed 4 weeks ago

#63154 closed defect (duplicate)

qt5-qtbase @5.15.2_2+openssl: make: c: No such file or directory

Reported by: jtdx-project (Arvo Järve) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version: 2.7.99
Keywords: arm64 Cc: amake (Aaron Madlon-Kay), i0ntempest, MaddTheSane (C.W. Betts), cjones051073 (Chris Jones), chrstphrchvz (Christopher Chavez), mascguy (Christopher Nielsen)
Port: qt5-qtbase

Description (last modified by ryandesign (Ryan Schmidt))

qt5-qtbase fails on configure phase
Notification, this port is first that has warning:

warn:clean The macOS 11 SDK does not appear to be installed. Ports may not build correctly.

I can't figure out why I see this.

Attachments (1)

main.log (585.6 KB) - added by jtdx-project (Arvo Järve) 17 months ago.

Download all attachments as: .zip

Change History (23)

Changed 17 months ago by jtdx-project (Arvo Järve)

Attachment: main.log added

comment:1 Changed 17 months ago by jtdx-project (Arvo Järve)

Description: modified (diff)

comment:2 Changed 17 months ago by ryandesign (Ryan Schmidt)

Description: modified (diff)
Keywords: arm64 added
Owner: set to MarcusCalhoun-Lopez
Port: qt5 removed
Status: newassigned
Summary: qt5 arm64qt5-qtbase @5.15.2_2+openssl: make: c: No such file or directory

The erroneous missing SDK message is covered by #61736.

This may also be connected:

:info:configure Failed to resolve SDK path for 'macosx11'

The reasons the build fails seem to be:

:info:configure make: c: No such file or directory

and

:info:configure /bin/sh: o: command not found

I am not certain why it is trying to run nonexistent programs called c and o.

comment:3 Changed 14 months ago by davidpfriedlander

Running into the same problem here on an M1 Mac Mini with Big Sur 11.6 (20G165). These "c" and "o" references looked to me like a truncated build, that is the "o" might really mean "-o" as in "here's the name of the output executable."

Thus, I see in the log:

:info:configure o "../bin/qmake" main.o meta.o option.o project.o property.o ioutils.o proitems.o qmakebuiltins.o qmakeevaluator.o qmakeglobals.o qmakeparser.o qmakevfs.o pbuilder_pbx.o makefile.o makefiledeps.o metamakefile.o
[...]
:info:configure /bin/sh: o: command not found

If I compare this to building the same qt5-qtbase package on a Catalina macOS 10.15.7 system, I see:

:info:configure /Library/Developer/CommandLineTools/usr/bin/clang++ -o "../bin/qmake" main.o meta.o option.o project.o property.o ioutils.o proitems.o qmakebuiltins.o qmakeevaluator.o qmakeglobals.o qmakeparser.o qmakevfs.o pbuilder_pbx.o makefile.o makefiledeps.o metamakefile.o projectgenerator.o
[...]

So pretty clearly the compiler and the initial hyphen ("-o" vs "o") are not being defined properly on the Big Sur system. Most definitely related is that I get eight of the errors:

:info:configure Failed to resolve SDK path for 'macosx11'

I tried the fix listed in #61736 (shown above) but this did not work for me.

(By the way, I see the same issue for those "c" errors:

Big Sur:

:info:configure Creating qmake...
:info:configure Failed to resolve SDK path for 'macosx11'
[ ...repeated 7 more times...]
:info:configure c -o main.o -arch arm64 -fconstant-cfstrings -MMD     -g  -I/opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_aqua_qt5/qt5-qtbase/work/qtbase-everywhere-src-5.15.2/qmake
[...]
:info:configure make: c: No such file or directory

Catalina (no errors):

:info:configure Creating qmake...
:info:configure /Library/Developer/CommandLineTools/usr/bin/clang++ -c -o main.o -arch x86_64 -fconstant-cfstrings -MMD -stdlib=libc++ -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -mmacosx-version-min=10.15 -std=c++11 

)

comment:4 Changed 14 months ago by kencu (Ken)

although I do not as yet fully understand exactly what is going on, I am able to build qt5 on BigSur 11.6 if I set this:

use_xcode yes

near the top of the qt5 Portfile.

the lines that seem to start with "c" and generate errors then become something like this:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -o qcore_mac ..etc

comment:5 Changed 14 months ago by davidpfriedlander

Thank you, kencu. Yes, that worked for me, too (and for M1 Big Sur and M1 Monterey).

comment:6 Changed 13 months ago by amake (Aaron Madlon-Kay)

Cc: amake added

comment:7 Changed 13 months ago by i0ntempest

Cc: i0ntempest added

comment:8 Changed 13 months ago by jwhowarth

I'm seeing a build failure later for qt5-base on Monterey with Xcode 13.1.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -Oz -std=c++1z  -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk -mmacosx-version-min=12.0 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Winconsistent-missing-override -Wobjc-interface-ivars -Wobjc-method-access -Wobjc-multiple-method-names -Werror=unguarded-availability -Werror=unguarded-availability-new -Werror=unsupported-availability-guard -fPIC -DQT_NO_LINKED_LIST -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_FOREACH -DQT_DEPRECATED_WARNINGS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DGL_SILENCE_DEPRECATION -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_ACCESSIBILITY_SUPPORT_LIB -DQT_THEME_SUPPORT_LIB -DQT_FONTDATABASE_SUPPORT_LIB -DQT_GRAPHICS_SUPPORT_LIB -DQT_CLIPBOARD_SUPPORT_LIB -DQT_PRINTSUPPORT_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I. -I../../../../include -I../../../../include/QtAccessibilitySupport -I../../../../include/QtAccessibilitySupport/5.15.2 -I../../../../include/QtAccessibilitySupport/5.15.2/QtAccessibilitySupport -I../../../../include/QtThemeSupport -I../../../../include/QtThemeSupport/5.15.2 -I../../../../include/QtThemeSupport/5.15.2/QtThemeSupport -I../../../../include/QtFontDatabaseSupport -I../../../../include/QtFontDatabaseSupport/5.15.2 -I../../../../include/QtFontDatabaseSupport/5.15.2/QtFontDatabaseSupport -I../../../../include/QtGraphicsSupport -I../../../../include/QtGraphicsSupport/5.15.2 -I../../../../include/QtGraphicsSupport/5.15.2/QtGraphicsSupport -I../../../../include/QtPrintSupport/5.15.2 -I../../../../include/QtPrintSupport/5.15.2/QtPrintSupport -I../../../../include/QtWidgets/5.15.2 -I../../../../include/QtWidgets/5.15.2/QtWidgets -I../../../../include/QtGui/5.15.2 -I../../../../include/QtGui/5.15.2/QtGui -I../../../../include/QtClipboardSupport -I../../../../include/QtClipboardSupport/5.15.2 -I../../../../include/QtClipboardSupport/5.15.2/QtClipboardSupport -I../../../../include/QtPrintSupport -I../../../../include/QtWidgets -I../../../../include/QtGui -I../../../../include/QtCore/5.15.2 -I../../../../include/QtCore/5.15.2/QtCore -I../../../../include/QtCore -I.moc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.0.sdk/System/Library/Frameworks/AGL.framework/Headers -I../../../../mkspecs/macx-clang -F/opt/local/var/macports/build/_Users_howarth_ports_aqua_qt5/qt5-qtbase/work/qtbase-everywhere-src-5.15.2/lib -o .obj/qiosurfacegraphicsbuffer.o qiosurfacegraphicsbuffer.mm
In file included from qiosurfacegraphicsbuffer.mm:40:
./qiosurfacegraphicsbuffer.h:54:32: error: unknown type name 'CGColorSpaceRef'; did you mean 'QColorSpace'?
    void setColorSpace(QCFType<CGColorSpaceRef> colorSpace);
                               ^~~~~~~~~~~~~~~
                               QColorSpace
../../../../include/QtCore/../../src/corelib/kernel/qmetatype.h:2090:1: note: 'QColorSpace' declared here
QT_FOR_EACH_STATIC_GUI_CLASS(QT_FORWARD_DECLARE_STATIC_TYPES_ITER)
^
../../../../include/QtCore/../../src/corelib/kernel/qmetatype.h:178:24: note: expanded from macro 'QT_FOR_EACH_STATIC_GUI_CLASS'
    F(QColorSpace, 87, QColorSpace) \
                       ^
qiosurfacegraphicsbuffer.mm:90:32: error: out-of-line definition of 'setColorSpace' does not match any declaration in 'QIOSurfaceGraphicsBuffer'
void QIOSurfaceGraphicsBuffer::setColorSpace(QCFType<CGColorSpaceRef> colorSpace)
                               ^~~~~~~~~~~~~
./qiosurfacegraphicsbuffer.h:54:24: note: type of 1st parameter of member declaration does not match definition ('QCFType<QColorSpace>' vs 'QCFType<CGColorSpaceRef>')
    void setColorSpace(QCFType<CGColorSpaceRef> colorSpace);
                       ^
2 errors generated.

Note that I also had to switch from...

sudo xcode-select -s /Library/Developer/CommandLineTools

to

sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

in order to suppress an error...

DEBUG: Starting logging for qt5-qtbase @5.15.2_2+openssl
DEBUG: macOS 12.0.1 (darwin/21.1.0) arch i386
DEBUG: MacPorts 2.7.1
DEBUG: Xcode none
DEBUG: SDK 12
DEBUG: MACOSX_DEPLOYMENT_TARGET: 12.0
DEBUG: Attempting ln -sf /opt/local/var/macports/build/_Users_howarth_ports_aqua_qt5/qt5-qtbase/work /Users/howarth/ports/aqua/qt5/work
DEBUG: dropping privileges: euid changed to 502, egid changed to 501.
Error: Port qt5-qtbase requires a full Xcode installation, which was not found on your system.
Error: You can install Xcode from the Mac App Store or https://developer.apple.com/xcode/
Error: See /opt/local/var/macports/logs/_Users_howarth_ports_aqua_qt5/qt5-qtbase/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
Error: Processing of port pymol failed

comment:9 Changed 13 months ago by jwhowarth

The build failure that I am observing is also reported by home-brew for their qt6 packaging...

https://github.com/Homebrew/discussions/discussions/2361

comment:10 Changed 13 months ago by jwhowarth

Looks like Home-brew has a fix this...

https://github.com/Homebrew/homebrew-core/pull/88168#issuecomment-953466312

Adding a patch-qiosurfacegraphicsbuffer.h.diff to the qt5 Portfile with...

--- src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h.orig 2021-10-29 08:04:29.000000000 -0400
+++ src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h      2021-10-29 08:05:13.000000000 -0400
@@ -40,6 +40,7 @@
 #ifndef QIOSURFACEGRAPHICSBUFFER_H
 #define QIOSURFACEGRAPHICSBUFFER_H
 
+#include <CoreGraphics/CGColorSpace.h>
 #include <qpa/qplatformgraphicsbuffer.h>
 #include <private/qcore_mac_p.h>
 

eliminates the error. Note that they also report the need to use...

sudo xcode-select -s /Applications/Xcode.app

comment:11 Changed 13 months ago by jhoyt4

There's already a PR to apply this patch: https://github.com/macports/macports-ports/pull/12711/

comment:12 Changed 13 months ago by MaddTheSane (C.W. Betts)

Cc: MaddTheSane added

comment:13 Changed 13 months ago by Chris Jones <jonesc@…>

Resolution: fixed
Status: assignedclosed

In bd6b98885444240223213eabfc87bc18e1919ed5/macports-ports (master):

qt5: Address SDK issue
Closes: #63154

comment:14 in reply to:  2 Changed 12 months ago by ryandesign (Ryan Schmidt)

Cc: cjones051073 added
Resolution: fixed
Status: closedreopened

You only fixed the problem in the qt5 port. Other related ports are still affected, for example qt511:

https://build.macports.org/builders/ports-12_x86_64-builder/builds/4055/steps/install-port/logs/stdio

make: c: No such file or directory
/bin/sh: o: command not found

comment:15 Changed 12 months ago by chrstphrchvz (Christopher Chavez)

Cc: chrstphrchvz added

comment:16 Changed 12 months ago by mascguy (Christopher Nielsen)

Cc: mascguy added

comment:17 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

In 4ccdc73094c259eb53235c7ddeea041763f3e568/macports-ports (master):

qt5: allow building without full Xcode

[skip ci]

See: #63154

comment:18 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

Maybe this issue is still present: ticket:63805#comment:9 resembles comment:2.

comment:19 Changed 8 months ago by chrstphrchvz (Christopher Chavez)

I believe #63712 is a duplicate of this.

comment:20 Changed 4 months ago by chrstphrchvz (Christopher Chavez)

In c06efd1cc95a7642ba4e0d4be05f3b8bfda04490/macports-ports (master):

qt(55|56|57|58|59|511|513): attempt to fix builds

…by copying fix from qt5
Ports such as qt5*-qtbase-docs fail on macOS 10.12 and earlier
due to SDK detection errors
TODO: see if this allows use_xcode yes in special case for qtbase
to be removed

See: #59312
See: #63154

[skip ci]

comment:21 Changed 4 months ago by chrstphrchvz (Christopher Chavez)

In 6dd43b8c1559762b94bdc15be32735b56097a826/macports-ports (master):

qt(59|511|513): fix to allow building on macOS 11/12

[skip ci]

See: #62190
See: #63154

comment:22 Changed 4 weeks ago by kencu (Ken)

Resolution: duplicate
Status: reopenedclosed
Note: See TracTickets for help on using tickets.