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

bcache-tools doesn't cross-compile #90726

Closed
flokli opened this issue Jun 18, 2020 · 1 comment · Fixed by #91109
Closed

bcache-tools doesn't cross-compile #90726

flokli opened this issue Jun 18, 2020 · 1 comment · Fixed by #91109
Assignees
Labels
0.kind: bug Something is broken 6.topic: cross-compilation Building packages on a different platform than they will be used on

Comments

@flokli
Copy link
Contributor

flokli commented Jun 18, 2020

This is pulled in unconditionally by nixos/modules/tasks/bcache.nix and fails during NixOS cross-compilation:

unpacking sources
unpacking source archive /nix/store/rgwm01hfhmbba4nbfbayimb81v9wqrnb-bcache-tools-1.0.7.tar.gz
source root is bcache-tools-1.0.7
setting SOURCE_DATE_EPOCH to timestamp 1399729101 of file bcache-tools-1.0.7/probe-bcache.c
patching sources
applying patch /nix/store/2q3z7587yhlz0i2xvfvvap42zk5carlv-bcache-udev-modern.patch
patching file 69-bcache.rules
patching file Makefile
Hunk #1 succeeded at 9 with fuzz 1.
patching file bcache-register
applying patch /nix/store/03sl46khd8gmjpsad7223m32ma965vy9-fix-static.patch
patching file bcache.c
updateAutotoolsGnuConfigScriptsPhase
configuring
no configure script, doing nothing
building
build flags: SHELL=/nix/store/n313xks5ym0s0a5v8a5285rmnmvy6ms9-bash-4.4-p23/bin/bash PREFIX=\"/nix/store/49rwsqj9h0r5sw85p1yyhf9nrm5c5xd2-bcache-tools-1.0.7-armv7l-unknown-linux-gnueabihf\" UDEVLIBDIR=\"/nix/store/49rwsqj9h0r5sw85p1yyhf9nrm5c5xd2-bcache-tools-1.0.7-armv7l-unknown-linux-gnueabihf/lib/udev/\"
armv7l-unknown-linux-gnueabihf-gcc -O2 -Wall -g `pkg-config --cflags uuid blkid`   -c -o bcache.o bcache.c
/nix/store/n313xks5ym0s0a5v8a5285rmnmvy6ms9-bash-4.4-p23/bin/bash: pkg-config: command not found
armv7l-unknown-linux-gnueabihf-gcc -O2 -Wall -g `pkg-config --cflags uuid blkid`    make-bcache.c bcache.o  `pkg-config --libs uuid blkid` -o make-bcache
/nix/store/n313xks5ym0s0a5v8a5285rmnmvy6ms9-bash-4.4-p23/bin/bash: pkg-config: command not found
/nix/store/n313xks5ym0s0a5v8a5285rmnmvy6ms9-bash-4.4-p23/bin/bash: pkg-config: command not found
make-bcache.c:11:10: fatal error: blkid.h: No such file or directory
   11 | #include <blkid.h>
      |          ^~~~~~~~~
compilation terminated.
make: *** [<builtin>: make-bcache] Error 1
builder for '/nix/store/136dpzlngrv5v7z7d7as7k2pj318npwa-bcache-tools-1.0.7-armv7l-unknown-linux-gnueabihf.drv' failed with exit code 2

I'm also unsure if we still need the boot.initrd.extraUdevRulesCommands / cc @bjornfor 5b48368

cc @NixOS/exotic-platform-maintainers

@flokli flokli added the 0.kind: bug Something is broken label Jun 18, 2020
@veprbl veprbl added the 6.topic: cross-compilation Building packages on a different platform than they will be used on label Jun 18, 2020
@primeos
Copy link
Member

primeos commented Jun 19, 2020

I've just opened #91109 which fixes the cross compilation. Not sure if it's the most elegant way to fix it though.

primeos added a commit to primeos/nixpkgs that referenced this issue Jun 19, 2020
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 6.topic: cross-compilation Building packages on a different platform than they will be used on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants