Forum > macOS / Mac OS X

Runtime dependencies, X11 etc.

(1/2) > >>

wotanica:
Having finally got around to installing lazarus on my mac (use delphi on the pc), im slightly confused about "what is what"  :-\. So i have some basic questions i hope someone can answere me.

1. I had to install X11, does this mean that the applications i build with lazarus will also need x11?
2. Having failed at installing it manually, i resorted to "fink". This worked fine but my output binaries were divided into two (!). One "unix executable file" and one "normal application". When i deleted the unix file my app would not run (i suspected as much). :o Is the smallest executable just a stub to get x11 going?

3. Also, i keep getting "unknown stabs" errors. I disabled the debugger and the output now works (after copying the jpeg library as mentioned on this forum). But why would a jpeg lib cause damage to laz? dont we have native pascal jpeg loaders?

4. Is is not possible at all to get a regular installer for lazarus on the mac? One that dont depend on unix stuff?
Previously i installed the normal commandline freepascal and converted some delphi code. It generated one, single executable with no X11 at all? No criticism, but why the X11 dependency? And will my apps depend on X11 as well?

Kind regards

Leledumbo:

--- Quote ---1. I had to install X11, does this mean that the applications i build with lazarus will also need x11?
--- End quote ---
Depending on widgetset used to build the application. Carbon doesn't, gtk2 does.

kamischi:

--- Quote ---1. I had to install X11, does this mean that the applications i build with lazarus will also need x11?

--- End quote ---
As leledumbo stated above, this depends on the widget set you are using. The carbon widget set does not need X11, the gtk2 widget set does.

--- Quote ---2. Having failed at installing it manually, i resorted to "fink". This worked fine but my output binaries were divided into two (!). One "unix executable file" and one "normal application". When i deleted the unix file my app would not run (i suspected as much). :o Is the smallest executable just a stub to get x11 going?

--- End quote ---
Inside the normal application is a symlink to the unix executable (yourProgram.app -> Contents -> MacOS -> LinkToUnixExecutable). Therefore, the normal applications cannot run, if you delete the unix executable. For testing, this is good enough. For a final normal application, you have to replace symlink in the normal application by the unix executable. If you need more information about the internal structure of a normal application, read this:

http://developer.apple.com/iphone/library/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW13

This helps, too:

http://doc.trolltech.com/4.3/deployment-mac.html

--- Quote ---3. Also, i keep getting "unknown stabs" errors. I disabled the debugger and the output now works (after copying the jpeg library as mentioned on this forum). But why would a jpeg lib cause damage to laz? dont we have native pascal jpeg loaders?

--- End quote ---
The reason for "unknown stabs" errors are related to the format of the debug information. Can you add -gw to your options? I assume your are on 10.6. Is that right? I will have a look at this, but I am very busy the next three weeks and cannot promise a time. I have to check about the jpeg lib.

--- Quote ---4. Is is not possible at all to get a regular installer for lazarus on the mac? One that dont depend on unix stuff?

--- End quote ---
It all depends on man power :)

--- Quote ---Previously i installed the normal commandline freepascal and converted some delphi code. It generated one, single executable with no X11 at all? No criticism, but why the X11 dependency?

--- End quote ---
To enable the creation of applications with the gtk2 widget set.

--- Quote ---And will my apps depend on X11 as well?

--- End quote ---
If you keep the default settings for the widget set to carbon, then no.

--- Quote ---Kind regards

--- End quote ---
I hope this helps. For interactive discussions, there is the lazarus-ide irc channel on freenode.

MiSchi

felipemdc:

--- Quote from: wotanica on August 31, 2010, 04:13:17 am ---1. I had to install X11
--- End quote ---

You probably installed something wrong. The default Lazarus for Mac OS X is based on Carbon and doesn't require X11. Where did you download Lazarus from?

Read the documentation about how to install Lazarus:

http://wiki.freepascal.org/Installing_Lazarus_on_MacOS_X

More specifically the section "Installation from disk images" reads:


--- Quote ---Download and install the three packages FPC, FPCSrc and Lazarus in this order: https://sourceforge.net/project/showfiles.php?group_id=89339

This is the easiest way to install Lazarus on Mac OS X. The FPC sources are installed under /usr/local/share/fpcsrc.
--- End quote ---

There is no mention of "X11" in this page.

And in general I recommend read our wiki documentation:

http://wiki.freepascal.org/Lazarus_Documentation


--- Quote ---3. Also, i keep getting "unknown stabs" errors. I disabled the debugger and the output now works (after copying the jpeg library as mentioned on this forum). But why would a jpeg lib cause damage to laz? dont we have native pascal jpeg loaders?
--- End quote ---

These are linker messages caused by a bug in the Mac OS X Linker. You can safely ignore them.

http://wiki.freepascal.org/Carbon_interface_FAQ#Unknown_Stabs

Our JPEG loaders are native Pascal by the way.


--- Quote ---4. Is is not possible at all to get a regular installer for lazarus on the mac? One that dont depend on unix stuff?
--- End quote ---

It already comes in a regular Mac installer and Lazarus doesn't depend on any Unix stuff. You are doing something wrong. See answer in question 1.


--- Quote ---It generated one, single executable with no X11 at all? No criticism, but why the X11 dependency? And will my apps depend on X11 as well?
--- End quote ---

There exists no X11 dependency, you installing something wrong or in a wrong way.

wotanica:
First, thanks to everyone for helping out, it means a lot.
I think the X11 stuff came in earlier when i downloaded lazarus with the gtk widgets (i probably mixed these up).
Fink also downloaded a truckload of files and compiled it using GCC on the fly, took all night :(

I have tried to completely remove lazarus + fpc from my mac so i could do a clean install, but since im fairly new to the mac - i have no idea where/what files to delete. I had the same problem when i tried linux (where freepascal works brilliantly and out of the box i might add!).

I realize that i have some learning to do when it comes to OS structure, so sorry for that -- and thank you for the pointers on what i need to learn.

One of the core reasons i want this to work on my computer (OSX 10.6.4 / 2,4 intel core duo / 4 gig ram / macbook pro) is because i want to port over code from delphi. I have 10 years of quality classes that are buildt as pascal friendly (portable) as possible. I get frustrated when i cant even get the widget set right on the mac :P This is a typical class: http://delphimax.wordpress.com/2010/01/09/easy-rc4-encryption/

Hm. Okey.
So let's say i want to completely remove lazarus and freepascal. Completely wipe it all from my system.
How exactly do i do this? I know there are some files in /shared - but where is the rest?

On another note:
I have started a group on facebook (an active one), please join to support the pascal language if you have the time: Search for "Delphi developer" in the groups section. Or see delphimax.wordpress.com

Navigation

[0] Message Index

[#] Next page

Go to full version