Cannot find stubs-32.h

Hi, I’m trying to compile rust source code into a library (lib*.so) that can be used by android devices. However I got stuck when the cargo build command cannot find the stubs-32.h of a particular glibc-dev. I checked the other glibc-devs inside /nix/store and they have that header file. How can the glibc-dev that is used by my system get that header file? Thanks for the help :slight_smile:

1 Like

anyone has any ideas how to go around this?

To give some context on this

As you can see the glibc-dev that is used by my system doesn’t have that header file while the other glibc-dev that got installed before has one. Can somebody help me? Im stuck with this, thanks :slight_smile:

1 Like

looks like i’m in a similar situation:

$ find /nix/store/ -name stubs-32.h
find: ‘/nix/store/3b23rc9iqglir3kbq1rs3plagr0ffx05-vm-test-run-certmgr-systemd.drv.chroot’: Permission denied
$ nix-build -A
$ ls ./result-dev/include/gnu/
lib-names-64.h  lib-names.h  libc-version.h  stubs-64.h  stubs.h


$ nix-build -A
$ ls ./result-dev/include/gnu/
lib-names-32.h  lib-names.h  libc-version.h  stubs-32.h  stubs.h

in short, glibc -> pkgsi686Linux.glibc

It’s probably safer to use glibc_multi for this (or gccMultiStdenv). I think there’s a few headers that are just available for arm32, and won’t be in i686-linux.

wasn’t aware of these, :slight_smile:

Based on what I have read said so far, I created a shell.nix that has pkgsi686Linux.glibc inside the buildInputs. I used that to enter into a nix shell and the cargo build command seems to be working now ( because I’m getting another error :smiley: ). Last question though… Is it possible that the 64bit glibc have those 32bit header files from pkgsi686Linux.glibc?

What’s the difference between those and multiStdenv?

And when I’m using multiStdenv, how do I get to the lib64 directory? Using leads me to /lib, not /lib64. Neither does