AVS Forum banner
  • Our native mobile app has a new name: Fora Communities. Learn more.

REQ: compiled copy of latest extract_rtv for mac os x

1288 Views 9 Replies 3 Participants Last post by  hdonzis
I have been trying for a few hours to get extract_rtv compiled for mac os x. I searched the old archive of forum posts and found a copy from 2005 but I am hoping someone can help with the most recent copy. I have downloaded the .zip file and see the file called extract_rtv.c but I have no idea how to compile this so I can run it from the terminal in os x. Any help with the compiling or a copy of the already compiled file would be appreciated.


Thanks


Rob
1 - 10 of 10 Posts
If you are saying that you downloaded the latest version of extract_rtv5 from here , the way I last compiled it on Windows was quite easy. I just unzipped the files into a directory and brought up Microsoft's Visual C++ studio and created a new project with extract_rtv.c. It compiled just fine and everything worked great.


However, if you go to the CVS directory for extract_rtv5, it also has the very simple Makefile necessary to build extract_rtv5. I would wager to guess that Makefile would work just fine on Mac OS X. There are only a couple of problems I can foresee: 1, that the include files and compile switches work correctly in Mac OS X. And, 2, that the definitions I made recently for integer sizes work correctly in Mac OS X. You may have to tweak the files a bit to get them to work correctly with Mac OS X. If you need some help, I would suggest checking out the Mac OS X compiled version of RTVPatch to see what changes were make to get it to compile correctly.


If you have to make some changes to get it to compile, it would be nice if we could get them incorporated into the common source code. So, please let us know. Here is the main project website...


Henry
See less See more
2

Quote:
Originally Posted by sandisk12345 /forum/post/0


I have been trying for a few hours to get extract_rtv compiled for mac os x. I searched the old archive of forum posts and found a copy from 2005 but I am hoping someone can help with the most recent copy. I have downloaded the .zip file and see the file called extract_rtv.c but I have no idea how to compile this so I can run it from the terminal in os x. Any help with the compiling or a copy of the already compiled file would be appreciated.


Thanks


Rob

Well, I had some time to kill so I thought I would take a stab at it. First I installed XCode2 on my Mac. Then, I wasted about an hour figuring out how to create a project in the directory I wanted and getting the files from SourceForge into the project...


The first time I tried to compile extract_rtv5, it gave me a syntax error before a typedef line. After tracking back through all the compile-time options, I found it was missing a semicolon on the end of a typedef for the MACH system (which Mac OS X is). That made it compile and get a whole bunch of sign mismatch warnings. I started fixing sign mismatches, got tired, and decided to give it a whirl. It immediately gave me a read error. I put some prints in the read function and found that it was going below zero of an unsigned value and testing for negative, which didn't fail. I changed the value to be signed so that the read function completed successfully and then got a CRC error in the super block (I was using the factory reset image to test with since that is all I could easily get on my Mac, so I know that it doesn't have any errors). I looked again at the read function printout and noticed that it was trying to read 520 bytes for the super block instead of 512. I totaled up all the elements in the super block structure and they add up to exactly 512 bytes. I did some google searching on packing with gcc and couldn't find that there was anything wrong. I added a bunch more pack attributes on the structure, but it still kept coming out 520 bytes. I got tired of trying to figure it out and simply used "#pragma pack(1)" around the structures instead and then it worked (I don't know why it uses the pack attribute instead of the pack pragma, and I don't know why the pack attribute wasn't working correctly)!



Anyway, for the little bit I could do with the factory reset image (just verify and list files) it seems to be working fine. I even extracted all the files from the factory reset image!



So, it looks like it might be working! I'll have to play with it a little more and figure out what all needs to change in the source code. By the way, this is a PPC only compilation...


Henry
See less See more
I've attached a copy of the OSX executable that was compiled back in 2005. Run it from the terminal...

FB

 

extract_rtv_16_osx.zip 16.0048828125k . file

Attachments


Quote:
Originally Posted by Freddy B. /forum/post/0


I've attached a copy of the OSX executable that was compiled back in 2005. Run it from the terminal...

FB

I was wondering where you got that from and what source code was used to compile it? I tracked down a mistake in the CVS source code for version 16:

Code:
Code:
#ifdef __MACH__
#   include 
    typedef u_int64_t uint64;
        typedef int64_t int64
That it is missing a semicolon on the end of that last typedef. So, I wanted to get the source code that compiled that Mac OS X version so I could see if there is anything else I need to roll into the next version. I'm trying to put together a new source code that will compile both on Windows and Mac OS X...


Henry
See less See more
Henry,

Here are the source files I believe I used to compile that executable - that semicolon was fixed.

FB

 

extract_rtv.zip 37.9169921875k . file

Attachments


Quote:
Originally Posted by Freddy B. /forum/post/0


Henry,

Here are the source files I believe I used to compile that executable - that semicolon was fixed.

FB

Thanks so much! That source file is the same as the first version 16 source on CVS except that it has the semicolon fixed. Interesting that fix never got into the CVS source code, but obviously was found when attempting to compile it for Mac OS X...


Anyway, I cleaned up some casts to get rid of many sign mismatch warnings and I'm going to check in new code. Unfortunately, I don't have any way to test it on the Mac with a Replay hard drive, so I'm going to assume that if it used to work with hard drives, that it still does...


Oh, and by the way, did that Mac OS X compile work? When I compiled it with the 4.0.1 gcc compiler, the packed structures didn't come out the right size. I added to use the packed pragma in addition to the packed attribute, and that took care of it. But, I just wonder if you had any problem with the structure sizes when you compiled it?


Henry
See less See more
I had nothing but problems with gcc 4 when it was first released and reverted to version 3.3 (change the symbolic link /usr/bin/gcc to gcc-3.3), which did a fine job with "extract".


I think I have an old 40GB RTV hard disk in a drawer somewhere so I can test your next version when it's ready...


FB

Quote:
Originally Posted by Freddy B. /forum/post/0


I had nothing but problems with gcc 4 when it was first released and reverted to version 3.3 (change the symbolic link /usr/bin/gcc to gcc-3.3), which did a fine job with "extract".


I think I have an old 40GB RTV hard disk in a drawer somewhere so I can test your next version when it's ready...


FB

I changed to using the modern pack pragma. It was already using that for the Windows compile, but the non-Windows compile was using the pack attribute instead. I just changed everything to use the pack pragma and now it seems to be good on both OSes...


I have a disk image of one of my Replay hard drives that I will test it with. Unforutnately, the only thing I can't check is it detecting hard drive devices. I'll let you try that out when I make the next version. I will post the Mac OS X executable (PPC) as well...


Henry
Two things: I posted Freddy's extract_rtv version 16 Mac OS X compile on SourceForge.


Second, I posted extract_rtv5 version 70 Mac OS X compile on SourceForge. It turns out that it compiled universal, but I haven't had a chance to try it on an Intel Mac, although the properties say it is universal. I also posted extract_rtv5 version 70 Windows on SourceForge because it is the package that includes the source code. And, I updated CVS on SourceForge as well...


Enjoy!


Henry


*UPDATE* I had a chance to try it on an Intel Mac, and it worked just fine. Although, I guess that could be due to Rosetta, but since it says it is universal, I have to assume that it runs native. So, I have tried it on 10.4 both PPC and Intel Macs, and I have tried it on 10.3 on a PPC Mac. The only thing I haven't tried (because I don't have an external USB to ATA interface) is attaching an actual Replay hard drive to the Mac to make sure it detects it properly. But, I have no reason to believe that if this used to work, that it still works...
See less See more
1 - 10 of 10 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top