2
votes

Any ideas on how to obtain make and whatever other cruft came along with earlier versions of Xcode? The '/Developer' directory no longer exists as I stupidly got rid of it with the upgrade to Xcode 4.3.

Additionally, it appears the CORE directory in '/System/Library/Perl/5.12/darwin-thread-multi-2level' is missing header (.h) files. I believe these were also populated with earlier versions of Xcode.

I'm unable to build any Perl modules without these, specifically through CPAN. Any help is greatly appreciated! Thanks in advance.

4
I recommend leaving the system perl alone and installing your own. - brian d foy

4 Answers

10
votes

As I see it you have two options:

Way 1

a) Using the "App Store" install Xcode Version 4.3.

b) Run Xcode tools and complete the installation process.

c) Once Xcode is open go to the menu Xcode -> Preferences...

d) Go to the downloads tab.

The downloads tab in Xcode -> Preferences

e) Click "Install" by the last of the four options (Command Line Tools (171.7 MB).

f) This will require you to make a developer account.

g) Do so here: Apple Developer Registration

h) Either create a new ID or use an old one.

i) After filling in all your information you will get to a page where you must select one of three Developer Programs.

j) Select the bottom (free) Safari Developer Program.

k) Now go back to the Xcode -> Preferences >> Downloads tab.

l) Click install and put in your Apple ID and password.

Way 2

1) Open the termial

2) Type "cd" and press enter.

3) Type "vim .profile" and press enter. This will either create a new file called ".profile" or edit your existing one.

4) Put "export PATH=/Applications/Xcode.app/Contents/Developer/usr/bin:$PATH" on its own line somewhere in the file.

5) Press ESC.

6) Press SHIFT + ':' (You should now see a semi-colon in the bottom of the window).

7) Type "wq". (You should now see ":qw" in the bottom of the window).

8) Press enter.

9) Quit Terminal.

10) Open Terminal (This reloads the changes you made in .profile)

11) Type "which make". The result should be "/Applications/Xcode.app/Contents/Developer/usr/bin/make"

If you have any errors (may or may not be necessary)

Try changing the compiler that you are using. If you provide more information I might be able to suggest an alternative.

4
votes

You want the "Command Line Tools for Xcode - February 2012", available from https://developer.apple.com/ (free developer login required).

…which also says that this very package can be downloaded using the Downloads preferences pane within Xcode 4.3 and later.

No idea if it has Perl stuff, though.

1
votes

I had difficulties after upgrading to Lion on my older macbookpro. I had no perlfaqs and other documentation. I actually added these by hand. This convinced me to just install a separate complete version of 5.14 in /usr/local and just not mess with the system version.

To do that install the Xcode tools from the App store, then download the source to /usr/local/src (or anywhere actually) and run:

./configure
make
make test
sudo make install

Then open Terminal and type:

export PATH="/usr/local/bin:/usr/local/sbin:$PATH" 

You should be able to run cpan and install whatever modules you want and when you upgrade the operating system again it won't overwrite it.

0
votes

You can just run in Terminal

xcode-select --install