Recent

Author Topic: First run in mac os x  (Read 8594 times)

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
First run in mac os x
« on: May 05, 2016, 05:59:46 pm »
Hello guys i installed lazarus 1.7 with fpc 3.1.1
through the script I found on this page

www.getlazarus.org/setup/?download

I created a first application with a form that contains a TButton and a TMemo. I saved, then I launched the compilation but I get these errors. Why?

Thank you


Hint: (11030) Start of reading config file /Users/francesco/Development/FreePascal/fpc/bin/fpc.cfg
Hint: (11031) End of reading config file /Users/francesco/Development/FreePascal/fpc/bin/fpc.cfg
Free Pascal Compiler version 3.1.1 [2016/01/18] for i386
Copyright (c) 1993-2015 by Florian Klaempfl and others
(1002) Target OS: Darwin for i386
(3104) Compiling project1.lpr
(9001) Assembling (pipe) /Users/francesco/Desktop/Laz-test/lib/i386-darwin/project1.s
(9022) Compiling resource /Users/francesco/Desktop/Laz-test/lib/i386-darwin/project1.or
(9015) Linking project1
ld: file not found: /usr/lib/crt1.o
An error occurred while linking
project1.lpr(22) Error: (9013) Error while linking
project1.lpr(22) Fatal: (10026) There were 1 errors compiling module, stopping
Fatal: (1018) Compilation aborted
Error: /Users/francesco/Development/FreePascal/fpc/bin/ppc386 returned an error exitcode
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: First run in mac os x
« Reply #1 on: May 05, 2016, 06:37:18 pm »
Do you have Xcode's command line utilities installed?

http://www.freepascal.org/down/i386/macosx-netherlands.var

-Phil

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: First run in mac os x
« Reply #2 on: May 05, 2016, 06:41:39 pm »
Do you get the same error with Lazarus and Free Pascal from the standard distribution?
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

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #3 on: May 09, 2016, 11:41:18 am »
Do you think the problem can be the version XCode?

Version 7.3 (7D175)
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: First run in mac os x
« Reply #4 on: May 09, 2016, 04:30:41 pm »
You haven't answered the above questions, I note.

http://wiki.freepascal.org/OS_X_Programming_Tips#Xcode_5_and_above

Note Xcode 7.3 requires OS X 10.11 (El Capitan).


xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #5 on: May 09, 2016, 04:37:42 pm »
Do you have Xcode's command line utilities installed?

http://www.freepascal.org/down/i386/macosx-netherlands.var

-Phil

Yessss, with command:

xcode-select --install
« Last Edit: May 09, 2016, 04:40:57 pm by xinyiman »
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #6 on: May 09, 2016, 04:44:31 pm »
Do you get the same error with Lazarus and Free Pascal from the standard distribution?

I failed to install fpc. He tells me that the hard disk on which I want to install does not fit:

You have to install Xcode and its command line tools before installing this package.

But in reality it's all properly installed
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: First run in mac os x
« Reply #7 on: May 09, 2016, 04:52:45 pm »
Both FPC and the linker think you haven't installed the command line tools.

Check that you have /usr/lib/crt1.o

  mdfind -name crt1.o

If you don't have that file, then you probably haven't successfully installed the command line tools. Note that you get the same error on Ubuntu if you haven't installed the libc developer package.

You can also download the installer from the Apple Developer center. The file you want is:

  Command_Line_Tools_OS_X_10.11_for_Xcode_7.3.1.dmg


xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #8 on: May 09, 2016, 05:06:01 pm »
The command

mdfind -name crt1.o

I do not give me any results. Please send me the link where to find

Command_Line_Tools_OS_X_10.11_for_Xcode_7.3.1.dmg

Thank you
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

Phil

  • Hero Member
  • *****
  • Posts: 2737
Re: First run in mac os x
« Reply #9 on: May 09, 2016, 06:27:03 pm »
https://developer.apple.com/xcode/download/

Click on Additional Tools and log in.


xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #10 on: May 10, 2016, 08:45:07 am »
Perfect now creates the executable, but if you do I debug my application tells me I have a debugger error. However, the executable it creates
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #11 on: May 10, 2016, 10:58:12 am »
Yet I do not understand, the debugger is properly set. Because if I launch the executable path from terminal responds.

My path

/opt/local/bin/ggdb
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #12 on: May 10, 2016, 03:02:29 pm »
Reinstalling the full version now runs I debugging. But I do not see any results. I compile the program but when he has to show me the form for debugging remains constantly on "(debug ...)" then I can not not even close.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: First run in mac os x
« Reply #13 on: May 10, 2016, 07:52:46 pm »
Reinstalling the full version now runs I debugging. But I do not see any results. I compile the program but when he has to show me the form for debugging remains constantly on "(debug ...)" then I can not not even close.

Your description is very vague and hard to understand. What do you want to say with "now runs I debugging"? Which "results" do you expect? What can't you close?
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

xinyiman

  • Hero Member
  • *****
  • Posts: 2256
    • Lazarus and Free Pascal italian community
Re: First run in mac os x
« Reply #14 on: May 12, 2016, 09:04:53 am »
Pretty much look at the picture I attached, remains perpetually in debug, the application does not appear to prove. The compilation, but I do not do debug. And if I try to close the ide me it does not close, if I try to stop the debugging I did not stop.
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1

 

TinyPortal © 2005-2018