hasse69 / rar2fs

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

unrar 6.2.6 build error w/ rar2fs1.29.6 #182

Closed KyleSanderson closed 1 year ago

KyleSanderson commented 1 year ago

6.2.5 seems to be the last version that builds.

/usr/bin/ld: /tmp/tmp.V8m5HosjLq/unrar/libunrar.a(extract.o): in function `CmdExtract::ExtractCurrentFile(Archive&, unsigned long, bool&)': extract.cpp:(.text+0x29c6): undefined reference to `RecVolumesRestore(CommandData*, wchar_t const*, bool)' /usr/bin/ld: /tmp/tmp.V8m5HosjLq/unrar/libunrar.a(extract.o): in function `CmdExtract::ExtractArchive()': extract.cpp:(.text+0x3bec): undefined reference to `RecVolumesTest(CommandData*, Archive*, wchar_t const*)' /usr/bin/ld: extract.cpp:(.text+0x3dcb): undefined reference to `RecVolumesTest(CommandData*, Archive*, wchar_t const*)' /usr/bin/ld: /tmp/tmp.V8m5HosjLq/unrar/libunrar.a(volume.o): in function `MergeArchive(Archive&, ComprDataIO*, bool, wchar_t)': volume.cpp:(.text+0x1d1): undefined reference to `RecVolumesRestore(CommandData*, wchar_t const*, bool)' collect2: error: ld returned 1 exit status

FROM ubuntu:jammy
RUN UNRAR_VERSION=6.2.6 && \
RAR2FS_VERSION=1.29.6 && \
WORKDIR=`mktemp -d` && cd $WORKDIR && \
apt-get -q update && \
apt-get -qy install wget make libfuse-dev g++ && \
wget https://www.rarlab.com/rar/unrarsrc-${UNRAR_VERSION}.tar.gz && \
tar zxvf unrarsrc-${UNRAR_VERSION}.tar.gz && \
cd unrar && \
export CPPFLAGS="-O2 -fPIC" && make && make install && \
make lib && make install-lib && \
cd .. && \
wget https://github.com/hasse69/rar2fs/releases/download/v${RAR2FS_VERSION}/rar2fs-${RAR2FS_VERSION}.tar.gz -O rar2fs-${RAR2FS_VERSION}.tar.gz && \
tar zxvf rar2fs-${RAR2FS_VERSION}.tar.gz && \
cd rar2fs-${RAR2FS_VERSION} && \
./configure --with-unrar=../unrar --with-unrar-lib=/usr/lib/ && \
make && make install
hasse69 commented 1 year ago

Is this a report of build problems with rar2fs or unrarsrc? Looks like the latter to me. In fact, I cannot seem to build any 6.2.x versions, the last working buildable version for me is 6.1.8. So something have changed in unrarsrc from RARLabs that requires a more recent C++ compiler?

tfiskgul commented 1 year ago

On Gentoo, unrar-6.2.3 and rar2fs-1.29.5 builds fine with gcc-12.2.1

hasse69 commented 1 year ago

I am on a much older version of gcc/g++ and currently don't have the possibility to upgrade, which means this is going to be difficult for me to investigate right now.

hasse69 commented 1 year ago

Luckily I could find a host for which I was able to install gcc-12.1.0. For me it works just fine to build unrarsrc-6.2.6 in combination with latest version of rar2fs.

KyleSanderson commented 1 year ago

Yeah, it's unrarsrc with the issue it seems like.

I highly recommend buildah if you can swing it, then you can remove the artifacts out if that's your preference.

hasse69 commented 1 year ago

Not sure what you mean really. The unrarsrc is a completely separate buildable package but rar2fs requires access to some of its private source files (headers).

hasse69 commented 1 year ago

Can this issue be closed?

KyleSanderson commented 1 year ago

Yes it can.