Lazarus

Programming => Widgetset => Carbon => Topic started by: freddynerk on September 08, 2009, 09:27:41 am

Title: Lazarus & Debugger oops etc
Post by: freddynerk on September 08, 2009, 09:27:41 am
I have setup a new version of Lazarus.

Problems now are.
2 Icons in the Dock.
1. that I placed after the new install.
When I click on it to run the program I then get 2 Icons.

2. I have tested many examples plus my applications and each time I do a RUN up comes
Debugger error Ooops the debugger entered ....

It is not specific to any program or packages.

The program does however compile Ok if I build.
The resultant program is fine.
Not so good for debugging any errors (and I have a few)

Tom

Title: Re: Lazarus & Debugger oops etc
Post by: freddynerk on September 08, 2009, 09:29:33 am
Forgot to add

Version 0.9.27 beta
12-8-09
FPC 2.2.4
SVN 21182
I386-darwin-carbon (beta)
Title: Re: Lazarus & Debugger oops etc
Post by: freddynerk on September 08, 2009, 03:31:21 pm
Have tested some of my application on a new Mac.
The older program DO work.
However any new programs compiled will nOT work.
As a test I compiled Address_book from the examples folder.
On this new Macbook Pro I get an error. This application addrbook quit unexpectedtly.

Their is something very wrong with my Lazarus install.
I have through the un-install procedure.
Deleted all files from Developer/lazarus and Lazarus from the Applications folder.

I used a Daily snapshot as well to test and had the same error.

Without re-installing Leopard from scratch what can I do.

This is serious for me.

I only wish I new more on how a Mac works.

Tom
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on September 28, 2009, 08:37:50 am
can you post the output of the debug oputput window ? The oops is usually caused by som unexpected response form gdb.
Title: Re: Lazarus & Debugger oops etc
Post by: freddynerk on September 29, 2009, 12:17:12 am
This is one that I did a week or so ago.
It was posted on another thread.

Tom
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on September 30, 2009, 12:29:07 pm
I guess it got confused from the output of "info program"

Can you bugrep this and attach the output ?
Title: Re: Lazarus & Debugger oops etc
Post by: freddynerk on September 30, 2009, 11:48:37 pm
Sorry to be a pain but what is a bugrep file?
AND how do I produce one.

Tom
Title: Re: Lazarus & Debugger oops etc
Post by: theo on October 01, 2009, 12:04:18 am
Sorry to be a pain but what is a bugrep file?
AND how do I produce one.

If I understand correctly, Marc wanted you to create a bug report here: http://bugs.reepascal.org/
and attach the above output to it.
Title: Re: Lazarus & Debugger oops etc
Post by: freddynerk on October 01, 2009, 11:51:32 pm
A bug reprt was entered on the 14/9/09 no 0014588

Tom
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on October 07, 2009, 04:37:20 pm
I've got the same problem after installing OSX 10.6.1.  Everytime I run the debugger fails.

0.9.27
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on October 07, 2009, 10:00:24 pm
A bug reprt was entered on the 14/9/09 no 0014588

Tom
Tom:
It's been about 3 weeks since this bug report went in.  Have you rolled back to 10.5 in the meanwhile?  Trying to figure out what to do to keep my project moving forward.
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on October 07, 2009, 10:15:29 pm
It's been about 3 weeks since this bug report went in.  Have you rolled back to 10.5 in the meanwhile?  Trying to figure out what to do to keep my project moving forward.
The bug has been reported. Marc is currently busy with other tasks, so he can't fix Mac OS X debugger.
You can Monitor the reported issue, so you're informed (via email) about any changes made.


To go on development, you need to switch the debugger off, and use other methods for debugging.
Title: Re: Lazarus & Debugger oops etc
Post by: Vincent Snijders on October 07, 2009, 10:32:20 pm
Maybe you can try to use dwarf debug info instead of stabs. (-gw compiler option)
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on October 08, 2009, 02:33:33 am
If I switch the debugger off I get the following error:

Exception while creating process:  Executable not found: "xterm"

I get the same message with dwarf (-gw) setting and with debugger on. 
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on October 08, 2009, 11:39:05 am
In Run - Run parameters, uncheck: Use launching application
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on October 08, 2009, 05:27:04 pm
In Run - Run parameters, uncheck: Use launching application
It was already that way.
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on October 09, 2009, 11:01:16 am
aahh... osx
there is an error in TPRocess, where it wants a xterm exe. IIRC it isn't used, but it must exist.

Maybe you can try to create a symlink to the terminal (inside Terminal.app)
Title: Re: Lazarus & Debugger oops etc
Post by: Jonas Maebe on October 09, 2009, 03:20:13 pm
aahh... osx
there is an error in TPRocess, where it wants a xterm exe. IIRC it isn't used, but it must exist.
xterm appears to be only used if poNewConsole is used. In other cases it is not checked nor used. There don't appear to be any checks as to its existence.

Quote
Maybe you can try to create a symlink to the terminal (inside Terminal.app)

That definitely won't work, since Terminal doesn't accept any form of command line options. You can use osascript to tell Terminal to execute a particular command and this will create a new window, but this does not create a new instance of Terminal.

It will just create a new window in the context of the Terminal application if it was already running, and if not it will start Terminal and create the new window. Next, the command will be executed in this new window, but Terminal will not quit once that's finished nor will the window close (so waiting for the "end of the executed process" will fail -- in fact, this will wait for the end of the osascript program, which will be almost instantaneous since it just fires off an apple event to Terminal and then quits).

The logic of TProcess with poNewConsole is hardwired to the Unix/Windows notion that every time you create a new window this automatically creates a new process, which is incorrect in case of Mac OS X (unless you use a traditional Unix utility such as xterm).
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on October 09, 2009, 04:56:23 pm
hmm... the debugger doesn't use a console, so I winder where this xterm is coming from
Title: Re: Lazarus & Debugger oops etc
Post by: Vincent Snijders on October 09, 2009, 05:06:11 pm
TProcess.
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on October 10, 2009, 08:20:19 pm
xterm is installed with X11.
X11 is available (in Optional Installations) with each Mac OS X version starting from 10.4

After x11 installed, symbolic link can be created at /usr/local/bin.
open Terminal
Code: [Select]
sudo ln -s /usr/X11/bin/xterm /usr/local/bin/xterm

P.S: xterm is also installed with Fink.

The logic of TProcess with poNewConsole is hardwired to the Unix/Windows notion that every time you create a new window this automatically creates a new process, which is incorrect in case of Mac OS X (unless you use a traditional Unix utility such as xterm).

can TProcess be patched in the following way? (patch file is also attached to this message :) )
Yes, it's less control over size of the window, but still should work fine, on any darwin, since 'open' is darwin/nextstep tool.

Code: [Select]
Index: src/unix/process.inc
===================================================================
--- src/unix/process.inc (revision 13818)
+++ src/unix/process.inc (working copy)
@@ -160,6 +160,9 @@
     CommandToList(Cmd,S);
     if poNewConsole in P.Options then
       begin
+      {$ifdef darwin}
+      S.Insert(0,'open');
+      {$else}
       S.Insert(0,'-e');
       If (P.ApplicationName<>'') then
         begin
@@ -172,6 +175,7 @@
         S.Insert(0,'-geometry');
         end;
       S.Insert(0,'xterm');
+      {$endif}
       end;
     if (P.ApplicationName<>'') then
       begin

hmm, may be additional command-line should be: 'open -n -a Terminal', instead of a just 'open'?
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on October 10, 2009, 10:31:38 pm
...
Code: [Select]
sudo ln -s /usr/X11/bin/xterm /usr/local/bin/xterm
..
with that Lazarus still reports that xterm is missing
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on October 10, 2009, 10:58:25 pm
launching osx apps in Lazarus, is quite messy :(

ok. Here's a workaround (you should use it for console applications only).

open "Run"->"Run parameters...", set your run parameters as shown on the screen shot.
check "Use launching application:" type "/usr/bin/open $(TargetCmdLine)"
You're free to modify "Host application" or "Command line parameters" as you need.

Then (it's a trick) open "Project"->"Compiler options". Open "Linking".
check "Win32 gui application (-WG)".
This would prevent Lazarus from using "xterm" then launching compiled project.

Let me know about your results.

Thanks.
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on October 10, 2009, 11:07:03 pm
Thanks, but my app is not a console app.

Unless you want me to test this for you?
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on October 10, 2009, 11:10:25 pm
Unless you want me to test this for you?
then you don't need to modify Run Parameters.

Just check "Win32 GUI application" in Compiler Options.
This should be enough.

does it work for you?
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on October 11, 2009, 01:14:47 am
Yes, thanks much.
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on November 10, 2009, 03:34:30 pm
I've got the same problem after installing OSX 10.6.1.  Everytime I run the debugger fails.

0.9.27
I was hoping OSX 10.6.2 would fix this but it doesn't.  :(
Title: Re: Lazarus & Debugger oops etc
Post by: zeebee on November 18, 2009, 09:03:44 am
Same problem here exactly.

Programs compile fine if debugger turned off but error message oops comes up if turned on.

OS X 10.6.2

Running Ver 0.9.28.2 beta
2009-10-26
FPC 2.2.4
SVN 22296
I386-darwin-carbon (beta)
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on November 18, 2009, 02:27:38 pm
Same problem here exactly.

Programs compile fine if debugger turned off but error message oops comes up if turned on.

OS X 10.6.2

Running Ver 0.9.28.2 beta
2009-10-26
FPC 2.2.4
SVN 22296
I386-darwin-carbon (beta)
I think we're not the only ones who were hoping that Lazarus would be the path forward for Delphi development on the Mac, but alas, it is not.  I'm sure the debugger will get fixed but I don't have a clue even if someone capable (not me!) is working on it, so I have less of an idea of when the fix may happen.

Meanwhile, I've moved my work back to Delphi on my XP box.
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on November 18, 2009, 03:10:00 pm
There is noone working on it, but it's assigned to me. Unfortunately I've only a ppc based 10.4 ini
Anyway, the bugreport has a usefull patch so i'll have a look at it.
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on November 18, 2009, 03:15:43 pm
There is noone working on it, but it's assigned to me. Unfortunately I've only a ppc based 10.4 ini
Anyway, the bugreport has a usefull patch so i'll have a look at it.

Thanks for that update, Marc.

What is a "ppc based 10.4 ini?"

If you need any testing let me know, I'd be glad to help in anyway I can.

Mark
Title: Re: Lazarus & Debugger oops etc
Post by: Vincent Snijders on November 18, 2009, 03:22:20 pm
A typo:
ppc based 10.4 mini

That is a Mac mini with Mac OS X 10.4 and a powerpc CPU.
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on November 18, 2009, 04:26:18 pm
Thanks, Vincent.  So my "i86 based 10.6.2 mbp" could be a useful test platform.  Like I said, I'd be glad to help.  Obviously, my skills are limited but I'm willing to run tests on my machine.
Title: Re: Lazarus & Debugger oops etc
Post by: theromi on December 16, 2009, 01:44:03 pm
Any news on this? My debugger crashes on Snow Leopard which renders Lazarus pretty useless to me :(
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on December 16, 2009, 02:02:07 pm
Any news on this? My debugger crashes on Snow Leopard which renders Lazarus pretty useless to me :(
Have you tried the latest SVN version or snapshot?
Title: Re: Lazarus & Debugger oops etc
Post by: fjrpilot on December 16, 2009, 10:30:31 pm
I'm experiencing the same issue.  I loaded the latest snapshot (dated today) to no avail.
Title: Re: Lazarus & Debugger oops etc
Post by: fjrpilot on December 16, 2009, 10:38:21 pm
Here are some particulars if it helps;
fpc v. 2.2.4
Lazarus v. 0.9.28.23150
OSX 10.6.2
Intel based Macbook Pro

Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on December 17, 2009, 06:58:23 am
Thanks. What XCode version used? Could you attach debugger output window content? (View->Debug Windows->Debug output)
Title: Re: Lazarus & Debugger oops etc
Post by: theromi on December 17, 2009, 09:11:05 am
Debuggeroutput: http://nopaste.info/382e029c27.html

My XCode Version is the newest as of yesterday (3.2.1 (Build 1613)).
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on December 17, 2009, 11:02:11 am
Ill repeat the output here, since I don't know how long the paste will exist.
Code: [Select]
# *stopped,time={wallclock="1.23679",user="0.44587",system="0.36618",start="1261037276.451809",end="1261037277.688597"},reason="breakpoint-hit",commands="no",times="1",bkptno="1",thread-id="1"
#  
# (gdb)
#  
# <info program>
# &"info program\n"
#  
# macosx_debug_inferior_status: current status:
#  
#               inferior task: 0x4103
#  
#                 [SIGNAL THREAD]
#  
# macosx_debug_inferior_status: information on debugger task:
#  
# macosx_debug_inferior_status: information on inferior task:
#  
# macosx_debug_inferior_status: information on debugger threads:
#  
#   thread: 0x60f
#  
#   thread: 0x1703
#  
#   thread: 0x1b03
#  
#   thread: 0x2003
#  
#   thread: 0x3903
#  
#   thread: 0x4303
#  
#   thread: 0x4503
#  
# macosx_debug_inferior_status: information on inferior threads:
#  
#   thread: 0x4203
#  
# ~"Program stopped at 0x24d7.\n"
#  
# ~"It stopped at a breakpoint that has since been deleted.\n"
#  
# ~"Type \"info stack\" or \"info registers\" for more information.\n"
#  
# ^done
#  
# (gdb)
Title: Re: Lazarus & Debugger oops etc
Post by: ron_grove on December 17, 2009, 10:45:11 pm
fpc v. 2.2.4
Lazarus v. 0.9.29
SVN Version - 19639:21350M
Compiled with QT interface if that matters, QT is the latest 4.6 release.
OSX 10.6.2
Intel based Macbook Pro

I had the same xterm and debugger problem.  Turning on the -GW option in the linker (earlier recommendation) did get rid of the xterm issue, but the debugger still has to be turned off for anything to be done.  If there's any more info I can give I'm happy to, but I don't know anything about Lazarus internals or much about gdb.
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on December 18, 2009, 09:39:17 am
If there's any more info I can give I'm happy to, but I don't know anything about Lazarus internals or much about gdb.
Could you attach debugger output window content? (View->Debug Windows->Debug output)
Title: Re: Lazarus & Debugger oops etc
Post by: ron_grove on December 18, 2009, 05:52:23 pm
copied it here:

http://www.rongrove.com/misc/debug.htm (http://www.rongrove.com/misc/debug.htm)
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on December 19, 2009, 12:30:25 am
should be fixed in r23192

Thanks to all ppl repoting outputs.
Title: Re: Lazarus & Debugger oops etc
Post by: theromi on December 19, 2009, 11:11:32 am
should be fixed in r23192

Thanks to all ppl repoting outputs.
Works like a charm. Thanks a lot!
Title: Re: Lazarus & Debugger oops etc
Post by: mbohn on December 21, 2009, 04:14:06 am
should be fixed in r23192

Thanks to all ppl repoting outputs.

Thanks to all who worked on this bug !
Title: Re: Lazarus & Debugger oops etc
Post by: Hansaplast on December 27, 2009, 02:56:53 am
Great work (again) :)

Maybe a stupid question;
What is the recommended approach to install a daily build over a release version?
(without screwing everything up  ;))
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on December 27, 2009, 01:18:15 pm
Personally I would keep the existing installation and use svn in another dir, say ~/Projects/lazarus-svn
On a command prompt (in your ~/Projects dir) do a svn checkout
Code: [Select]
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus-svn
Then (i assume the fpc compiler is in your path) cd to the  ~/Projects/lazarus-svn dir and run
Code: [Select]
makeIn finder, you can click in Projects/lazarus-svn on lazarus.app to start lazarus.

To update svn, cd to the  ~/Projects/lazarus-svn dir and run
Code: [Select]
svn up
Title: Re: Lazarus & Debugger oops etc
Post by: Hansaplast on December 28, 2009, 02:20:32 am
Thanks Marc for the quick response :)

Unfortunately, the Release version is not working due to the bug mentioned in this thread.
So it's pretty much useless to me right now :(

To avoid that I make a mess out of things; I guess I better wait until there is a release that includes this fix .... unless you guys know a way to place the daily snapshot over the release i have on my computer ;)
Title: Re: Lazarus & Debugger oops etc
Post by: Vincent Snijders on December 28, 2009, 12:17:31 pm
Marc suggest to put it next to your release using the svn sources, not over your release.
Title: Re: Lazarus & Debugger oops etc
Post by: Hansaplast on December 28, 2009, 05:26:19 pm
Thanks Vincent - that's exactly what I understood.

However; I'd like to prevent a mess on my hard-drive having both versions on there (specially since the release version isn't working).
I'd rather stick to one version that works,... in a location that is identical to the release version.
This way, when a new release becomes available, I can just overwrite what I had.

I have had daily builds installed before, and it confused the heck out of me, specially when having a daily build and a release build installed.
Part probably because I'm not daily digging in the file structure of my Mac ...
Title: Re: Lazarus & Debugger oops etc
Post by: fjrpilot on December 29, 2009, 05:19:14 pm
Thanks Marc,  works for me too!
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 07, 2010, 09:01:13 pm
Personally I would keep the existing installation and use svn in another dir, say ~/Projects/lazarus-svn
On a command prompt (in your ~/Projects dir) do a svn checkout
Code: [Select]
svn co http://svn.freepascal.org/svn/lazarus/trunk lazarus-svn
Then (i assume the fpc compiler is in your path) cd to the  ~/Projects/lazarus-svn dir and run
Code: [Select]
makeIn finder, you can click in Projects/lazarus-svn on lazarus.app to start lazarus.

To update svn, cd to the  ~/Projects/lazarus-svn dir and run
Code: [Select]
svn up


I still have a problem: while it's making I get the error:
Fatal: Can't find unit resource used by ProjectResourcesIntf

what can I do?

Thanks!
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on January 07, 2010, 09:05:33 pm
I still have a problem: while it's making I get the error:
Fatal: Can't find unit resource used by ProjectResourcesIntf

what can I do?
It's not related to the debugger! What are you trying to compile?
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 07, 2010, 09:07:18 pm
I still have a problem: while it's making I get the error:
Fatal: Can't find unit resource used by ProjectResourcesIntf

what can I do?
It's not related to the debugger! What are you trying to compile?
lazarus-svn
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on January 07, 2010, 09:09:40 pm
are you using FPC 2.4.0 (or higher)? if not, you need to update the compiler.
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 07, 2010, 09:40:46 pm
are you using FPC 2.4.0 (or higher)? if not, you need to update the compiler.
I've updated fpc and re-run make. Now lazarus has been compiled. thanks!
then I opened it and tryed an "hello world", but when I've tryed to run it I got a "can't find unit interfaces...".
So I tryed to run "Build Lazarus" from the tools menu but after a while it tells me "can't find unit DefineTemplates used by LazConf"....
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on January 07, 2010, 09:52:02 pm
please do the following.
Open Tools -> Configure Build -> Quick Build Options

select: Clean up + Build all
and press Build

it should help.
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 07, 2010, 10:03:26 pm
please do the following.
Open Tools -> Configure Build -> Quick Build Options

select: Clean up + Build all
and press Build

it should help.
thanks but unfortunately it doesn't: same error as before
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 07, 2010, 10:55:21 pm
It works!
I had to change the lazarus path in the options: having 2 versions (release and svn) on the same machine probably causes some troubles with configuration files.
Now my "hello world" program compiles and runs!
I just can't add a breakpoint as the option in grayed.
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on January 10, 2010, 03:49:14 pm
I just can't add a breakpoint as the option in grayed.
Did you configure a debugger (environment - options - debugger)?
Title: Re: Lazarus & Debugger oops etc
Post by: asb on January 11, 2010, 09:15:42 pm
Marc and et al.
I apply the solution given above (svn stuff) and now the ooops shit has gone away however when running the project, the debugger works like forever and nothing happens. The binary is created on the disc but when I run it from terminal nothing comes up. X11 starts, though.

Hope one can help!
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on January 12, 2010, 01:21:14 am
X11 ???

What are you running ? Make sure the launching app is not checked (run parameters).
Title: Re: Lazarus & Debugger oops etc
Post by: asb on January 12, 2010, 01:39:06 am
I have GUI app and the option you said is unchecked. I went through many threads to make sure I do not have anything stupid in my options but it is still something there. When I Run the default project which shows up after the Lazarus is started, it runs OK but my project cannot be debugged. No outputs in Messages box, though.

I run the same project on 10.5 and it worked (now I am switching to 10.6 and cannot get it working). And it also worked under Ubuntu.
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on January 12, 2010, 11:57:12 am
I have GUI app and the option you said is unchecked. I went through many threads to make sure I do not have anything stupid in my options but it is still something there. When I Run the default project which shows up after the Lazarus is started, it runs OK but my project cannot be debugged. No outputs in Messages box, though.

anything in the debug output window ?
Title: Re: Lazarus & Debugger oops etc
Post by: asb on January 12, 2010, 02:44:54 pm
a bunch of stuff there, I attached the file  :-[
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 13, 2010, 12:14:35 am
I just can't add a breakpoint as the option in grayed.
Did you configure a debugger (environment - options - debugger)?

It wasn't me, but is seems to be configured in options:
Debugger: GNU Debugger (gdb)
Path: /usr/bin/gdb
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on January 13, 2010, 02:04:37 am
Quote
....
<info address main>
&"info address main\n"

~"Symbol \"main\" is at 0x118c6 in a file compiled without debugging.\n"

^done
....

Enable debug info in compiler options (or did you strip the exe ?)

Title: Re: Lazarus & Debugger oops etc
Post by: asb on January 13, 2010, 03:55:09 pm
attached is the new output
What I have marked (among other) is:
-gl
-WG
-vd

I am not sure what you mean by "did you strip the exe'

Lazarus has carbon LCL interface and I am trying to compile my project with gtk LCL. Doing it with carbon LCL does not result in anything different. I prefer to have carbon but when compiled the project under 10.5 MainMenu and SelectDirectory were not visible in the program so I could not setup my paths.
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 13, 2010, 04:00:40 pm
Quote
....
<info address main>
&"info address main\n"

~"Symbol \"main\" is at 0x118c6 in a file compiled without debugging.\n"

^done
....

Enable debug info in compiler options (or did you strip the exe ?)


mmmm...sorry I don't understand exactly what do you mean.
Title: Re: Lazarus & Debugger oops etc
Post by: Marc on January 13, 2010, 11:25:58 pm
did you enable debug info in compiler options ?
Title: Re: Lazarus & Debugger oops etc
Post by: Torquemada on January 14, 2010, 10:58:52 pm
I tried to test some options combinations but I couldn't as a new problem has arrived: "failed to load file..." and after a dozen of tryes it run but after a moment lazarus crashed....
Thanks for your help but I give up (with mac version)!
Title: Re: Lazarus & Debugger oops etc
Post by: VTwin on May 16, 2010, 03:56:58 pm
Hello. I just discovered Lazarus and Free Pascal. I have been looking for options to move away from REALbasic, and as a former Turbo Pascal devotee, I am very excited about this possibility. Have been trying Python, but am getting bogged down in deployment issues.

I know this is an old thread, but it seems to describe my problems. Apparently it is resolved, but I can't follow the fix. I am trying to get up and running on OS X 10.6.3 Intel. I had previously installed OS X Developers Tools, including XCode 3.2.2.

First I installed lazarus-0.9.28.2-i386-macosx + fpc-2.4.0.intel-macosx. This seemed to be a problem because Lazarus could not find fpcsrc. But I could not find a fpcsrc-2.4.0 file to download. So I uninstalled both.

Next I installed fpc-2.2.4.intel-macosx + fpcsrc-2.2.4-intel-macosx + lazarus-0.9.28.2-i386-macosx, and it ran and compiled, failing at the 'debugger oops'.

I did not understand the SVN discussion very well, and could not find the mentioned fixed release on the web, could someone clarify the steps I need to take to fix the debugger bug? Also, if I upgrade to 2.4.0, how do I get the source fpcsrc that Lazarus seems to need?

Any help is much appreciated.

Regards,
Frederick

Title: Re: Lazarus & Debugger oops etc
Post by: VTwin on May 16, 2010, 04:55:12 pm
I had a cup of coffee, reread everything, ran the svn commands, got the fatal error: "Lazarus requires at least FPC 2.4.0"

Reinstalled 2.4.0 with 2.4.0 XTools, set the Lazarus directory in Environment>Options, ran lazarus-svc/Lazarus and ... it worked!  :D

Thanks for making the fix earlier, and I apologize for reawakening this sleeping thread.

Cheers,
Frederick
Title: Re: Lazarus & Debugger oops etc
Post by: BoB1990 on June 04, 2010, 05:54:54 pm
Hi, I have read everything, try svn ver of Lazarus and when I try Run "Hello world" app I have Error: resource compiler "fpcres" not found, switching to external mode
What I did wrong?
Title: Re: Lazarus & Debugger oops etc
Post by: skalogryz on June 05, 2010, 01:20:00 am
Hi, I have read everything, try svn ver of Lazarus and when I try Run "Hello world" app I have Error: resource compiler "fpcres" not found, switching to external mode
What I did wrong?
nothing.
Check out if you have a symbolic link to fpcres utility in /usr/bin.
if you don't you need to create one
Code: [Select]
cd /usr/bin
sudo ln -s path_to_fpcres
you've installed fpc from .dmg file, path_to_fpcres is probably "/usr/local/bin/fpcres".

if your fpc version is less than 2.4.0 you need to update fpc.
Title: Re: Lazarus & Debugger oops etc
Post by: BoB1990 on June 05, 2010, 10:08:01 am
Hi, I have read everything, try svn ver of Lazarus and when I try Run "Hello world" app I have Error: resource compiler "fpcres" not found, switching to external mode
What I did wrong?
nothing.
Check out if you have a symbolic link to fpcres utility in /usr/bin.
if you don't you need to create one
Code: [Select]
cd /usr/bin
sudo ln -s path_to_fpcres
you've installed fpc from .dmg file, path_to_fpcres is probably "/usr/local/bin/fpcres".

if your fpc version is less than 2.4.0 you need to update fpc.
Now I have =]
Thank you very much, skalogryz, now everything works fine ;)