| Summary: | Probable non-64bit-cleanness of unrar | ||
|---|---|---|---|
| Product: | Ports & Packages | Reporter: | Holger Lamm <holger> |
| Component: | Individual Port(s) | Assignee: | Andrey A. Chernov <ache> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | Latest | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Holger Lamm
2003-10-09 15:20:11 UTC
Program author (roshal@rarlab.com) informed. Dunno if he feels responsible. ---- Anwer from author ---- Date: Thu, 9 Oct 2003 21:51:18 +0600 From: Eugene Roshal <roshal@rarlab.com> Subject: Re: Probable non-64bit-cleanness in unrar Hello, Unfortunately I am not able to debug unrar for this platform myself. Please check that you set correct data types in rartypes.hpp, for example, strict 32 bits for uint32. Also you need to enable 1 byte alignment for structures in model.hpp. Now it contains '#pragma pack(1)' directive, but your compiler may require something else. Also try to disable compiler optimization, sometimes it may cause errors because of bugs in compiler. Eugene -------------------------- Responsible Changed From-To: freebsd-sparc64->freebsd-ports this is a port problem, yes it fails on sparc64, but if we had other 64bit big-en platforms, it'd fail there too.. If someone has a patch that makes this work, but doesn't have a box to try it on, I'm willing to test patches. Responsible Changed From-To: freebsd-ports->ache ache maintains unrar State Changed From-To: open->feedback If even author and sparc64 people can't fix it, I can't even more. If you'll come with patch, send it to author and me. This bug has also been reported for Gentoo Linux on the AMD64, and I believe I have a fix that should also apply to FreeBSD on sparc64. Details are here: http://bugs.gentoo.org/show_bug.cgi?id=34872 --ryan. > This bug has also been reported for Gentoo Linux on the AMD64, and I > believe I have a fix that should also apply to FreeBSD on sparc64. Fine, it works. Fixes it on Sparc64 and obviously on AMD64 as well. Here is the patch for the port. I increased PORTREVISION to make sparc64 owners update: diff -Nur unrar.orig/Makefile unrar/Makefile --- unrar.orig/Makefile Mon Jan 5 14:17:07 2004 +++ unrar/Makefile Mon Jan 5 14:22:08 2004 @@ -7,6 +7,7 @@ PORTNAME= unrar PORTVERSION= 3.20 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= archivers MASTER_SITES= http://files10.rarlab.com/rar/ diff -Nur unrar.orig/files/patch-rarvm.cpp unrar/files/patch-rarvm.cpp --- unrar.orig/files/patch-rarvm.cpp Thu Jan 1 00:00:00 1970 +++ unrar/files/patch-rarvm.cpp Mon Jan 5 13:29:42 2004 @@ -0,0 +1,13 @@ +--- rarvm.cpp.orig 2004-01-04 18:28:01.532948504 -0500 ++++ rarvm.cpp 2004-01-04 18:28:20.920001224 -0500 +@@ -791,8 +791,8 @@ + CurPos++; + if (CurByte==0xe8 || CurByte==CmpByte2) + { +- long Offset=CurPos+FileOffset; +- long Addr=GET_VALUE(false,Data); ++ int Offset=CurPos+FileOffset; ++ int Addr=GET_VALUE(false,Data); + if (Addr<0) + { + if (Addr+Offset>=0) CU, Holger On Mon, Jan 05, 2004 at 03:31:15PM +0100, Holger Lamm wrote: > +- long Offset=CurPos+FileOffset; > +- long Addr=GET_VALUE(false,Data); > ++ int Offset=CurPos+FileOffset; > ++ int Addr=GET_VALUE(false,Data); I dislike this fix, it may produce different results on different architectures. Better use types like int32_t -- Andrey Chernov | http://ache.pp.ru/ Hi, > Do you discuss this patch with RAR author? Indeed I did. Here is his answer: ------------------------------------- From: Eugene Roshal <roshal@rarlab.com> To: Holger Lamm <holger@e-gitt.net> Date: 07.01.2004 16:00 Subject: Re: Fixed: 64bit-uncleanness of unrar Hello, Thank you. I already updated unrar source on www.rarlab.com, but unfortunately I cannot recompile unrar for Sparc myself. I hope, someone will send me the updated unrar/Sparc binary. Eugene ------------------------------------- [The ports's sourcefile unrarsrc-3.2.3.tar.gz is unchanged] By the way, I noticed the current version of RAR is 3.3.4. Why not just upgrade the port? (OK, 3.3 is still beta.) Regards, Holger ----------------------- snip --------------------------- diff -Nur unrar.orig/Makefile unrar/Makefile --- unrar.orig/Makefile Mon Jan 5 15:17:07 2004 +++ unrar/Makefile Fri Jan 9 13:13:37 2004 @@ -6,11 +6,11 @@ # PORTNAME= unrar -PORTVERSION= 3.20 +PORTVERSION= 3.30 PORTEPOCH= 2 CATEGORIES= archivers MASTER_SITES= http://files10.rarlab.com/rar/ -DISTNAME= unrarsrc-3.2.3 +DISTNAME= unrarsrc-3.3.4 MAINTAINER= ache@FreeBSD.org COMMENT= Extract, view & test RAR archives diff -Nur unrar.orig/distinfo unrar/distinfo --- unrar.orig/distinfo Mon Jan 5 15:17:07 2004 +++ unrar/distinfo Fri Jan 9 13:13:51 2004 @@ -1 +1 @@ -MD5 (unrarsrc-3.2.3.tar.gz) = 1afca3128e21994042f34bcb91b4ea48 +MD5 (unrarsrc-3.3.4.tar.gz) = 56565ef8e66416a507b4403128b97990 -------------------------------------------------------- State Changed From-To: feedback->closed Looking into sources of actual port's distfile (3.3.5), this has been solved upstream. |