Skip to content
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

pkgsi686Linux.qt5.qtbase fails to build #63829

Closed
tadeokondrak opened this issue Jun 26, 2019 · 13 comments

Comments

@tadeokondrak
Copy link
Contributor

commented Jun 26, 2019

Issue description

Seems to be related to #36946/#36947. Makes it so I can't use wine, which depends on it for some reason

.obj/qpathsimplifier.o:qpathsimplifier.cpp:function (anonymous namespace)::PathSimplifier::intersectNodes(QDataBuffer<(anonymous namespace)::PathSimplifier::Element*>&, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*): error: undefined reference to '__divmoddi4'
.obj/qpathsimplifier.o:qpathsimplifier.cpp:function (anonymous namespace)::PathSimplifier::intersectNodes(QDataBuffer<(anonymous namespace)::PathSimplifier::Element*>&, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*): error: undefined reference to '__divmoddi4'
.obj/qpathsimplifier.o:qpathsimplifier.cpp:function (anonymous namespace)::PathSimplifier::intersectNodes(QDataBuffer<(anonymous namespace)::PathSimplifier::Element*>&, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*): error: undefined reference to '__divmoddi4'
.obj/qpathsimplifier.o:qpathsimplifier.cpp:function (anonymous namespace)::PathSimplifier::intersectNodes(QDataBuffer<(anonymous namespace)::PathSimplifier::Element*>&, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*, (anonymous namespace)::PathSimplifier::BoundingVolumeHierarchy::Node*): error: undefined reference to '__divmoddi4'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1312: ../../lib/libQt5Gui.so.5.12.0] Error 1
make[2]: Leaving directory '/build/qtbase-everywhere-src-5.12.0/src/gui'
make[1]: *** [Makefile:448: sub-gui-make_first] Error 2
make[1]: Leaving directory '/build/qtbase-everywhere-src-5.12.0/src'
make: *** [Makefile:49: sub-src-make_first] Error 2
builder for '/nix/store/y37l40jih7j4db0n8x9mn0digdxcyp61-qtbase-5.12.0.drv' failed with exit code 2
error: build of '/nix/store/y37l40jih7j4db0n8x9mn0digdxcyp61-qtbase-5.12.0.drv' failed

Steps to reproduce

  • Update to latest git master nixpkgs
  • nix-build '<nixpkgs>' -A pkgsi686Linux.qt5.qtbase

Technical details

Please run nix-shell -p nix-info --run "nix-info -m" and paste the
results.

  • system: "x86_64-linux"
  • host os: Linux 5.1.15, NixOS, 19.09.git.5500538 (Loris)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.2.2
  • nixpkgs: /etc/nixos/nixpkgs
@nyanloutre

This comment has been minimized.

Copy link
Contributor

commented Jun 26, 2019

Got the same error when rebuilding my system on nixos-unstable channel

relevant log: https://hydra.nixos.org/build/95394915/nixlog/1

@matthewbauer

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

I think previously this was fixed by using gcc6 instead of gcc7. Something like this for qtbase:

 // (stdenv.lib.optionalAttrs (stdenv.cc.isGNU && stdenv.hostPlatform.isi686) {
      stdenv = overrideCC stdenv gcc6; # with gcc-7: undefined reference to `__divmoddi4'
    }))
@alexarice

This comment has been minimized.

Copy link
Contributor

commented Jun 28, 2019

I am also having this problem. I have bisected it to 1a6e572

coreyoconnor added a commit to coreyoconnor/nixpkgs that referenced this issue Jun 28, 2019

coreyoconnor added a commit to coreyoconnor/nixpkgs that referenced this issue Jun 29, 2019

coreyoconnor added a commit to coreyoconnor/nixpkgs that referenced this issue Jun 29, 2019

coreyoconnor added a commit to coreyoconnor/nixpkgs that referenced this issue Jun 29, 2019

@coreyoconnor

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2019

I attempted to apply @matthewbauer 's suggestion to only qt packages. The failure is the same. Perhaps a dependency also needs to compile with gcc6? Is there a way to default the i686 packages to gcc6?

@vcunat

This comment has been minimized.

Copy link
Member

commented Jun 30, 2019

--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7241,7 +7241,7 @@ in
   gerbil-unstable = callPackage ../development/compilers/gerbil/unstable.nix { stdenv = gccStdenv; };
 
   gccFun = callPackage ../development/compilers/gcc/7;
-  gcc = gcc7;
+  gcc = if stdenv.isi686 then gcc6 else gcc7;
   gcc-unwrapped = gcc.cc;
 
   gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override {

Maybe that would be a usable workaround. EDIT: at least it does make pkgsi686Linux.qt5.qtbase build again (for me).

In any case, more in-depth discussion of this was in #36947

ashkitten added a commit to ashkitten/nixpkgs that referenced this issue Jul 1, 2019

@matthewbauer matthewbauer added this to the 19.09 milestone Jul 1, 2019

@coreyoconnor

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2019

@vcunat that worked for almost everything. Except packages using -Wno-error=pointer-compare. That causes a failure. EG: dhcp:

configure:3799: checking whether the C compiler works                                                                                                                     
configure:3821: gcc    conftest.c  >&5                                                                                                                                    
cc1: error: -Werror=pointer-compare: no option -Wpointer-compare                                                                                                          
configure:3825: $? = 1                                                                                                                                                    
configure:3863: result: no                                                                                                                                                
configure: failed program was:                                                                                                                                            
| /* confdefs.h */                                                                                                                                                        
| #define PACKAGE_NAME "DHCP"                                                                                                                                             
| #define PACKAGE_TARNAME "dhcp"                                                                                                                                          
| #define PACKAGE_VERSION "4.4.1"                                                                                                                                         
| #define PACKAGE_STRING "DHCP 4.4.1"                                                                                                                                     
<snip>

I've overrideAttr the dhcp to confirm. There are ~10 other derivations using that warning. Is it necessary to override each individually?

coreyoconnor added a commit to coreyoconnor/nixpkgs that referenced this issue Jul 2, 2019

@Shados

This comment has been minimized.

Copy link
Contributor

commented Jul 6, 2019

@tadeokondrak FWIW, wine.override { gstreamerSupport = false; } works around this, assuming you don't need gstreamer support of course...

@avnik

This comment has been minimized.

Copy link
Contributor

commented Jul 8, 2019

@Shados gstreamerSupport in wine cause more problems than solve (concretely -- wrapper with gstreamer specific variables for wine64), but it completely unrelated for this case

@pmiddend pmiddend referenced this issue Jul 8, 2019

Open

moodle: init at 3.7.1 #63634

5 of 12 tasks complete
@Shados

This comment has been minimized.

Copy link
Contributor

commented Jul 9, 2019

@avnik it is unrelated to the ultimate cause, yes. It is still a useful workaround for the symptom that tadeokondrak was dealing with (being unable to build wine). I mis-judged whether or not that would be clear from context...

@sjau

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

qtbase still fails to build on latest unstable and latest unstable-small.

@matthewbauer

This comment has been minimized.

Copy link
Member

commented Jul 25, 2019

@vcunat Perhaps we can use that fix for now? Otherwise I'm not sure how to handle it without breaking something else.

@JohnAZoidberg

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

That might solve on symptom of the problem but not the root cause.
If I try to build wine on my x64 machine it wants to build some version of qtbase and that fails. Even with vcunat's patch it doesn't build.

@coreyoconnor

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

I was able to compile (almost) the full plasma 5 desktop with:

--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -7241,7 +7241,7 @@ in
   gerbil-unstable = callPackage ../development/compilers/gerbil/unstable.nix { stdenv = gccStdenv; };
 
   gccFun = callPackage ../development/compilers/gcc/7;
-  gcc = gcc7;
+  gcc = if stdenv.isi686 then gcc6 else gcc7;
   gcc-unwrapped = gcc.cc;
 
   gccStdenv = if stdenv.cc.isGNU then stdenv else stdenv.override {

To get everything to build required some application of:

However, while that passes the plasma5 test on my branch I can't actually get plasma to run on my desktop. Nor can I get many QT apps to run. Those issues may be regressions from #64720 until that's verified I'm reluctant to open a PR with those workarounds.

Tho compiling and failing is better than not compiling for dev I suppose...

@coreyoconnor coreyoconnor referenced this issue Jul 26, 2019

Merged

wrapQtAppsHook: wrap binaries in libexec #64720

1 of 10 tasks complete

@averelld averelld referenced this issue Aug 8, 2019

Merged

pkgsi686Linux.qt5.qtbase: fix build #66335

3 of 10 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
10 participants
You can’t perform that action at this time.