Recent

Author Topic: [SOLVED] Missing xcrun  (Read 12228 times)

clemmi

  • Jr. Member
  • **
  • Posts: 54
[SOLVED] Missing xcrun
« on: October 16, 2014, 11:26:58 pm »
I want to install Lazarus on my MacBook Pro with Mavaricks OS.
I installed in order, and each one installed OK,:
fpc-2.6.4.intel-macosx.dmg, including the Xcode tools.
fpcsrc-2.6.4-30140421-macosx.dmg.
lazarus-1.2.6-20141012-i386-macosx.dmg.

now Lazarus opens normally (I been using Lazarus on my Windows PC so I'm well familiar with it) but when I run a blank application, or a simple one with a button and a label, it says:

"Compiling/tmp/project1xcrun:error Invalid active developer path (/Developer), missing xcrun at:  /Developer/usr/bin/xcrun"

I search for 'xcrun' in the Macintosh HD and nothing found.

What should I do next to be able to run Lazarus...??
Thanks!
« Last Edit: October 22, 2014, 06:21:13 pm by clemmi »

Jonas Maebe

  • Hero Member
  • *****
  • Posts: 1058
Re: Missing xcrun
« Reply #1 on: October 16, 2014, 11:30:34 pm »
Did you follow the FPC installation instructions for OS X 10.9 listed on its download page? (e.g. at http://www.freepascal.org/down/i386/macosx-netherlands.var )

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Missing xcrun
« Reply #2 on: October 19, 2014, 08:13:12 pm »
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

clemmi

  • Jr. Member
  • **
  • Posts: 54
Re: Missing xcrun
« Reply #3 on: October 19, 2014, 10:50:58 pm »
This is the full copy of the error after clicking 'run' with a black application.
Again, Lazarus opens normally and I can work on it but after clicking the green 'run' arrow I get the error message and it doesn't produce the finals window.
Do I have to go to options and change some directory paths?
I installed all the files as indicated and all installed successfully.

I don't know how to uninstall Lazarus to start a new clean installation if that's what I need to do
I searched for 'xcrun' and is not in my computer anywhere. What is 'xcrun'???

Thanks.


Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.4 [2014/02/26] for i386
Copyright (c) 1993-2014 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling /tmp/project1xcrun: error: invalid active developer path (/Developer), missing xcrun at: /Developer/usr/bin/xcrun

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Missing xcrun
« Reply #4 on: October 19, 2014, 11:08:42 pm »
xcrun is a shell command that helps FPC to run development tools. See https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/xcrun.1.html for reference.

I assume that you installed Xcode 5.0 or newer. Did you also install the Apple Developer Tools with xcode-select --install?
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

clemmi

  • Jr. Member
  • **
  • Posts: 54
Re: Missing xcrun
« Reply #5 on: October 19, 2014, 11:15:41 pm »
yes, I did and it said 'Installation successful'.

After a ggogle search about xcrun, I will try in the terminal:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
any idea if it will help?

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Missing xcrun
« Reply #6 on: October 19, 2014, 11:21:40 pm »
Well, that is weird. I have successfully installed Lazarus and FPC on more than 10 Macs with different processor architectures and all versions of Mac OS X from 10.4 to 10.10, but I was never faced with your problem.

Please share your experiences with sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer here.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

clemmi

  • Jr. Member
  • **
  • Posts: 54
Re: Missing xcrun
« Reply #7 on: October 20, 2014, 06:11:04 pm »
This is my share...
to make the story short, Terminal said directory or folder not found.

Found .dmg for xcode, installed it and the laptop crushed again.
Started holding Option key and reinstalled OS X
Everything works fine except Lazarus. Deja vue.

Found Xcode 3.2.4 in my laptop. In Preferences/Documentation/Xcode32 Development Tools Library/ - GET and got it.
Reinstalled the fpc, fpcsrc and Lazarus packages and opened Lazarus. run a blank application.

Good news is that Xcrun error is gone.
Bad news is that I got a new error message (copy error to clipboard):

Options changed, recompiling clean with -B
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.6.2 [2013/02/03] for i386
Copyright (c) 1993-2012 by Florian Klaempfl and others
Target OS: Darwin for i386
Compiling /tmp/project1.lpr
PPU Loading /Developer/lazarus/lcl/units/i386-darwin/carbon/interfaces.ppu
PPU Source: interfaces.pas not found
Recompiling Interfaces, checksum changed for System
project1.lpr(9,3) Fatal: Can not find Interfaces used by Project1, ppu=/Developer/lazarus/lcl/units/i386-darwin/carbon/interfaces.ppu, package LCL

went to Terminal, typed "xcode-select --install", installed it and Lazarus still gives the same error.

Where do i go from  here??

-cl

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Missing xcrun
« Reply #8 on: October 20, 2014, 06:15:52 pm »
Well, Xcode 3.2.4 is very old. xcrun isn't implemented in these old versions of the DeveloperTools. For Mavericks I would recommend to install Xcode 5.x or 6.0.
« Last Edit: October 20, 2014, 06:23:48 pm by jwdietrich »
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

clemmi

  • Jr. Member
  • **
  • Posts: 54
Re: Missing xcrun
« Reply #9 on: October 22, 2014, 02:47:16 am »
 :) Success, finally!
I got Xcode 6, run the three files (fpc, fpcsrc, and lazarus). I didn't need (or knew how) to uninstall anything.
Now Lazarus finally works ok and I was even able to build an .app file (with a simple 'Hello World! application).

I guess the problem was my assumption that OS X Mavericks was installing a new Xcode also.
I guess it was working with my very old Xcode version. Xcode had to be install separate.

Thank you to every one that responded and I hope it will help others.
-cl

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Missing xcrun
« Reply #10 on: October 22, 2014, 08:34:05 am »
:) Success, finally!

That is fine. Please mark the thread with '[Solved: ]'.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

clemmi

  • Jr. Member
  • **
  • Posts: 54
Re: Missing xcrun
« Reply #11 on: October 22, 2014, 04:16:55 pm »
:) Success, finally!

That is fine. Please mark the thread with '[Solved: ]'.
How do I do that? is the same as 'lock thread'?

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Missing xcrun
« Reply #12 on: October 22, 2014, 04:18:46 pm »
Edit your first post; in the subject add [SOLVED] at the beginning of the text.
Thanks.

(I wouldn't lock the thread as there may still be valuable contributions later on)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

 

TinyPortal © 2005-2018