The Unarchiver (1000)

949 Name: jjmarin : 2011-06-18 14:28 ID:5XJ/UNvX [Del]

I clone the theunarchiver repository hosted at Google Code and I compiled on my GNU/Linux Fedora 15 box

$ make -f Makefile.linux
gcc -std=gnu99 -c -O2 -Wno-import -Wno-multichar -g -D_FILE_OFFSET_BITS=64 -isystem /usr/include/GNUstep -DGNUSTEP -DGNU_RUNTIME=1 -D_NATIVE_OBJC_EXCEPTIONS -fgnu-runtime -fexceptions -fobjc-exceptions -fconstant-string-class=NSConstantString unar.m -o unar.o
In file included from /usr/include/Foundation/NSClassDescription.h:30:0,

             from /usr/include/Foundation/Foundation.h:50,
from XADUnarchiver.h:1,
from unar.m:1:

/usr/include/Foundation/NSException.h:42:2: error: #error The current setting for native-objc-exceptions does not match that of gnustep-base ... please correct this.

Searching on the web, I found a workaround for this problem [1] by changing the line

#define BASE_NATIVE_OBJC_EXCEPTIONS 0

from /usr/include/GNUstepBase/GSConfig.h into

#define BASE_NATIVE_OBJC_EXCEPTIONS 1

The next message error was

gcc -Wl,--whole-archive -fexceptions -fgnu-runtime -o unar unar.o CSCommandLineParser.o CommandLineCommon.o NSStringPrinting.o libXADMaster.a ../UniversalDetector/libUniversalDetector.a -Wl,--no-whole-archive -lgnustep-base -lcrypto -lbz2 -licuuc -lobjc -lstdc++ -lm
/usr/bin/ld: libXADMaster.a(CSZlibHandle.o): undefined reference to symbol 'inflateInit2_'
/usr/bin/ld: note: 'inflateInit2_' is defined in DSO /lib/libz.so.1 so try adding it to the linker command line
/lib/libz.so.1: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make: *** [unar] Error 1

as stated [2] and [3] I fixed this by adding -lz ([3] comments that Fedora have a setting preventing gcc of
implicit linking.)

OK, after that I've got lsar and unar binaries. Great !

However, I've found there I've got this problem descompressing rar files (both with lsar and unar):

$ ./lsar ~/Desktop/example.rar
/home/jjmarin/Desktop/Evince/example.rar :
1.jpg
2.jpg
./lsar: Uncaught exception CSEndOfFileException, reason: Attempted to read past the end of file "/home/jjmarin/Desktop/Evince/example.rar" (XADFileHandle).

Any idea about this ? Has something to do with the BASE_NATIVE_OBJC_EXCEPTIONS change?

Links:
[1] http://www.mail-archive.com/[email protected]/msg12043.html
[2] http://wakaba.c3.cx/sup/kareha.pl/1151796773/l50
[3] http://groups.google.com/group/harbour-devel/browse_thread/thread/1d0c52b293f35c53?pli=1

This thread has been closed. You cannot post in this thread any longer.