Recent

Author Topic: July DMG Update: Can't Get Lazarus To Run On OSX  (Read 20899 times)

davidkane

  • Newbie
  • Posts: 3
July DMG Update: Can't Get Lazarus To Run On OSX
« on: August 01, 2005, 05:10:29 am »
Why does Lazarus break the guidelines for installing on OSX?  It should install into an openly available folder (directory) instead of hiding it into places you can't bloody well access without convoluted (and conflicting) information available.  The dmg installs fine.  The latest is supposed to be a binary.  Finder can't find it.  Terminal can't find it.  RealBasic does it properly so why can't Lazarus?  At the very least the dmg should install a shortcut that can be accessed by Finder.  I really want to work in Object Pascal.  I detest RealBasic - but presently I have no option unless I can find Lazarus.  I've tried accessing it every way that has been documented in the Wiki and the posts here on this forum and none of them work.

Vincent Snijders

  • Administrator
  • Hero Member
  • *
  • Posts: 2661
    • My Lazarus wiki user page
Re: July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #1 on: August 01, 2005, 09:06:38 am »
Quote from: "davidkane"
Why does Lazarus break the guidelines for installing on OSX?

What are those guidelines?
As you know, lazarus is still beta and creating proper install procedures is one of the loose ends. For example 'make  instal' doesn't work on any platform (so OSX is not the only one with a handicap). I am not an OSX user, I just have an ssh (console) account on a computer with OSX.
Quote

It should install into an openly available folder (directory) instead of hiding it into places you can't bloody well access without convoluted (and conflicting) information available.

What is this "openly available folder"? I thought /usr/local/share is openly available?
Quote
The dmg installs fine.  The latest is supposed to be a binary.
Finder can't find it.  Terminal can't find it.  RealBasic does it properly so why can't Lazarus?  At the very least the dmg should install a shortcut that can be accessed by Finder.

Hmm, it seems the Finder is not doing a good job at finding thing. How can it be improved? Where should it be? How can I make sure it is running in X windows? AFAIK running it in Terminal won't help, if you didn't start X.

Quote
I really want to work in Object Pascal.  I detest RealBasic - but presently I have no option unless I can find Lazarus.  I've tried accessing it every way that has been documented in the Wiki and the posts here on this forum and none of them work.


You are just the person Lazarus needs: perservering and with a good knowlegde about how things need to be done on OSX.

To help you start lazarus:
Open XTerm.
cd /usr/local/share/lazarus
./lazarus

BTW: feel free to update any documenation, for example on the wiki, as you are probably more knowledgable on OSX than I.

Phil H.

  • Guest
Re: July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #2 on: August 01, 2005, 07:57:01 pm »
You can browse /usr and its subfolders in Finder by choosing Go | Go to Folder in Finder and entering /usr.

You can also search all files on your hard drive by entering this command at a terminal command line:

  sudo find / -name "filename" -print

The only way I could find to start Lazarus is to run it from the command line in an X terminal. Double-clicking the Lazarus executable in Finder doesn't work. However, I was able to start a GUI app I created with Lazarus by double-clicking it in Finder - this automatically started X and then opened by app. I'm not sure what the difference is between Lazarus and my app in this regard. I was also able to create an alias on the desktop to my app and then launch it by double-clicking the alias.

You can't drop Lazarus or apps created with Lazarus onto the Dock. Not sure what the requirements are for an app to be dockable, but this would be a nice feature. Perhaps this limitation has something to do with it being an X app, which requires X11 to be running.

OS X does have a Developer folder. Seems like this might be a more logical place for FPC and Lazarus to be installed than /usr. /usr appears to be some sort of historical oddity on Unix systems that means nothing to Windows or Mac users.

That said, I'm pretty pleased currently with the state of FPC and Lazarus. I've already ported a decent-sized app from Delphi to Lazarus that compiles and runs fine on my Mac too, visually looking almost exactly like its Delphi equivalent on Windows. Lazarus seems to improve with each build, so don't lose heart.

Anonymous

  • Guest
Re: July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #3 on: August 02, 2005, 03:38:15 am »
First off - sorry for going off like a nutter yesterday.  I've been using RealBasic because I couldn't get Lazarus to work on the Mac.  If you've ever used RealBasic you'll know why I'm depressed about it.

Quote from: "Vincent"
Quote from: "davidkane"
Why does Lazarus break the guidelines for installing on OSX?

What are those guidelines?
As you know, lazarus is still beta and creating proper install procedures is one of the loose ends. For example 'make  instal' doesn't work on any platform (so OSX is not the only one with a handicap). I am not an OSX user, I just have an ssh (console) account on a computer with OSX.
Quote


Check out http://developer.apple.com/ue/  It's a *lost of reading.  But is essential IMHO.


It should install into an openly available folder (directory) instead of hiding it into places you can't bloody well access without convoluted (and conflicting) information available.

What is this "openly available folder"? I thought /usr/local/share is openly available?
Quote


Not to all users.  It depends.  OEM versions often don't allow
access to these places.  Most Mac app's can be dragged out
of the distributable to either the desktop or Program folder
(or anywhere else you want to put them).

quote]
Hmm, it seems the Finder is not doing a good job at finding thing. How can it be improved? Where should it be? How can I make sure it is running in X windows? AFAIK running it in Terminal won't help, if you didn't start X.

I started X and still got no result.  Installing to the directories it does
isn't very use friendly.  It's got to go either to a location the user
chooses or to an accessable directory like Program Files.


You are just the person Lazarus needs: perservering and with a good knowlegde about how things need to be done on OSX.

To help you start lazarus:
Open XTerm.
cd /usr/local/share/lazarus
./lazarus

I've tried this.  No sign of it.

BTW: feel free to update any documenation, for example on the wiki, as you are probably more knowledgable on OSX than I.


If I can get it running I will.   :)

BTW - RealBasic allows you to compile for any target via the IDE on any platform?  For example you can compile a Mac binary (executable) on Windows and transfer that to your Mac and it works first time. Anyway
of achieving this with Lazarus - given a large proportion of users are probably coming from Delphi on a Windows machine (like me) and really
only need to test their executables on Mac and *nix?

Anonymous

  • Guest
Re: July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #4 on: August 02, 2005, 03:42:46 am »
Quote from: "Phil H."
You can browse /usr and its subfolders in Finder by choosing Go | Go to Folder in Finder and entering /usr.

You can also search all files on your hard drive by entering this command at a terminal command line:

  sudo find / -name "filename" -print

The only way I could find to start Lazarus is to run it from the command line in an X terminal. Double-clicking the Lazarus executable in Finder doesn't work. However, I was able to start a GUI app I created with Lazarus by double-clicking it in Finder - this automatically started X and then opened by app. I'm not sure what the difference is between Lazarus and my app in this regard. I was also able to create an alias on the desktop to my app and then launch it by double-clicking the alias.

You can't drop Lazarus or apps created with Lazarus onto the Dock. Not sure what the requirements are for an app to be dockable, but this would be a nice feature. Perhaps this limitation has something to do with it being an X app, which requires X11 to be running.

OS X does have a Developer folder. Seems like this might be a more logical place for FPC and Lazarus to be installed than /usr. /usr appears to be some sort of historical oddity on Unix systems that means nothing to Windows or Mac users.

That said, I'm pretty pleased currently with the state of FPC and Lazarus. I've already ported a decent-sized app from Delphi to Lazarus that compiles and runs fine on my Mac too, visually looking almost exactly like its Delphi equivalent on Windows. Lazarus seems to improve with each build, so don't lose heart.


Thanks, Phil.  I'll try out your suggestions.  It certainly would be better if
Lazarus could be installed to a location of the users choice.  Requiring X11 is not a requirement I've met before on the Mac

glober

  • Full Member
  • ***
  • Posts: 130
July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #5 on: August 02, 2005, 04:37:39 am »
First off let me say that I don't exactly know what is possible on a Mac OSX or what is different about a Mac Lazarus installation, but as the OSX is essentially FreeBSD Unix underneath the same principles should apply as to Linux, and that is that I, as Linux user (or as a Windows User for that matter) can run Lazarus from whichever directory I choose. It all depends on your installation method and user permissions. If I'm installing with SVN (used to be CVS until recently), I can choose which directory I download an SVN Lazarus copy to, for one thing. The typical thing to do then is to run 'make' and then 'make install' in that Lazarus directory, which will install Lazarus into the /usr directory space.  But one does not have to do that.  If I omit doing 'make install' and only do 'make', I will have a Lazarus excecutable in the SVN Lazarus directory, and can run it from there. So with SVN you can run Lazarus from wherever you choose, limited only by permissions.

davidkane

  • Newbie
  • Posts: 3
July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #6 on: August 02, 2005, 04:57:20 am »
Quote from: "glober"
First off let me say that I don't exactly know what is possible on a Mac OSX or what is different about a Mac Lazarus installation, but as the OSX is essentially FreeBSD Unix underneath the same principles should apply as to Linux, and that is that I, as Linux user (or as a Windows User for that matter) can run Lazarus from whichever directory I choose. It all depends on your installation method and user permissions. If I'm installing with SVN (used to be CVS until recently), I can choose which directory I download an SVN Lazarus copy to, for one thing. The typical thing to do then is to run 'make' and then 'make install' in that Lazarus directory, which will install Lazarus into the /usr directory space.  But one does not have to do that.  If I omit doing 'make install' and only do 'make', I will have a Lazarus excecutable in the SVN Lazarus directory, and can run it from there. So with SVN you can run Lazarus from wherever you choose, limited only by permissions.


It's true OSX is basically a Free BSD system.  However it is setup so that the OS is totally transparent to the user.  Finder can't find Lazarus because of the .lazarus naming convention.  Anything with a . is ignored by finder and I've not managed to educate it to the contrary.  With the OSX dmg distribution it is not possible to choose where Lazarus resides.  Building manually is not an option I wish to pursue.  I may be being unreasonable but I want it to install where I choose or at least to a common folder like Programs.  RealBasic is distributed as a dmg too.  However the intermediate step of a "package" is not included.  It simply contains a folder.  You simply drag the folder out of the mounted dmg to anywhere you like and it runs first go.  Now IMHO the Lazarus developers are way beyond the abilities of the RealBasic developers.  The RealBasic product is inferior and I prefer object pascal anyway.  So this shouldn't really be a problem.  The Free Pascal compiler could certainly reside at the location it currently does.  All one would have to do is make Lazarus aware of this and for it to access the appropriate directory for the compiler.   :?

davidkane

  • Newbie
  • Posts: 3
July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #7 on: August 02, 2005, 05:23:51 am »
If somebody could supply me the Mac binaries for both FPC and Lazarus I will have a go at setting it up so that it will please Mac users (they are very fussy - not like Windows people at all - though not entirely a bad thing).  I'm happy for it to be supplied in any format (other than the current dmg) using a zip file (aka Winzip or PKZip), or a Rar file etc.  Not necesary for it to be a stuffit file as we don't need to preserve resource forks AFAIK.   :)

Anonymous

  • Guest
July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #8 on: August 02, 2005, 10:06:37 am »
davidkane, thanks for your offer. This windows user, who has learnt some bash scripting needs help to create a pleasing Mac installer. If you can tell how to do it, preferable in a bash script, then I will adapt the lazarus and the fpcsrc dmgs accordingly.
I guess, the fpc installer will have to remain like that and that is not a problem, because the user never starts the compiler by himself.

You can extract the binaries from the dmg. I only know how to do this from the command line, so here it goes. As an example I use the lazarus snapshot dmg, but this can be done with the release too.

Open a terminal and execute the following commands:
# attach dmg, note device (/dev/disk2s2) for detaching and mount point (/Volumes/lazarus-0.9.9)
hdiutil attach /path/to/lazarus-0.9.9-20050802-macosx.dmg
# create a directory for the binaries
mkdir ~/mylaz
cd ~/mylaz
# extract files from pkg
pax -rvzf /Volumes/lazarus-0.9.9/lazarus-0.9.9-20050802.pkg/Contents/Archive.pax.gz
# detach dmg
hdiutil detach /dev/disk2s2

Now you can find the lazarus files in ~/mylaz/usr/local/share/lazarus

HTH,
Vincent.

glober

  • Full Member
  • ***
  • Posts: 130
July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #9 on: August 02, 2005, 06:23:09 pm »
Quote from: "davidkane"
Finder can't find Lazarus because of the .lazarus naming convention.

Are you sure you need to be looking for .lazarus, all the lazarus files including the lazarus or startlazarus executable have regular names without the dot on a linux install. The only thing which is named .lazarus is a lazarus configuration directory which the user doesn't need to worry about, it gets made up and writen to by lazarus automaticaly.

Phil H.

  • Guest
Re: July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #10 on: August 02, 2005, 11:28:27 pm »
Quote from: "Vincent"

What is this "openly available folder"? I thought /usr/local/share is openly available?

To help you start lazarus:
Open XTerm.
cd /usr/local/share/lazarus
./lazarus


Here's a quote from http://developer.apple.com/tools/installerpolicy.html

Quote
If your software is multi-platform, try to accomodate your Mac OS X users by not using /etc, /usr/local, and so on, unless your software is only accessible via the command-line.


Since it appears as though Lazarus can currently only be started from the command-line, then maybe /usr/local/share isn't such a bad place to put it afterall.

-Phil

Anonymous

  • Guest
Re: July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #11 on: August 03, 2005, 11:29:27 am »
Quote from: "Phil H."
Quote from: "Vincent"

What is this "openly available folder"? I thought /usr/local/share is openly available?

To help you start lazarus:
Open XTerm.
cd /usr/local/share/lazarus
./lazarus


Here's a quote from http://developer.apple.com/tools/installerpolicy.html

Quote
If your software is multi-platform, try to accomodate your Mac OS X users by not using /etc, /usr/local, and so on, unless your software is only accessible via the command-line.


Since it appears as though Lazarus can currently only be started from the command-line, then maybe /usr/local/share isn't such a bad place to put it afterall.

-Phil


For some reason my login code isn't working on the forum so I apologize for the guest status of this post.

Even if Lazarus is normally started from the command line there is no reason why it could not be started from a desktop shortcut.  

While several people have suggested ways to start Lazarus (and I appreciate your help) it's still not working.  I requested that the binaries be made availablel to me in another format than dmg.  For example Zip, GZip etc.  But I've not heard from anyone.  I'd be very pleased to assist in getting this worked out - but I need the binaries to work on it and at present I can't get them.

If anybody wants to contact me privately plese email scott@proherp.com

Kind Regards,

David Kane

Anonymous

  • Guest
RE: Re: July DMG Update: Can
« Reply #12 on: August 18, 2005, 09:39:06 pm »
This is what I get:
imachine:~ fred$ cd /usr/local/share/lazarus
imachine:/usr/local/share/lazarus fred$ ./lazarus
dyld: ./lazarus can't open library: /sw/lib/libgdk_pixbuf.2.dylib  (No such file or directory, errno = 2)
Trace/BPT trap

I tried the command given at http://lazarus-ccr.sourceforge.net/index.php?wiki=InstallingLazarus#Installing_Lazarus_under_Mac_OS_X
and I get:
imachine:~ fred$ sudo fink install gtk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc 1.2-13 gtkglarea gtk-engines
Password:
Information about 1497 packages read in 4 seconds.
Failed: no package found for specification 'gtk-pixbuf'!

Seeing that the name of the package differed slightly
I tried to install gdk-pixbuf via Fink Commander but I get a lot of empty packages warnings.

Fink Commander shows current on GTK+ 1.2.10-20

Phil H.

  • Guest
Re: RE: Re: July DMG Update: Can
« Reply #13 on: August 18, 2005, 11:42:56 pm »
Quote from: "Anonymous"
This is what I get:
imachine:~ fred$ cd /usr/local/share/lazarus
imachine:/usr/local/share/lazarus fred$ ./lazarus
dyld: ./lazarus can't open library: /sw/lib/libgdk_pixbuf.2.dylib  (No such file or directory, errno = 2)
Trace/BPT trap

I tried the command given at http://lazarus-ccr.sourceforge.net/index.php?wiki=InstallingLazarus#Installing_Lazarus_under_Mac_OS_X
and I get:
imachine:~ fred$ sudo fink install gtk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc 1.2-13 gtkglarea gtk-engines
Password:
Information about 1497 packages read in 4 seconds.
Failed: no package found for specification 'gtk-pixbuf'!

Seeing that the name of the package differed slightly
I tried to install gdk-pixbuf via Fink Commander but I get a lot of empty packages warnings.

Fink Commander shows current on GTK+ 1.2.10-20


There are two typos in your fink command. Here's what I used:

sudo fink install gdk-pixbuf gtk+ gtk+-data gtk+-shlibs gtk-doc-1.2-13 gtkglarea gtk-engines

The Lazarus error is telling you that you don't have the gdk (not gtk) pixbuf libraries installed.

I haven't used Fink Commander.

Make sure you have the correct version of fink installed for your version of OS X.

Marc

  • Administrator
  • Hero Member
  • *
  • Posts: 2584
Re: July DMG Update: Can't Get Lazarus To Run On OSX
« Reply #14 on: August 23, 2005, 06:45:25 pm »
Quote from: "Anonymous"

Thanks, Phil.  I'll try out your suggestions.  It certainly would be better if
Lazarus could be installed to a location of the users choice.  Requiring X11 is not a requirement I've met before on the Mac


The current lazarus implementation on OSX is based on GTK, which requires X11.
So it is more a unix app than a OSX app. This is also why I think it is OK to install this version in another location than /Applications
//--
{$I stdsig.inc}
//-I still can't read someones mind
//-Bugs reported here will be forgotten. Use the bug tracker

 

TinyPortal © 2005-2018