New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
QT5.6: Fixes compile error with wrong LD env variable #27940
Conversation
@@ -103,6 +103,8 @@ stdenv.mkDerivation { | |||
preConfigure = '' | |||
export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH" | |||
export MAKEFLAGS=-j$NIX_BUILD_CORES | |||
// We need to set LD to GCC or otherwise we get nasty compile errors | |||
export LD=$GCC |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shoukd be $CC otherwise this will break with clang
Fixed :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still seems to fail with
/build/qtbase-opensource-src-5.6.2/lib/libQt5Bootstrap.a(qlatincodec.o):(.data.rel.ro._ZTI12QLatin1Codec[_ZTI12QLatin1Codec]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
/build/qtbase-opensource-src-5.6.2/lib/libQt5Bootstrap.a(qlatincodec.o):(.data.rel.ro._ZTI13QLatin15Codec[_ZTI13QLatin15Codec]+0x0): undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
collect2: error: ld returned 1 exit status
@@ -103,6 +103,8 @@ stdenv.mkDerivation { | |||
preConfigure = '' | |||
export LD_LIBRARY_PATH="$PWD/lib:$PWD/plugins/platforms:$LD_LIBRARY_PATH" | |||
export MAKEFLAGS=-j$NIX_BUILD_CORES | |||
// We need to set LD to CC or otherwise we get nasty compile errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
invalid comment, #
QT uses -Wl linker flags and these flags only work with gcc/g++ and not with LD directly.
Now it finally should work! First I hard $GCC and replaced that with $CC, but it needed to be $CXX. :) On my laptop it compiled now with my latest commit. |
QT uses -Wl linker flags and these flags only work with gcc/g++
and not with LD directly.
Motivation for this change
Things done
Please check what applies. Note that these are not hard requirements but merely serve as information for reviewers.
(nix.useSandbox on NixOS,
or option
build-use-sandbox
innix.conf
on non-NixOS)
nix-shell -p nox --run "nox-review wip"
./result/bin/
)