dagargo / emu3fs

Linux kernel module for the E-Mu EIII and EIV sampler filesystems

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error during 'make && sudo make install'

score100 opened this issue · comments

Thanks for making this incredible software for all us e-mu users! Unfortunately I get an error when trying to install, running linux mint. This is what happens after make && sudo make install:

make -C /lib/modules/uname -r/build M=$PWD make[1]: Entering directory '/usr/src/linux-headers-5.4.0-164-generic' CC [M] /home/moritz/AdditionalPrograms/emu3fs/file.o /home/moritz/AdditionalPrograms/emu3fs/file.c:82:54: warning: ‘struct folio’ declared inside parameter list will not be visible outside of this definition or declaration 82 | static int emu3_read_folio(struct file *file, struct folio *folio) | ^~~~~ /home/moritz/AdditionalPrograms/emu3fs/file.c: In function ‘emu3_read_folio’: /home/moritz/AdditionalPrograms/emu3fs/file.c:84:9: error: implicit declaration of function ‘block_read_full_folio’; did you mean ‘block_read_full_page’? [-Werror=implicit-function-declaration] 84 | return block_read_full_folio(folio, emu3_get_block); | ^~~~~~~~~~~~~~~~~~~~~ | block_read_full_page /home/moritz/AdditionalPrograms/emu3fs/file.c: In function ‘emu3_write_begin’: /home/moritz/AdditionalPrograms/emu3fs/file.c:96:46: warning: passing argument 4 of ‘block_write_begin’ makes integer from pointer without a cast [-Wint-conversion] 96 | return block_write_begin(mapping, pos, len, pagep, emu3_get_block); | ^~~~~ | | | struct page ** In file included from /home/moritz/AdditionalPrograms/emu3fs/emu3_fs.h:23, from /home/moritz/AdditionalPrograms/emu3fs/file.c:21: ./include/linux/buffer_head.h:262:12: note: expected ‘unsigned int’ but argument is of type ‘struct page **’ 262 | unsigned flags, struct page **pagep, get_block_t *get_block); | ~~~~~~~~~^~~~~ /home/moritz/AdditionalPrograms/emu3fs/file.c:96:53: error: passing argument 5 of ‘block_write_begin’ from incompatible pointer type [-Werror=incompatible-pointer-types] 96 | return block_write_begin(mapping, pos, len, pagep, emu3_get_block); | ^~~~~~~~~~~~~~ | | | int (*)(struct inode *, sector_t, struct buffer_head *, int) {aka int (*)(struct inode *, long long unsigned int, struct buffer_head *, int)} In file included from /home/moritz/AdditionalPrograms/emu3fs/emu3_fs.h:23, from /home/moritz/AdditionalPrograms/emu3fs/file.c:21: ./include/linux/buffer_head.h:262:33: note: expected ‘struct page **’ but argument is of type ‘int (*)(struct inode *, sector_t, struct buffer_head *, int)’ {aka ‘int (*)(struct inode *, long long unsigned int, struct buffer_head *, int)’} 262 | unsigned flags, struct page **pagep, get_block_t *get_block); | ~~~~~~~~~~~~~~^~~~~ /home/moritz/AdditionalPrograms/emu3fs/file.c:96:9: error: too few arguments to function ‘block_write_begin’ 96 | return block_write_begin(mapping, pos, len, pagep, emu3_get_block); | ^~~~~~~~~~~~~~~~~ In file included from /home/moritz/AdditionalPrograms/emu3fs/emu3_fs.h:23, from /home/moritz/AdditionalPrograms/emu3fs/file.c:21: ./include/linux/buffer_head.h:261:5: note: declared here 261 | int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, | ^~~~~~~~~~~~~~~~~ /home/moritz/AdditionalPrograms/emu3fs/file.c: At top level: /home/moritz/AdditionalPrograms/emu3fs/file.c:150:3: error: ‘const struct address_space_operations’ has no member named ‘read_folio’ 150 | .read_folio = emu3_read_folio, | ^~~~~~~~~~ /home/moritz/AdditionalPrograms/emu3fs/file.c:150:16: error: initialization of ‘int (*)(struct page *, struct writeback_control *)’ from incompatible pointer type ‘int (*)(struct file *, struct folio *)’ [-Werror=incompatible-pointer-types] 150 | .read_folio = emu3_read_folio, | ^~~~~~~~~~~~~~~ /home/moritz/AdditionalPrograms/emu3fs/file.c:150:16: note: (near initialization for ‘emu3_aops.writepage’) /home/moritz/AdditionalPrograms/emu3fs/file.c:152:17: error: initialization of ‘int (*)(struct file *, struct address_space *, loff_t, unsigned int, unsigned int, struct page **, void **)’ {aka ‘int (*)(struct file *, struct address_space *, long long int, unsigned int, unsigned int, struct page **, void **)’} from incompatible pointer type ‘int (*)(struct file *, struct address_space *, loff_t, unsigned int, struct page **, void **)’ {aka ‘int (*)(struct file *, struct address_space *, long long int, unsigned int, struct page **, void **)’} [-Werror=incompatible-pointer-types] 152 | .write_begin = emu3_write_begin, | ^~~~~~~~~~~~~~~~ /home/moritz/AdditionalPrograms/emu3fs/file.c:152:17: note: (near initialization for ‘emu3_aops.write_begin’) /home/moritz/AdditionalPrograms/emu3fs/file.c: In function ‘emu3_write_begin’: /home/moritz/AdditionalPrograms/emu3fs/file.c:97:1: error: control reaches end of non-void function [-Werror=return-type] 97 | } | ^ /home/moritz/AdditionalPrograms/emu3fs/file.c: At top level: /home/moritz/AdditionalPrograms/emu3fs/file.c:169:1: fatal error: opening dependency file /home/moritz/AdditionalPrograms/emu3fs/.file.o.d: Permission denied 169 | }; | ^ cc1: some warnings being treated as errors compilation terminated. make[2]: *** [scripts/Makefile.build:270: /home/moritz/AdditionalPrograms/emu3fs/file.o] Error 1 make[1]: *** [Makefile:1778: /home/moritz/AdditionalPrograms/emu3fs] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-164-generic' make: *** [Makefile:8: all] Error 2

Thanks for your words.

Looks like the issue is in the tag you're using but some reminders first.

  • As the module is outside the kernel, the release versions in the repo match the kernel version against which it compiles.
  • As I haven't added tags for every Linux version and the project has kept evolving, it might happen that certain emu3fs version would not be available for a specific kernel version.
  • Linux 5.4 is almost 4 years old.

In your case, as you're using Linux 5.4, try checking out the tag 5.8 (same as the previous one, 5.3). This should work.
But, a later emu3fs version added support for the emu4 filesystem and I don't know if this will compile against Linux 5.4. Try checking out the tags 5.14, 5.13 or emu4. If it compiles it should run.

Let me know if you manage to solve this.

Thanks. So first I hope I understand what you are saying, because I don't think I really understand what kernel tags are. Or do you mean something else by tag? Tried my best to google, feel free to enlighten.
However if I did understand correctly you're saying :

  • I am using an outdated Kernel
  • Using the 5.8,5.14, 5.13 should work
  • The software might not compile for some kernels

I tried

  • Installing 5.8 kernel and compiling again. Same errors
  • Installing 5.13 kernel. Also don't manage to compile here. The kernel is badly supported by my current system however, so no idea if it is related.

Thanks for all your help already!

So sorry I didnt't explain myself right.

What I meant is that you'd need to use some emu3fs repo tag. Since you have installed Linux 5.13, try to checkout the tag 5.13 and compile.

$ git checkout 5.13
$ make && sudo make install

The tags used in the emu3fs repo reflect the version of the kernel against which the module compiles.
For instance, the tag 5.13 is guaranteed to compile against Linux 5.13 but it's not guaranteed to compile against other versions because of the changes in the kernel API. But checking out the tag 5.14 or even the commit cb1bb11 should work as there are no API changes related to filesystems.
Another example is that tag 6.1 will not compile against Linux 5.14 because of newer API changes.

As a rule of thumb, try with the newest tags and go for an older one if it doesn't compile.

It'd have been possible to have manage the versions in another way and have an independent numbers but it's too much work, sorry.

I must have tried like 5 different tags by now using three different kernels and none of em compiled correctly :(
To give you an excerpt, using kernel 5.8.16:
Using emu4 tag:
sudo make install make -C /lib/modules/uname -r`/build M=$PWD modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.8.16-050816-generic'
INSTALL /home/moritz/AdditionalPrograms/emu3fs-emu4/emu3_fs.ko
At main.c:160:

  • SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
    sign-file: certs/signing_key.pem: No such file or directory
    DEPMOD 5.8.16-050816-generic
    Warning: modules_install: missing 'System.map' file. Skipping depmod.
    make[1]: Leaving directory '/usr/src/linux-headers-5.8.16-050816-generic'
    `
    Getting the same when using 5.14 tag. 5.8. tag didn't work either. Neither did 5.13 using a 5.13 kernel.

Those SSL errors are unrelated to emu3fs or the tags. It is something related with module signing, which is something my systems (Debian) don't use.

Searching over that error showed these issues in another project where there are some explanations for the error.

umlaeute/v4l2loopback#122
umlaeute/v4l2loopback#139

They say it just means the signature is not available but the compilation completes and everything else works.

So, isn't the module really built? Have you tried to run sudo modprobe emu3_fs?

Hi, yes when I try to run sudo modprobe emu3_fs I get :
modprobe: FATAL: Module emu3_fs not found in directory /lib/modules/5.8.16-050816-generic
Which leads me to something going wrong in the compilation process. But feel free to correct me.

Ok I managed to fix this using

sudo make
sudo depmod
sudo make all install clean
sudo modprobe emu3_fs 

In the next days I will now try actually getting to use the software and see if I can mount my ZuluSCSI drive. Thanks a bunch already for your help :)

Great it's working now!

I think the installation issue is due to not running sudo depmod. Perhaps, I should add this to the docs because I actually run this every time I change the kernel version.

The compilation command should be make && sudo make install && sudo depmod.

I've just updated the instructions to reflect depmod.

So, is emu3fs working for you? Can we close this issue?

Don't forget to star the project -if you haven't already- to be notified of new releases.

Hi, so yes it is working to compile and use. However, I have to recompile it after restarting my system. Which means I have to compile it pretty much every time I use it >_<

Which means I have to compile it pretty much every time I use it >_<

Are you sure? I don't think that is needed. It will only be needed whenever the kernel changes.

But doing sudo modprobe emu3_fs is unless you set up your system to insert the module at boot.

I'm closing this.

Feel free to reopen if needed,