hasse69 / rar2fs

FUSE file system for reading RAR archives
https://hasse69.github.io/rar2fs/
GNU General Public License v3.0
275 stars 27 forks source link

Creates an empty file instead of a fuse filesystem #105

Closed doronbehar closed 5 years ago

doronbehar commented 5 years ago

I have this very large RAR file - 47GB size and when I mount it with rar2fs I see only an empty file with the same name as the archive inside the mount point. I've tried extracting some of the files from the original archive and recreating a RAR file with them only and rar2fs handled that archive with no problem.

If anyone would like to help in testing rar2fs with this specific archive file, I can contact you privately and hand you a link to the archive, my email is me AT doronbehar.com or if you prefer my Gmail address which is available in my profile page.

hasse69 commented 5 years ago

Thanks for the issue report. I will try to look into this asap.

hasse69 commented 5 years ago

I was able to obtain the archive in question but unfortunately I am not able to reproduce the problem. I mounted the archive and compared the directory tree with that of WinRAR and I could not see any differences.

I used latest released version of rar2fs (v1.27.1) in combination with unrarsrc v5.6.8 (statically linked).

doronbehar commented 5 years ago

Thanks for insisting on resolving this issue. I've updated my rar2fs with unrarsrc v5.6.8 (previously I had v5.6.7 of it) and I compiled rar2fs like so:

./configure --prefix=/usr --sbindir=/usr/bin --with-unrar=../unrar

From what I understood from the discussion in https://github.com/hasse69/rar2fs/issues/100, this is supposed to create a rar2fs executable statically linked tounrarsrc? I'm not sure this brings the same result as you've had in your compliation since ldd /usr/bin/rar2fs shows:

    linux-vdso.so.1 (0x00007ffd41e9a000)
    libfuse.so.2 => /usr/lib/libfuse.so.2 (0x00007f4d44b3c000)
    libunrar.so => /usr/lib/libunrar.so (0x00007f4d44ae1000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f4d44952000)
    librt.so.1 => /usr/lib/librt.so.1 (0x00007f4d44948000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f4d4492e000)
    libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f4d4490d000)
    libc.so.6 => /usr/lib/libc.so.6 (0x00007f4d44747000)
    libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f4d44742000)
    libm.so.6 => /usr/lib/libm.so.6 (0x00007f4d445bd000)
    /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f4d44bcd000)
hasse69 commented 5 years ago

The problem is that you did not build the library itself? You need to enter the unrar folder and do make lib, that will create the libunrar.a archive file which then is picked up by rar2fs automatically, after you configure the package. Since you probably did not build the library rar2fs picked it up from whatever was installed on your system in /usr/lib. This would explain why you experience this problem since you are using a different version in compile- and run-time and then behavior is undefined. So in your case the proper steps would be:

cd ../unrar
make lib
cd -
/configure --prefix=/usr --sbindir=/usr/bin --with-unrar=../unrar
make
doronbehar commented 5 years ago

That solved it! Thanks a lot for your support.