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

stdenv_32bit.gcc is broken, breaking e.g. virtualbox #14465

Closed
sjau opened this issue Apr 5, 2016 · 15 comments
Closed

stdenv_32bit.gcc is broken, breaking e.g. virtualbox #14465

sjau opened this issue Apr 5, 2016 · 15 comments
Labels
0.kind: bug Something is broken

Comments

@sjau
Copy link

sjau commented Apr 5, 2016

Issue description

Virtualbox fails to compile

/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]
/tmp/nix-build-cuneiform-1.1.0.drv-0/cuneiform-linux-1.1.0/cuneiform_src/Kern/std/src/stdprt.cpp:98:4: warning: deprecated conversion from string constant to 'char*' [-Wwrite-strings]

  Cannot execute 32-bit applications! Either enable 32-bit support in the
  kernel configuration or use --disable-vmmraw to disable 32-bit guests.
Check /tmp/nix-build-virtualbox-5.0.14-4.4.6.drv-0/VirtualBox-5.0.14/configure.log for details
builder for ‘/nix/store/x3ngqp09rlc8jmsvz0v31sjidpcqfmg4-virtualbox-5.0.14-4.4.6.drv’ failed with exit code 1
cannot build derivation ‘/nix/store/nngkx78dk7gd16k1byqn34ffsl92j04x-nixos-system-subi-16.09pre79976.cb44efc.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/nngkx78dk7gd16k1byqn34ffsl92j04x-nixos-system-subi-16.09pre79976.cb44efc.drv’ failed

Steps to reproduce

Use unstable small repo

Technical details

  • System: (NixOS: nixos-version, Ubuntu/Fedora: lsb_release -a, ...)

16.09pre79294.c58c1f3 (Flounder)

  • Nix version: (run nix-env --version)

nix-env (Nix) 1.11.2

@jcumming
Copy link
Contributor

jcumming commented Apr 5, 2016

When I looked quickly, the 32b toolchain was setting the interpreter be the 64b ld.so.

@vcunat
Copy link
Member

vcunat commented Apr 5, 2016

http://hydra.nixos.org/job/nixos/trunk-combined/nixpkgs.linuxPackages.virtualbox.x86_64-linux
I think the multi-bit toolchain is broken since merging #14000.

@vcunat vcunat added the 0.kind: bug Something is broken label Apr 5, 2016
@domenkozar
Copy link
Member

Note: this is blocking channel update for trunk-combined.

@obadz
Copy link
Contributor

obadz commented Apr 5, 2016

cc @nbp

@obadz
Copy link
Contributor

obadz commented Apr 5, 2016

also cc-ing vbox maintainer @svanderburg

@vcunat vcunat changed the title Virtualbox complainitng about 32-bit support stdenv_32bit.gcc is broken, breaking e.g. virtualbox Apr 5, 2016
@vcunat
Copy link
Member

vcunat commented Apr 5, 2016

Interesting, gcc produces a 32-bit executable but sets a 64-bit interpreter to it:

$ nix-build -Q -A stdenv_32bit.cc
$ ./result/bin/gcc -m32 ../tests/hello.c
$ file a.out 
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /nix/store/k2pbdqpql203amyi3rn8as5kwskkaqc1-glibc-multi-2.23/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped

I've got no idea why that would happen, especially in connection with merging that PR.

@abbradar
Copy link
Member

abbradar commented Apr 5, 2016

@vcunat Can you do the same but with NIX_DEBUG on? Might show up something.

@vcunat
Copy link
Member

vcunat commented Apr 5, 2016

Right, it confirms my suspicion – we pass the wrong loader explicitly.

@vcunat
Copy link
Member

vcunat commented Apr 5, 2016

Oh, I see... this should be fixed by a staged commit 6c9ce23. Let me check it.

@vcunat
Copy link
Member

vcunat commented Apr 5, 2016

Fortunately we have those in binary cache, and my hello example works fine there :-)

@vcunat
Copy link
Member

vcunat commented Apr 5, 2016

Looking at the branch status, I expect we can merge it soon – I see no big regressions and there are just ~12k jobs in queue. http://hydra.nixos.org/eval/1252653#tabs-now-fail

@abbradar
Copy link
Member

abbradar commented Apr 5, 2016

Ouch, sorry again for breaking this D:

@nbp
Copy link
Member

nbp commented Apr 5, 2016

@vcunat I do not think this is #14000, as I verified that I got the same checksums, and this also includes some pkgsi686 packages. Otherwise, if I am wrong, a bisect should tell you which commit caused the problem.

I guess this is more likely to be the stdenv merge which happened after #14000. In which case we might also have the problem on 16.03.

@vcunat
Copy link
Member

vcunat commented Apr 5, 2016

@nbp: we found the cause of the problem in the meantime (above) and it was something different that was merged about the same time (but it didn't get into 16.03).

@vcunat
Copy link
Member

vcunat commented Apr 6, 2016

It builds on master now.

@vcunat vcunat closed this as completed Apr 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

7 participants