Lazarus

Installation => macOS / Mac OS X => Topic started by: tan on July 08, 2017, 04:05:53 pm

Title: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 04:05:53 pm
I don't believe in complaints without suggestions.  In this case, though I can make suggestions and would certainly like to help I don't know enough about the issues to be too authoritarian.  What I CAN tell you is that the state of Mac install is very poor and makes Laz+FPC look unnecessarily bad.  And I would like to help if there is someone or some group who is working on this.

I am CURRENTLY in the process of install so I can't even say I have been successful yet (pray for me).   I do appear to have -- finally -- got the Laz IDE installed.   Once I finally found the dmz link this was pretty easy...but finding that link was NOT easy; about 99% of everything that comes up on the web about installing Laz on a Mac is antiquated and should be deprecated to a "wayback" machine since almost nobody is likely to want to read it and will only be discouraged.  So...suggestions:

(1) Make CURRENT info on Laz install show up FIRST when doing a general search on the web.  DEPRECATE all the overly complex crapola that doesn't apply to 99% of the searchers.  Make normal install a one stop shop and stop pointing into 300 different directions.  The dmz download available from this site works -- it should be the number 1 through 5 links that show up when someone  searches for "lazarus mac install"; "free pascal install for OSX"; "lazarus macos"; and all permutations.  From THERE you can direct people who are weird how to do things the hard way and, generally, the way that doesn't work so well...if they are really gluttons for punishment or have really unusual needs.  As I said, deprecating all the obsolete and generally misleading instructions is project #1.  An example?  Mentioning how to install with "fink" when fink isn't even supported on MacOS any more is NOT what we want to appear on our own website.

(2)  Ideally get homebrew/brew to host a COMPLETE Lazarus+FPC (with ALL associated packages needed).  As I said, Fink is antiquated and we should try to bury its mention in the context of Lazarus and OSX.   I tried to do a homebrew ("brew install lazarus") install as that would have been heaven and brew is the ONLY serious auto installer for Mac these days.   First I had to update it and fix it as my brew had become kind of hosed.    I finally got through my issues (mostly this came down to upgrading to the latest Xcode) with brew.   THEN I found out, to my disappointment, that Brew knows nothing at all about Lazarus.

(3) Deprecate separate FPC discussion.  This might be contentious IF the FPC community is really that distinct from the Lazarus community....  Hopefully that isn't the case; hopefully most sane people realize that "free pascal" is a boring name and "free pascal" was going nowhere fast until Lazarus showed up to make it relevant again.  I think "Lazarus" should be the new name for FPC or, at least, a reliable proxy.  As I said, this may be a political issue but hopefully not a commonsense issue.  It is what it is.

(4) AS MUCH AS POSSIBLE MAKE THE INSTALL A ONE CLICK EXPERIENCE as it pretty much is on Windows.  As I mentioned already I am STILL not running.  What I have been able to do, in SEPARATE STEPS is:
(a) Xcode upgrade VIA MacOS suggestion  (so I didn't have to go to the app store again)
(b) brew fix/ reinstall
(b) gdb (gnu debugger) install VIA brew (somewhere I read this was required ... and sure enough the Laz dmg doesn't install this).
(b) FINALLY found the DMG download after wasting a lot of time reading about fink, trying brew, getting lost in the thicket of options on sourceforge, etc.
(c) Laz told me I was going to be disappointed as there was no FPC compiler
(d) install FPC VIA brew  (thank god for brew)
(e) right now I am waiting (I have been waiting 15 minutes) for Laz to complete "Creating file index of FPC sources".  Why is this taking FOREVER?  Anyway I am stuck here until Laz finishes...and I am PRAYING it does finsih and isn't just permanently hung.

---
Community:  All the brilliant programmers in the world can't properly promote Lazarus merely by coding...there needs to be clean and easy install without all the rat traps sitting around to chew someones leg off.  IS THERE ANY CENTRAL GROUP handing questions of Laz install and support on MacOS/OSX?   How can we help them; how can we help them help us???   It's like all but one foot of a Marathon has been run and we've decided to take a snooze or get stoned or something.   We can do this; certainly I would like to try and help.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: Phil on July 08, 2017, 04:25:55 pm
(1) Make CURRENT info on Laz install show up FIRST when doing a general search on the web.

If you click on the "Downloads (Laz+FPC)" link on the left side of the forum page, 2 more clicks take you to here:

https://sourceforge.net/projects/lazarus/files/Lazarus%20Mac%20OS%20X%20i386/Lazarus%201.6.4/

This page includes brief instructions of what you need to install.

Seems like that's all you need other than Apple's Xcode. You can ignore most of the rest.

Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 04:47:32 pm
I'm about 99% sure that is what I finally did -- once I finally found it.

Right now I am stymied in that the laz dmg startup doesn't include a whole lot of stuff which is absolutely required for it it to be useful.  Specifically it is hung because it doesn't have fpc sources it is trying to find in /usr/local/share/fpcsrc/.

It suggests, lamely: "Directory: /usr/local/share/fpcsrc/

Error: directory not found
You can download FPC and the FPC sources from http://sourceforge.net/projects/lazarus/?source=directory"

Ok.  So I make the directory and go to the suggested directory.  I don't see anything to "download" except the dmg again.  But I already DID that. It is, as I said, the dmg which is telling me it didn't bring the source files it says it requires along with it.  Why not?  And where it says I can download...well, I don't see them.

This is known as a "chicken and egg" problem.  Or (I can hopefully say this without getting arrested by the PC Police because I am 100% ethnic Polish):  "How do you drive a Pollack crazy?  Put him in a round room and tell him to go pee in a corner."

Suggestions??
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: Phil on July 08, 2017, 04:59:48 pm
It suggests, lamely: "Directory: /usr/local/share/fpcsrc/

Try installing the disk images in the order given: fpc, fpc-src, then lazarus.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 05:07:11 pm
I stand corrected.  Your last link DOES take me to a page where the fpc-source has a separate dmz.  I am doing that now and will update on the results.
--
Ok.  Now I did the finder install of fpc...and it says it can't install on my disk because "Free Pascal Compiler ... can't be installed on this disk. You have to install Xcode and its command line tools before...."  BUT I DID THAT TWO HOURS AGO.

The original point of my first post still stands. This is NOT user friendly.  This is NOT acceptable; at least not if we want to gain relevance.

WHY ISN'T THERE A COMPLETE DOWNLOAD AND INSTALL OF EVERTHING -- AT LEAST AS AN OPTION?  I bet 98%+ of all wanna-be users have EXACTLY the same basic needs with close-enough to exactly the  same configuration (the latest version of the OS).   Why isn't there a one click that takes care of it all?  It's like being a great painter in ability with the bad habit of breaking your painting hand with a hammer each morning to fix it.

Next suggestion?  I really would like to get this running.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 05:14:16 pm
BTW Phil, thanks for trying to help.  I'm sure you've got other things more fun to do than chatting with a newbie.  And, probably, at the end of the day the source of my problems will all resolve.  But I think I'm a decent proxy for newbie users;   A little bit of better installation documentation and, ideally, automation would go a long way.

I also want to say one more thing:  As much as I am complaining about the install not being "good enough", Laz and this community is probably in the top 5% when it comes to overall friendliness.  For a real miserable time, just try to get Haskell and Yesod running per directions.  :o
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: Phil on July 08, 2017, 05:20:42 pm
Ok.  Now I did the finder install of fpc...and it says it can't install on my disk because "Free Pascal Compiler ... can't be installed on this disk. You have to install Xcode and its command line tools before...."  BUT I DID THAT TWO HOURS AGO.

Maybe you didn't read the very short Getting Started.rtf included in the FPC disk image?

You can also install the command line tools separately. There's a .dmg that you can download from Apple's developer site. For example, for El Capitan, it's Command_Line_Tools_macOS_10.11_for_Xcode_8.2.dmg.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 05:55:09 pm
Actually, I HAD seen mention of the need for command line tools.  However, as the vast majority of "documentation" on how to install Laz on Mac is either hopelessly obsolete or at cross-purposes, and because I wasn't a registered developer anyway, didn't go down that path.

I REALLY appreciate your help and I guess I am going to try and register and download the "command line tools" (which are no longer downloadable from within Xcode, I guess).

Everything you've said so far, though, although helpful (pointing in the right direction) DOES pretty well support my original contention:  "MacOS Installation IS a mess which makes Laz look bad."  And I sure to God HOPE "We can do better."  If we can't we might as well give up because no matter how great Laz is most of the programming world will never jump through all the hoops required to see for itself.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: Phil on July 08, 2017, 05:58:56 pm
Actually, I HAD seen mention of the need for command line tools.

So I assume you tried what Getting Started.rtf suggests. In a Terminal window:

xcode-select --install



Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 05:59:52 pm
BTW, Phil.   Please see my other post about wanting to subsidize a meetup of the Laz community.  As a "hero" member you might be in a better position to reach out to the core development team and see if there is any interest in my offer; it is for real.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 06:02:15 pm
Re "xcode-select" I did see that but forgot to try it. I will do that now.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 06:06:43 pm
Ok I just tried.  I was, at first, encouraged as it said I needed to install the command line tools first and THEN offered to do that!

So I said "yes" and a few seconds later is says  "Can't install".  Just that -- and nothing more.   No explanation, no suggestion on why it won't install and what I might do about it. >:(  Shame on apple!
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: Phil on July 08, 2017, 06:18:08 pm
Ok I just tried.  I was, at first, encouraged as it said I needed to install the command line tools first and THEN offered to do that!

So I said "yes" and a few seconds later is says  "Can't install".  Just that -- and nothing more.   No explanation, no suggestion on why it won't install and what I might do about it. >:(  Shame on apple!

No idea. I see lots of reports on similar problems though, so Google is your friend, as they say.

https://stackoverflow.com/questions/20366125/xcode-select-install-failing

Are you running macOS 10.12 Sierra? And installed Xcode 8.3?

Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: carl_caulkett on July 08, 2017, 06:26:02 pm
Hey Tan, what version of macOS are you running? When I wanted to install Lazarus, I had the problem that I needed to install the Xcode command line tools but my current version of macOS at the time 10.11 El Capitan prevented me doing so. In the end, I had to do a firmware upgrade of my elderly Mac Pro from 4.1 to 5.1 before I could upgrade the OS to macOS 10.12.5 Sierra. Once I did that, Xcode and Lazarus installed without a hitch, although as has been pointed out, it is CRUCIAL to install from the zip files in the correct sequence.

If the macOS is the issue, it's worth noting Phil's comment "You can also install the command line tools separately. There's a .dmg that you can download from Apple's developer site. For example, for El Capitan, it's Command_Line_Tools_macOS_10.11_for_Xcode_8.2.dmg.", although I have to say that when I was having these problems, I couldn't find a compatible download, so YMMV.

Good luck,
Carl
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 06:41:29 pm
MacOS 10.12.4.   Just updated to this yesterday -- followed by Xcode update -- specifically in hope of getting homebrew working in order to have better luck with Lazarus installation.   So this is kind of a hair pulling exercise but hopefully not a total waste as I am, at least, documenting that Laz installation on Mac is (or can be) a bit of an impediment to greater Laz adoption.   8-)

I even went to https://freepascal.org/down/i386/macosx-netherlands.var hoping to find help there.  But it just loops me back to xcode-select --install.    From there I went to the appstore thinking to download xcode yet again (there was an implication that it might include command line tools if downloaded that way.   But there I was reading that it costs $100 to register as a developer in order to download the command line tools?  Is this correct?
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: Phil on July 08, 2017, 06:52:13 pm
MacOS 10.12.4.

Here's an article that popped up #1 when I searched:

https://www.freepascal.org/~michael/articles/lazonmac/lazonmac.pdf

Maybe you need to accept the license agreement first?
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tan on July 08, 2017, 07:38:22 pm
Phil:   I'll resume the attempt tomorrow, or maybe later today.  I'm willing to take whatever steps I need to, within reason.   I think my #1 point is still my #1 sticking point:   the shear indeterminacy of what is required, when probably 98% of Mac *prospects* (I think it is valuable to remember that many are *prospects* who don't know Laz and have been disappointed before with other platforms and are half expecting to be disappointed again)  could be helped with updated step-by-step instructions (start with MacOS update and Xcode update).   Or -- something worth considering again -- would it be doable to have homebrew more fully support configuration management for the Mac?

Thanks again for your help.  I suppose it is a violation of Apple rights for there to be a separate source of the command line tools?  If not, that would be a great thing to include in a homebrew configuration installation.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tvleavitt on April 20, 2018, 02:17:05 pm

(e) right now I am waiting (I have been waiting 15 minutes) for Laz to complete "Creating file index of FPC sources".  Why is this taking FOREVER?  Anyway I am stuck here until Laz finishes...and I am PRAYING it does finsih and isn't just permanently hung.


I gotta wonder how many other OS X folks have actually gotten to this point, since this is the only reference to this problem, and as an OS X user myself, I appear to have run into it as well. The installer just beeps at me when I click on the box with this message. It's acting like there's a dialogue box open somewhere that I'm not responding to, but I don't see it. Kind of frustrating, after I jumped through all the hoops required to get gdb signed (instructions don't mention that you can't save to the System).
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: Trenatos on April 20, 2018, 03:53:14 pm
The easiest solution I've found to install Lazarus on a Mac is using FPCUpDeluxe, and even that isn't very straight forward unless you know what all the options are.

I agree with the OP, promoting Lazarus doesn't happen through code.

It's the world of programming, software developers WANT things to be about the good choice, the right tools, productivity, etc. but in reality it's just PR and sales...

"It's not what you know, it's who you know" - It applies to languages as well as people.

Now for solutions, because I agree with the OP here too, can't just whine:

Standalone Mac DMG installer OR Homebrew installer which should install FPC, Lazarus, and cross compilers.

Updated website with a nice modern design, learning materials/guides/courses (Goal based), and actual PR campaigns.

If your company uses FPC/Laz, see if they're willing to promote or support somehow.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: tvleavitt on April 21, 2018, 03:38:26 am

(e) right now I am waiting (I have been waiting 15 minutes) for Laz to complete "Creating file index of FPC sources".  Why is this taking FOREVER?  Anyway I am stuck here until Laz finishes...and I am PRAYING it does finsih and isn't just permanently hung.


I gotta wonder how many other OS X folks have actually gotten to this point, since this is the only reference to this problem, and as an OS X user myself, I appear to have run into it as well. The installer just beeps at me when I click on the box with this message. It's acting like there's a dialogue box open somewhere that I'm not responding to, but I don't see it. Kind of frustrating, after I jumped through all the hoops required to get gdb signed (instructions don't mention that you can't save to the System).

Half a day later, it's still stuck. Edit: killing and restarting appears to have resolved the issue... or at least, I can start the IDE now.
Title: Re: MacOS Installation is a mess which makes Laz look bad. We can do better.
Post by: dbannon on April 21, 2018, 05:46:21 am

The very first thing I ever did on a Mac was install Lazarus, I used this page -
http://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X
and afterwards made some substantial changes to the page to try and get things in order.

I made the point right at the top of the page that its a FIVE step process. You MUST do each step, you must do them in the order presented !

Step Two is get the command line tools. I made it a separate step 'cos people seemed to like skipping ....

Step Four is about the actual FPC and Lazarus. There is a link there, click it, then two clicks to the DMG files. Again, the instructions tell you to install in a particular order. For some reason, people don't ....

And Step Five, please note you must press Enter at the end of the line of text you have pasted in. And you can paste into it now.

Been some months since it all worked for me, lots of Apple updates, please consider updating those five steps !

Yep, I agree there is a lot of old stuff on the wiki, I was very reluctant to remove it so, on that page, I pushed it down below a heading "Legacy Information".

I consider searching for things on the Wiki a real problem. Most new arrivals, like me, wonder what on earth all that out of date stuff is there for. But we are not brave enough to discard it !

David

TinyPortal © 2005-2018