Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
Here is a short video where I demonstrate how to switch between the gdb and lldb inside Lazarus. I also demonstrate how to move docked windows. There is no audio, but anyone should be able to follow along. Interestingly the Cocoa widgetset throws an exception when a docked window is undocked or docked again. Would someone be kind enough to submit this issue to Mantis on my behalf? https://cache.getlazarus.org/videos/lazarus-lldb.mp4 Thanks. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
Ryan, To answer your question, I just haven't taken the time to try out lldb yet. I guess it can be switched to lldb in the Lazarus interface. About that crash, it probably comes from somewhere in the Cocoa widgetset, which is currently still in development. It's far along enough to enable the Lazarus IDE to run, but still has problems. Unfortunately Catalina and all OSX versions going forward are 64 bit only, and Carbon is 32 bit only, so we're all going to have to help improve the Cocoa widgetset. The means were going to need to fix errors like you posted. Hopefully we can get some patches submitted to Mantis tagged with Cocoa. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
> On Oct 14, 2019, at 7:10 PM, Anthony Walter via lazarus > wrote: > > Testers need. > > I created a new installer for OSX that includes a 64-bit only Cocoa version > of FPC and Lazarus. I don't have Catalina installed, so I am looking for > testers and any variety of OSX. It worked for me (Catalina). You did a brilliant job. Just curious, why use GDB instead of LLDB? I’ve been using LLDB debugger in VSCode which works really well except for displaying strings is a mess because it shows them as arrays of chars. Anyways, it didn’t take long to crash though. :) I’m not a Lazarus user but the few times I have used it there were lots of crashes. Application Specific Information: *** Terminating app due to uncaught exception 'NSGenericException', reason: '-[NSAlert runModal] may not be invoked inside of transaction begin/commit pair, or inside of transaction commit (usually this means it was invoked inside of a view's -drawRect: method.)' abort() called terminating with uncaught exception of type NSException Application Specific Backtrace 1: 0 CoreFoundation 0x7fff2d50ad63 __exceptionPreprocess + 250 1 libobjc.A.dylib 0x7fff633f9bd4 objc_exception_throw + 48 2 CoreFoundation 0x7fff2d50abb9 +[NSException raise:format:] + 189 3 AppKit 0x7fff2af0a98c _NSRunModal + 152 4 AppKit 0x7fff2a9d2aa8 -[NSAlert runModal] + 225 5 lazarus 0x0001062d549a COCOAINT_$$_COCOAPROMPTUSER$crcF62BAB40 + 1130 6 lazarus 0x0001062d5640 COCOAINT$_$TCOCOAWIDGETSET_$__$$_PROMPTUSER$crc484A2DB2 + 80 7 lazarus 0x00010625c3ed LCLINTF_$$_PROMPTUSER$crc484A2DB2 + 93 8 lazarus 0x00010625cd09 LCLINTF_$$_PROMPTUSER$crcB76EAC20 + 185 9 lazarus 0x000106125ff0 FORMS$_$TAPPLICATION_$__$$_SHOWEXCEPTION$EXCEPTION + 704 10 lazarus 0x0001065201a8 LCLEXCEPTIONSTACKTRACE$_$TEVENTCONTAINER_$__$$_HANDLEAPPLICATIONEXCEPTION$TOBJECT$EXCEPTION + 440 11 lazarus 0x000106124fca FORMS$_$TAPPLICATION_$__$$_HANDLEEXCEPTION$TOBJECT + 426 12 lazarus 0x0001061256cd FORMS$_$TAPPLICATION_$__$$_RUNLOOP + 157 13 lazarus 0x0001062ca7e8 -[TCocoaApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 136 14 AppKit 0x7fff2a674fd4 -[NSApplication run] + 658 15 lazarus 0x0001062cac13 COCOAINT$_$TCOCOAWIDGETSET_$__$$_APPRUN$TAPPLICATIONMAINLOOP + 83 16 lazarus 0x00010612561f FORMS$_$TAPPLICATION_$__$$_RUN + 95 17 lazarus 0x0001060b405d PASCALMAIN + 701 18 lazarus 0x0001060d7cdc FPC_SysEntry + 12 19 libdyld.dylib 0x7fff64758405 start + 1 Regards, Ryan Joseph -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
Also, about code signing gdb, my setup script will install it for you using either Homebrew or Macports, you get to choose. You may want to try these alternate steps and skip the debugger install steps (the script already installed it), and proceed with the code signing steps: https://gist.github.com/hlissner/898b7dfc0a3b63824a70e15cd0180154 https://www.ics.uci.edu/~pattis/common/handouts/macmingweclipse/allexperimental/mac-gdb-install.html If you used Homebrew, then this bit of code will test if the dnu debugger is properly code signed: SIGNED="$(codesign -dv /usr/local/bin/gdb 2>&1)" echo $SIGNED And on Macports use this code: SIGNED="$(codesign -dv /opt/local/bin/ggdb 2>&1)" echo $SIGNED Unsigned gnu debuggers will include this text in $SIGNED: "object is not signed" -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
On 15/10/2019 02:35, Anthony Walter wrote: Martin, Yes I read the message requesting lldb testing the other day. I haven't taken the time to test it yet, but as I understand it's a great project that will hopefully allow for better debugging (such as inspecting and changing properties at runtime) but is still missing some important functionality. Well, yes one day.. But for today, it means you no longer need to codesign gdb. lldb comes with apples tools. (afaik). And lldb is already codesigned. The IDE combines it with fpdebug in order improves the display of watches (more pascal-ish). -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
Martin, Yes I read the message requesting lldb testing the other day. I haven't taken the time to test it yet, but as I understand it's a great project that will hopefully allow for better debugging (such as inspecting and changing properties at runtime) but is still missing some important functionality. About code signing the gnu debugger, yes this page hopefully will help you get started, but I understand it can be a bit finicky. https://www.getlazarus.org/setup/macintosh/ Most of those steps apply, but the steps to stop the gatekeeper service and restart it may vary a bit depending on your OSX version. Additionally, there may be a more related problem for OSX Catalina users, as it now is forcing non CLI applications from sources other than the official app store to be notarized before being allowed to run. The same gatekeeper service is responsible for this on Catalina. Apparently it can take hours to generate a certificate for you program.app files, and you need to manually insert xml data into the plist data. I've read that Apple has suspended this requirement until sometime in 2020, giving developers more time to adjust, but to me it seems rather draconian. Here is a useful tip though, according to the first comment on a recent HN article you can bypass notarization checks when running your visual apps by right clicking them and selecting open the first time: https://news.ycombinator.com/item?id=21179970 If that doesn't work I've heard holding alt when left clicking your program.app will also bypass notarization checks. And finally, Ryan Joseph put together this useful information and github page related to fpc Catalina development: https://www.mail-archive.com/fpc-pascal@lists.freepascal.org/msg51807.html The short of all this information is: We need more testing. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
On 15/10/2019 02:07, Anthony Tekatch via lazarus wrote: I am having some difficulty with the gdb code signing: You are aware that the IDE now supports LLDB too? https://forum.lazarus.freepascal.org/index.php/topic,42869.0.html -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] OSX 64 bit Cocoa + Catalina Installer
On Mon, 14 Oct 2019 19:10:14 -0400, Anthony Walter via lazarus wrote: > Testers need. > ... > https://www.getlazarus.org/download/?platform=macintosh Thank you for making this. The script itself installed all parts without problems. I am having some difficulty with the gdb code signing: From your code signing link: https://www.getlazarus.org/setup/macintosh/ Step 6 only shows local certificates on my system. A prior step should be: - Select "Keychains: System" from the left side window Then the following line has two problems on my system: codesign -s gdb-cert /opt/local/bin/ggdb my location ios /usr/local/bin my file is gdb (not ggdb) The following line: sudo launchctl load /System/Library/LaunchDaemons/com.apple.taskgated.plist produced this error: /System/Library/LaunchDaemons/com.apple.taskgated.plist: service already loaded Then when I tried to run the example project1 in newly installed Lazarus. I got this error: The GDB command: "-exec-run" returned the error: ",msg="Unable to find Mach task port for process-id 36454: (os/kern) failure (0x5).\n (please check gdb is codesigned - see taskgated(8))"" -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
[Lazarus] OSX 64 bit Cocoa + Catalina Installer
Testers need. I created a new installer for OSX that includes a 64-bit only Cocoa version of FPC and Lazarus. I don't have Catalina installed, so I am looking for testers and any variety of OSX. The installer is a shells script that will walk you through Xcode, Homebrew or Macports, as well as setting up the debugger. You will also be prompted for a install folder that defaults to $HOME/Development/FreePascal, but you can change the install path during installation. This setup will use configuration files inside of their own folder and will not interfere with you existing versions of Lazarus as long as you donot choose the same folder as your already existing fpc and lazarus locations. To uninstall simply delete the folder you choose for install. Download setup.sh from: https://www.getlazarus.org/download/?platform=macintosh Then ... chmod +x setup.sh ./setup.sh After installation is complete you will get convenience lazarus.app file in you install folder which can be moved anywhere including to your Applications folder. Please note, this setup program installs a 64 bit fpc and lazarus with Cocoa only. It does not install a 32 bit fpc and does not use the Carbon widgetset. -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Install Lazarus on Mac OSX Catalina
On Sun, 13 Oct 2019 07:53:05 +0100, Graeme Geldenhuys via lazarus wrote: > As Catalina doesn't have 32-bit support, I would imagine you need to > compile 64-bit FPC first, then build Lazarus with the 64-bit fpc > compiler. I think fpc on my system is already at 64-bit: fpc -iTP x86_64 fpc -iV 3.0.4 fpc -iTO darwin -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus
Re: [Lazarus] Install Lazarus on Mac OSX Catalina
On Sun, 13 Oct 2019 03:11:07 -0400, Anthony Walter via lazarus wrote: > Eventually I gave up on building it myself and used fpcudeluxe instead > to install a Cocoa 64bit compiler and Lazarus. Interesting, how did you get fpcupdeluxe to run on a Mac? I tried downloading: fpcupdeluxe-x86_64-darwin-cocoa.zip from here: https://github.com/LongDirtyAnimAlf/fpcupdeluxe/releases Drag the downloaded file into the Applications folder Clicking on that produced the error: The application "fpcupdeluxe-x86_64-darwin-cocoa" can't be opened -- ___ lazarus mailing list lazarus@lists.lazarus-ide.org https://lists.lazarus-ide.org/listinfo/lazarus