Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a rar I desperately need whose password was saved as a file on a site that no longer exists :(.

I'm running it on a mac osx 10.5.8 and have never used the terminal before but I figured out enough to get up to the point where it says use 'make' and it always gives an error.

-bash: make:command not found

I did figure out how to use the terminal to extract the tar file though ^_^

I didn't understand what the requirements were so I decided to get a C compiler which it says is necessary, so I installed Tiny C Compiler and then tried to install a version of glibc newer than 2.4 (at least that's how I understood the > glibc 2.4 requirement!) but it kept giving me an error in the console every time I tried to configure it saying something like there is no compiler.

Where do I go from here? After a little research I found this link to install GCC which is also a compiler I assume? I don't even know what to get from the link.... From what little I know of regex and POSIX, pthreads are just posix threads and since I'm running a mac I shouldn't have to download or install anything right? I also have to install libxml2 which I found here. Do I install that the same way as glibc?

Sorry that is a lot of questions actually :(

Also sorry I can't pull up the exact errors because I am at work, not my home computer.

share|improve this question
    
What exact error message do you get when you run make? It sounds like you have never compiled software from source before, so some of the things you have said you're trying to do (such as installing the tiny C compiler) are way off-base and unnecessary. Instead of trying a bunch of things and playing a guessing game, just slow down, tell us precisely which error message you get, and wait for a good answer. –  ÃŁŁǫǛȉЖΦΤїҪ Aug 22 '12 at 14:05
    
@allquixotic ok thank you for your patience, I will pay closer attention to this to respond promptly. when I try to use the make command it returns the error -bash: make:command not found –  Travis Dtfsu Crum Aug 22 '12 at 14:20
    
I seem to remember that make, the Clang compiler, and related tools come with Xcode? (I would avoid "Tiny C Compiler" and similar tools, though.) –  grawity Aug 22 '12 at 14:23
1  
@allquixotic would downloading the apple developer tools be an easier fix then downloading all these things? –  Travis Dtfsu Crum Aug 22 '12 at 14:24
    
@grawity yes I was reading something about this. I have never used the terminal or used any apple developer tools as I normally just use PC but mine is out of commission at the moment. Thank you for the advice, I will not use tiny c or any other compiler other than gcc :) –  Travis Dtfsu Crum Aug 22 '12 at 14:26

2 Answers 2

up vote 7 down vote accepted

On Mac OS X, Apple distributes a custom build of the GCC (GNU Compiler Collection) toolchain alongside their Integrated Development Environment (IDE) known as XCode.

XCode is a graphical user interface that can be used to build some software which supports XCode's build system. However, it is not necessary to use XCode itself in order to use the version of GCC which is installed along with XCode. Think of XCode as an optional graphical front-end to GCC, which is only necessary if you are trying to compile a project that is designed to be built with XCode.

The GCC compiler that Apple ships with XCode supports a number of native programming languages. One of them is C. So that solves your C compiler issue.

Once you install XCode, you should be able to run the gcc command from the Terminal without doing anything else. Try it; just run gcc. It should say:

gcc: no input files

or something similar to that. If it says that, then you know you're at least making progress; now, you have a C compiler.

And don't install or worry about Tiny C Compiler.

Once you have gcc installed, running make should at least get you a bit further. If rarcrack's build system complains that you don't have certain dependencies installed, you will have to compile those dependencies from source, or install pre-built development libraries for them.

There are a number of ways that the build system may try to tell you that you're missing a dependency library, and some of them are fairly cryptic messages such as "undefined symbol blah blah" or ": No such file or directory". If you see these kinds of errors, it's usually the compiler trying to tell you that you're missing a dependency; by contrast, a more friendly build system (which rarcrack appears not to have) would gracefully complain with something like:

Checking for LIBXML2... no

There are limitless possibilities as to what may go wrong, but learning to recognize patterns in error messages and analyze them, or at the very least posting exact error messages when you ask questions on SuperUser / StackOverflow, will get you much further.

As for rarcrack itself, it depends on GLib 2.0. Well, not exactly version 2.0, but any version that at least begins with a "2" in front of it. So it would work as well with the latest stable release of the "2.x series" as it would with an earlier version. In other words, you want to use the latest possible version of GLib that you can find in the 2.x series. That'd be this one: here is the download for the GLib "2.32 series". You want to download the one that it says is the latest, which, as of this writing is 2.32.4. If there's a 2.32.5 or later out when you read this, grab that instead. You might also want to look at the 2.34 series if you are reading this after that comes out (don't use odd numbered series if you want to avoid pain, because those are unstable releases).

GLib, unfortunately, depends on lots of stuff, so you'll have to hope to find existing builds of GLib and all of its dependencies, or else compile all of them from source. But instead of compiling from source, maybe checkout Macports or Fink to give you the binaries pain-free.

share|improve this answer
2  
Xcode 3.2 now uses clang instead of GCC. –  grawity Aug 22 '12 at 14:32
    
AWESOME answer. Thank you for taking the time to explain it. I honestly had no idea what I was doing till now –  Travis Dtfsu Crum Aug 22 '12 at 14:37
    
@grawity, but it still supports the gcc front-end, right? –  ÃŁŁǫǛȉЖΦΤїҪ Aug 22 '12 at 15:27

Today I wanted a small .rar/.zip password cracker and came across Rarcrack.

Take a look at my repo on Github here:

https://github.com/jaredsburrows/Rarcrack

Original Code here:

http://rarcrack.sourceforge.net/

Basically, Mac OSX's version of GCC did not like the usage of the many inline functions that were in the original code. I removed the inline functions, making them normal functions and with a few other minor changes got it to compile. I checked that it worked by running rarcrack on the examples provided.

Let me know if this helps!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.