Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.9.1, 5.9.2
-
None
-
macOS Sierra 10.12.6 with qt-opensource-mac-x64-5.9.1.dmg downloaded from Qt website and Xcode 8.3.3
{code:java}
clang --version
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
{code}
Also tested on macOs 10.10 with same Qt version but older Xcode, with same result.
Also tested with Qt 5.9.2, with same result.macOS Sierra 10.12.6 with qt-opensource-mac-x64-5.9.1.dmg downloaded from Qt website and Xcode 8.3.3 {code:java} clang --version Apple LLVM version 8.1.0 (clang-802.0.42) Target: x86_64-apple-darwin16.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin {code} Also tested on macOs 10.10 with same Qt version but older Xcode, with same result. Also tested with Qt 5.9.2, with same result.
-
-
d479c6db2c8d723994ba2eee8f54f94dae826c84 (qt/qtbase/dev) 6e695c0fb6b1f4cd28ef7bea615a8621fd76a168 (qt/qtbase/5.15)
Description
I want to create release builds on macOS that contain debug info in the form of .dsym files.
With Qt 5.8.0, I got this to work by putting these two lines in my .qmake.conf (and by then calling dsymutil with QMAKE_POST_LINK):
QMAKE_CFLAGS+="-gdwarf-2"
QMAKE_CXXFLAGS+="-gdwarf-2"
With Qt 5.9.1, having these lines in the .qmake.conf causes qmake to fail with an error in toolchain.prf line 50.
With the attached test project, running
qmake -d DSymTest.pro
gives:
[...] DEBUG 1: /Users/kw/Qt5.9.1/5.9.1/clang_64/mkspecs/features/toolchain.prf:50: calling built-in $$system("LC_ALL=C /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -pipe -stdlib=libc++ -gdwarf-2 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -single_module -dynamiclib -o /dev/null -v -Wl,-v -xc++ - 2>&1 </dev/null >/dev/null", lines, ec) DEBUG 1: /Users/kw/Qt5.9.1/5.9.1/clang_64/mkspecs/features/toolchain.prf:50: output := "Apple LLVM version 8.1.0 (clang-802.0.42)" "Target: x86_64-apple-darwin16.7.0" "Thread model: posix" "InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin" " \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang\" -cc1 -triple x86_64-apple-macosx10.12.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name - -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu penryn -target-linker-version 278.4 -v -dwarf-column-info -debug-info-kind=standalone -dwarf-version=2 -debugger-tuning=lldb -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -stdlib=libc++ -fdeprecated-macro -fdebug-compilation-dir /Users/kw/Qt5.9.1/5.9.1/clang_64/mkspecs/features -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fobjc-runtime=macosx-10.12.0 -fencode-extended-block-signature -fcxx-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -o /var/folders/jx/m_lp6yqj0qg0hpbz_ss2x_cm0000gp/T/--4d1f1e.o -x c++ -" "clang -cc1 version 8.1.0 (clang-802.0.42) default target x86_64-apple-darwin16.7.0" "ignoring nonexistent directory \"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/v1\"" "ignoring nonexistent directory \"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/local/include\"" "ignoring nonexistent directory \"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/Library/Frameworks\"" "#include \"...\" search starts here:" "#include <...> search starts here:" " /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1" " /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/include" " /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include" " /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include" " /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks (framework directory)" "End of search list." " \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld\" -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -no_deduplicate -dynamic -dylib -arch x86_64 -macosx_version_min 10.12.0 -single_module -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -o /dev/null -v /var/folders/jx/m_lp6yqj0qg0hpbz_ss2x_cm0000gp/T/--4d1f1e.o -lc++ -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.1.0/lib/darwin/libclang_rt.osx.a" "@(#)PROGRAM:ld PROJECT:ld64-278.4" "configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)" "Library search paths:" \t/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/lib "Framework search paths:" \t/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/ " \"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil\" -o /dev/null.dSYM /dev/null" "error: cannot parse the debug map for \"/dev/null\": The file was not recognized as a valid object file" "clang: error: dsymutil command failed with exit code 1 (use -v to see invocation)" [...] DEBUG 1: /Users/kw/Qt5.9.1/5.9.1/clang_64/mkspecs/features/toolchain.prf:52: calling built-in error("Cannot run compiler \'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++\'. Maybe you forgot to setup the environment?")
This exits with the error:
Project ERROR: Cannot run compiler '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++'. Maybe you forgot to setup the environment?
It seems that the line 50 in toolchain.prf runs the compiler and sends the output to /dev/null, and that the dsymutil tool is then called against /dev/null, which fails.
Is there an official better way of creating release builds with dsym debug info?
Attachments
Issue Links
- relates to
-
QTBUG-84467 Cant build WebEngine with XCode 11.5
- Closed