Opened 7 years ago

Closed 7 years ago

#53599 closed defect (fixed)

qt5-sqlite-plugin: not using the right compiler and thus breaks on libstdc++

Reported by: mojca (Mojca Miklavec) Owned by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: qt5-sqlite-plugin

Description

qt5-sqlite-plugin is not UsingTheRightCompiler:

:info:build /opt/local/bin/clang++-mp-4.0 -c -pipe -arch x86_64 -stdlib=macports-libstdc++ -O2 -std=c++1z -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -isystem /opt/local/include -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers/5.6.2 -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers/5.6.2/QtSql -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers/5.6.2 -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers/5.6.2/QtCore -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers -I.moc -I../../../../mkspecs/macx-clang -F/opt/local/libexec/qt5/lib -o .obj/smain.o smain.cpp
:info:build /opt/local/bin/clang++-mp-4.0 -c -pipe -arch x86_64 -stdlib=macports-libstdc++ -O2 -std=c++1z -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_EVDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_NO_CAST_TO_ASCII -DQT_NO_CAST_FROM_ASCII -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_SQL_LIB -DQT_CORE_LIB -I. -isystem /opt/local/include -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers/5.6.2 -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers/5.6.2/QtSql -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers/5.6.2 -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers/5.6.2/QtCore -I/opt/local/libexec/qt5/lib/QtSql.framework/Headers -I/opt/local/libexec/qt5/lib/QtCore.framework/Headers -I.moc -I../../../../mkspecs/macx-clang -F/opt/local/libexec/qt5/lib -o .obj/moc_qsql_sqlite_p.o .moc/moc_qsql_sqlite_p.cpp
:info:build rm -f libqsqlite.dylib
:info:build /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -headerpad_max_install_names -arch x86_64 -stdlib=macports-libstdc++ -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -mmacosx-version-min=10.7 -single_module -dynamiclib -o libqsqlite.dylib .obj/smain.o .obj/qsql_sqlite.o .obj/moc_qsql_sqlite_p.o  -F/opt/local/libexec/qt5/lib -L/opt/local/lib -lsqlite3 -framework QtSql -framework QtCore -framework DiskArbitration -framework IOKit  
:info:build clang: error: invalid library name in argument '-stdlib=macports-libstdc++'
:info:build clang: error: invalid library name in argument '-stdlib=macports-libstdc++'
:info:build make: *** [../../../../plugins/sqldrivers/libqsqlite.dylib] Error 1
:info:build make: Leaving directory

Change History (4)

comment:1 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: changed from mcalhoun@… to MarcusCalhoun-Lopez
Status: newaccepted

The compiler is correct.
Please run port installed clang-4.0.
One of the variants should be +libstdcxx
If not, that is the reason -stdlib=macports-libstdc++ is not being recognized.

comment:2 Changed 7 years ago by mojca (Mojca Miklavec)

Please look carefully.

The compiler that complains is not /opt/local/bin/clang++-mp-4.0, but rather /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++.

From what I understand that's the expected behaviour except that Xcode's clang++ should not be called at all.

comment:3 in reply to:  2 Changed 7 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to mojca:

Please look carefully.

The compiler that complains is not /opt/local/bin/clang++-mp-4.0, but rather /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++.

Of course, you are right.
I read the output too quickly and missed the main point.
Thank you for the clarification.

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

Resolution: fixed
Status: acceptedclosed

In a64f1147/macports-ports:

qmake5 PG: use correct compiler for linking

Fixes #53599

Note: See TracTickets for help on using tickets.