EnzephaloN / ncpfs_dkms

a ncpfs-module for kernel >= 4.18 and dkms
5 stars 1 forks source link

Error compiling on kernel 5.4.0-150 #12

Closed bpranoto closed 1 year ago

bpranoto commented 1 year ago

dkms build failed on linux mate 20.04 with kernel 5.4.0-150.

$ uname -r
5.4.0-150-generic

$ git branch
* kernel_5.2
  kernel_5.6
  master

$ sudo dkms build -m ncpfs -v 2.2.6

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
KDIR=/lib/modules/5.4.0-150-generic/build MDIR=/lib/modules/5.4.0-150-generic make SKIP_STACK_VALIDATION=1...(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.0-150-generic (x86_64)
Consult /var/lib/dkms/ncpfs/2.2.6/build/make.log for more information.

The make.log is attached make.log

EnzephaloN commented 1 year ago

Because you have copied wrong branch to /usr/src/ncpfs-2.2.6, you now trying to compile the version for kernel >= 6.3. If you check your make.log you will see in example error /var/lib/dkms/ncpfs/2.2.6/build/dir.c:34:30: warning: ‘struct mnt_idmap’ declared inside parameter list will not be visible outside of this definition or declaration, but mnt_idmap was introduced in kernel_6.3.

Solution 1:

sudo -s
cd /usr/src/ncpfs*
git checkout kernel_5.2
dkms build -m ncpfs -v 2.2.6 && dkms install -m ncpfs -v 2.2.6 || true

Solution 2:

cd ~
sudo -s
rm /usr/src/ncpfs*
git clone https://github.com/EnzephaloN/ncpfs_dkms.git ncpfs
cp -r ncpfs /usr/src/ncpfs-2.2.6
dkms build -m ncpfs -v 2.2.6 && dkms install -m ncpfs -v 2.2.6 || true