Closed GoogleCodeExporter closed 9 years ago
See issue#2
Makefile is still not updated properly.
Original comment by hans.bec...@gmail.com
on 16 Jul 2011 at 8:27
Thank you! Though now I don't get past this:
$ make
g++ -g -rdynamic -fno-omit-frame-pointer -O2 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DRARDLL -MD -Iunrar -c
dllext.cpp
g++ -g -rdynamic -fno-omit-frame-pointer -O2 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DRARDLL -MD -Iunrar -c
extractext.cpp
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -MD -Iunrar
-I/usr/include/fuse -c configdb.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -MD -Iunrar
-I/usr/include/fuse -c filecache.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -MD -Iunrar
-I/usr/include/fuse -c iobuffer.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -MD -Iunrar
-I/usr/include/fuse -c sighandler.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -MD -Iunrar
-I/usr/include/fuse -c rar2fs.c
gcc -o rar2fs dllext.o extractext.o configdb.o filecache.o iobuffer.o
sighandler.o rar2fs.o -L -L/usr/lib -lunrar -pthread -lfuse
/usr/bin/ld.bfd.real: cannot find -lunrar
collect2: ld returned 1 exit status
make: ** [rar2fs] Erro 1
I can't set UNRAR_LIB=, since there is no unrarlib.so in Debian. I placed the
unrar source in the tree, shouldn't it be enough?
Original comment by teresaejunior
on 16 Jul 2011 at 8:40
No. If your platform does not provide libunrar.so you need to build it from the
unrar source.
make -f makefile.unix lib should do it. Check the source tree, it should
provide instructions on how to build.
Original comment by hans.bec...@gmail.com
on 16 Jul 2011 at 11:54
Thank you again! They build the unrar binary from the source, but not the
library!
Now I'm stuck on the problem mentioned at
https://code.google.com/p/rar2fs/issues/detail?id=3
g++ -g -rdynamic -fno-omit-frame-pointer -O2 -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -DRARDLL -MD
-I../unrar -c dllext.cpp
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -I/usr/include -MD
-I../unrar -I/usr/include -c configdb.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -I/usr/include -MD
-I../unrar -I/usr/include -c filecache.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -I/usr/include -MD
-I../unrar -I/usr/include -c iobuffer.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -I/usr/include -MD
-I../unrar -I/usr/include -c sighandler.c
gcc -g -rdynamic -fno-omit-frame-pointer -O2 -std=c99 -Wall
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
-DHAS_GLIBC_CUSTOM_STREAMS_ -DRARDLL -DFUSE_USE_VERSION=27 -I/usr/include -MD
-I../unrar -I/usr/include -c rar2fs.c
gcc -o rar2fs dllext.o configdb.o filecache.o iobuffer.o sighandler.o rar2fs.o
-L../unrar -L/usr/lib -lunrar -pthread -lrt -lfuse
../unrar/libunrar.so: undefined reference to `RecVolumes::~RecVolumes()'
../unrar/libunrar.so: undefined reference to `RecVolumes::Restore(RAROptions*,
char const*, wchar_t const*, bool)'
../unrar/libunrar.so: undefined reference to `RecVolumes::RecVolumes()'
collect2: ld returned 1 exit status
make: ** [rar2fs] Error 1
Unfortunately cleaning the source with `make clean' before doing a `make'
doesn't help. I don't understand much of C, so I placed -fPIC in CFLAGS and
CXXFLAGS, maybe the wrong place, so it doesn't help either.
I really appreciate if you can help me further!
Original comment by teresaejunior
on 16 Jul 2011 at 9:28
Sounds strange that your platform should require specific placement independent
code switches at compile time? Have you tried to upgrade to a later version of
gcc?
In any case -fPIC should not be applied to the binary itself (the one with the
main() function). It should be applied to shared object files (.so). So it is
the makefile.unix in the unrar source tree that should be changed, not the
makefiles for rar2fs.
Original comment by hans.bec...@gmail.com
on 19 Jul 2011 at 8:11
Another thing that sounds odd is that your platform provides the unrar binary
but not the shared libs that belongs to it? Is it built statically? That would
surprise me!?
What is the output from 'ldd' on your unrar binary? Eg. 'ldd
/usr/local/bin/unrar'
Original comment by hans.bec...@gmail.com
on 19 Jul 2011 at 10:10
Thank you, hans! Now it works!
I found strange that i didn't work with one rar file I had on my machine.
rar2fs didn't complain, but the mount was defective and would throw a fuse
error: "ls: cannot access /home/teresaejunior/mountpoint: Transport endpoint is
not connected"
But now I got to try with one more rar file and it works well. I'll try with
more rar files when I'm able to!
$ ldd /usr/bin/unrar
linux-gate.so.1 => (0xb7730000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7623000)
libm.so.6 => /lib/libm.so.6 (0xb75fd000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb75de000)
libc.so.6 => /lib/libc.so.6 (0xb7499000)
/lib/ld-linux.so.2 (0xb7731000)
Original comment by teresaejunior
on 19 Jul 2011 at 10:17
Ok. I totally forgot that the unrar binary actually does not use the shared lib
itself. But what made it work for you, did you have to add -fPIC to the
makefile.unix ?
Original comment by hans.bec...@gmail.com
on 19 Jul 2011 at 11:13
No packages in Debian depend on libunrar.so. So, I believe they prefer to leave
non-free stuff out when not needed.
Yes, I had to add it to makefile.unix!
BTW, I have now tested it with other archives and it works well. Thank you,
again!
Original comment by teresaejunior
on 20 Jul 2011 at 12:18
Good to hear that issue is solved.
I might have to add an entry in the FAQ for -fPIC.
Case closed.
Original comment by hans.bec...@gmail.com
on 20 Jul 2011 at 8:34
Original issue reported on code.google.com by
teresaejunior
on 16 Jul 2011 at 2:17