Missing `/scripts/basic/fixdep` file during build

Hello! I’m trying to build a custom kernel module during the Dockerfile build step (something that has succeeded in the past, before the Balena rollout).

The build fails during execution of:
./build.sh $balena_machine_type $balenaOS_version my_module

And the output looks like:

[my_container] make: Entering directory '/tmp/tmp.fVNOF7P83x'
[my_container] CC [M] /usr/src/app/my_module_raspberrypi3_2.15.1+rev2.dev/my_module.o
[my_container] /bin/sh: 1: scripts/basic/fixdep: not found

The base image I’m using is resin/raspberrypi3-python:3

Am I using the wrong base image? Do I need to adjust this now that you’re transitioning to the Balena name?

Thanks.

I just retried this same build and received a different error:

[my_container] scripts/basic/fixdep: 1: scripts/basic/fixdep: Syntax error: "(" unexpected

Is this issue being investigated on your end? Otherwise receiving different outputs makes me feel insane… Thanks!

We are looking into this @dysri, but we’re not sure exactly what would cause it at the moment. We’ll let you know once we know more.

@dysri would it be possible for you to share the full source of the module you’re trying to build, so we can reproduce this ourselves?

@pimterry Certainly. It’s the driver for a Microchip MCP2221A USB-I2C chip.

You can download the module here.

Hi, checking it out, I’m able to reproduce this in general, and doesn’t look like the problem of the module. It appears to me, that fixdep is at the right place but not executable properly (right flags are setup, etc, checking with the devices team for details, this is preliminary check)

There are also other issues for newer releases, I believe, that we are still hunting down as well, see https://github.com/balena-io-playground/kernel-module-build/issues/7

We are working on resolving this, and will keep you posted!

@dysri, see https://github.com/balena-io-playground/kernel-module-build/issues/7#issuecomment-430727140.
@imrehg, I think that there is something wrong with your kernel files: just “diff -ruN” the ones for 2.15.1+rev2 with the ones for 2.13.6+rev1.

@daghemo yeah, I think this is a build issue (cc @agherzan @floion)

Looking at the 2.13.6+rev2.prod kernel modules:

$ file fixdep 
fixdep: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, BuildID[sha1]=15cb95cf6713cb59061e7fef2f802cf33b35ca7d, with debug_info, not stripped

while the tested 2.15.1+rev2.prod and 2.26.0+rev1.prod package yields:

$ file fixdep 
fixdep: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /yocto/resin-board/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=bf8a1cb96775ab66530b9464fcf8967c6a39c9a4, not stripped

which would explain why it wouldn’t work with the Pi.

We are looking into the source of this issue…

And this connects up well with the comment on that github issue.

Looking at things, the problem might have been introduced in this commit

Checking with the team, so still work-in-progress.

@imrehg @daghemo @pimterry Thank you all for investigating this issue. I have reverted back to the 2.13.6+rev1 kernel headers, and can now successfully build the image.

However, during container startup, I get the following output through my balena-cloud dashboard:

12.11.18 10:09:19 (-0800) web-app /sbin/udevd
12.11.18 10:09:19 (-0800) web-app modprobe: ERROR: ../libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.68/modules.dep.bin'

I am sharing this here because it seems like it could also be related to the system device and module handling. My web-app is modeled after this balena-io-playground example. I am aware that insmod is the recommended workaround for modprobe, but I am not actually certain what modprobe is being used for here. Any suggestions what to do? Thanks.

@imrehg running into the same issue trying to install Nvidia drivers with 2.26.0 - keep getting scripts/basic/fixdep: not found

Same error on building Intel Watchdog Resin Intel NUC Hardware WatchDog Enabling

@dysri @brice

I worked on this issue and merged a PR that fixes it for future versions of the OS

We are still working on the header tarballs for the previous OS versions.
Can you please share the exact device you are using and the exact OS version?

Thanks
ZubairLK

hey @brice, @rquant, @dysri, we have replaced a bunch of the broken kernel module header packages with newly compiled, supposedly fixed versions.

Could you please give it another try? If you try and still doesn’t work with the same fixdep issues (or new fixdep issues? hopefully not), then please let us know the exact device type and the OS version you are trying (so we can cross check whether it’s among the ones we covered). As much as I can tell from the information given above, the versions you used should be covered, but still…

Thanks, and sorry for the delay for the back-fixes!

Thanks, everything is building fine now with the latest version of the OS.

1 Like