Recent

Author Topic: Lazarus 1.0.12 on MacOs Mavericks  (Read 14924 times)

digiflash

  • New Member
  • *
  • Posts: 13
Lazarus 1.0.12 on MacOs Mavericks
« on: October 13, 2013, 07:58:25 pm »
I compiled gdb and set the dir in the settings.
After hitting the "play" button I get this:

Debugger
Failed to load file /tmp/projekct1.app: Inappropriate ioctl for device.

The GDB command:

"-environment-cd "\"/tmp"\"""
returned the error:
",msg="\"/tmp/\": No such file or directory.""

What's wrong?! I signed gdb to get full control of the process.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #1 on: October 13, 2013, 08:24:04 pm »
Which version of GDB?

Can you try and save the app first  to a different folder?


But also, try this: In the Menu > Tools > Options > Debugger
There is a grid with options. It has:
Code: [Select]
   EncodeCurrentDirPath = gdfeDefault

Try and set it to an other value, e.g. gdfeNone.

On Mac, the default is adjusted for the old gdb 6.3.50  (default = gdfeQuote)

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #2 on: October 13, 2013, 08:42:00 pm »
Were you able to run code from Lazarus before installing GDB? Did you install the command line tools?
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

digiflash

  • New Member
  • *
  • Posts: 13
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #3 on: October 13, 2013, 08:49:18 pm »
yes, I installed the command line tools. Searched the internet for a while. Followed the instructions on the lazarus page. The new xcode doesn't have gbd so I installed it through homebrew.
how can I run code without gdb?! Can I disable the debugger somewhere?!


gdb 7.6.1 is my current version.
I changed the settings and saved the project. Nothing has changed.


Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #4 on: October 13, 2013, 08:57:13 pm »
You can disable the debugger on the same options page, using the dropdown on top of the page.

After the change, Did you get the exact same error, or just a similar one?

You may alsoo have to change the EncodeExeFilename.

You can attach a log, as follows:
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session

It may help find something.

---------
The entire situation is new to all of us.

All previous MAC had a fixed version of GDB.  And it is only in the past 3 or 4 weeks that the topic "no gdb in xcode" came up.

Now using a different GDB may come with a whole set of issues that no one knows yet.

digiflash

  • New Member
  • *
  • Posts: 13
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #5 on: October 13, 2013, 09:10:57 pm »
I am able to compile without the debugger. I also tried to change  EncodeExeFilename. Doesn't work for me.
Thank you for your support!  :)
Here's the log
« Last Edit: October 13, 2013, 09:20:27 pm by digiflash »

jwdietrich

  • Hero Member
  • *****
  • Posts: 1232
    • formatio reticularis
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #6 on: October 13, 2013, 09:43:36 pm »
I was also able to compile and run an app with Lazarus on Mac OS X Mavericks without debugger.

I would be very interested, if you are successful to eventually compile and run GDB, see also the bug report 0025157. After all, I think it must be much easier to compile and run GDB than to modify lldb.
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

digiflash

  • New Member
  • *
  • Posts: 13
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #7 on: October 13, 2013, 09:46:59 pm »
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
brew install https://raw.github.com/Homebrew/homebrew-dupes/master/gdb.rb

That's what I did. In /usr/local/bin gdb is working.

Is it possible to use older versions of xcode if I install them manually?!
« Last Edit: October 13, 2013, 10:11:07 pm by digiflash »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #8 on: October 13, 2013, 10:14:48 pm »
Ah,  I think I see what happens

the IDE passes the app bundle. But gdb expects the actual exe inside the app bundle.

/Users/admin/Documents/project1.app

1) If you can do without, uncheck "generate app bundle" in the project settings.

2) Menu > Run > Run Param > Edit: "Host Application"
 /Users/admin/Documents/project1.app/Content/MacOS/project1

digiflash

  • New Member
  • *
  • Posts: 13
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #9 on: October 13, 2013, 10:25:52 pm »
You are the MAN!   :D :D
Menu > Run > Run Param > Edit: "Host Application"
 /Users/admin/Documents/project1.app/Content/MacOS/project1

Important: Missing a "s"
 /Users/admin/Documents/project1.app/Contents/MacOS/project1

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #10 on: October 14, 2013, 12:07:06 am »
I am trying to fix that for upcoming versions.
But I can not test it (since I do not have a mac)

The attached patch should take care of the app bundle (run param > host app).

It does not change the EncodeExeFilename, so that may still have to be set by hand.

If you could apply it to your lazarus and let me know if it worked, please ?

digiflash

  • New Member
  • *
  • Posts: 13
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #11 on: October 14, 2013, 11:30:00 am »
Yes I will try it.

Brian Coleman

  • New Member
  • *
  • Posts: 34
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #12 on: November 05, 2013, 08:13:37 pm »
Hi,



See rale's simple solution which solves the problem.


http://forum.lazarus.freepascal.org/index.php/topic,22529.msg133081.html#msg133081

Brian Coleman

wagenheimer

  • New Member
  • *
  • Posts: 21
Re: Lazarus 1.0.12 on MacOs Mavericks
« Reply #13 on: November 20, 2013, 07:07:43 pm »
I can't compile my projects on Mavericks....

I installed gcc following there instructions : http://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X#Xcode_5.0.2B_compatibility_.28Mac_OS_X_10.8_and_10.9.29

But I still can't compile my project. It fails with error :

Id: file not found: libgcc.a

Any idea of how to solve this?

 

TinyPortal © 2005-2018