32bit Executable on x86_64 platform lazarus / 32-Linux ---------------------------------------------------------------------- gabriemarcelo · 2013-09-24 11:14 Hi guys, I've created an app in Lazarus targeting Linux i386. The executable runs fine on both 32bit as well as on 64bit machines. My question is... do I have to compile the app to target Linux x86_64 instead of distributing the 32bit executable? I also notice that the same app compiled to i386 is 5MB while compiled to x86_64 is 7MB. Why the big diff in size? Sorry but I'm newbie on FP & linux. Thanks in advance for any comments. ---------------------------------------------------------------------- Ocye · 2013-09-24 11:35 Programs ('Apps' are not desktop application) in 32bit architecture will run on 64bit systems if all dependencies are solved. You may run ldd to identify which libraries your program needs. Usually dependencies are solved by the package manager, after the distributor (i.e. you) did specify them in the respective file. That is either rpm, deb, or pkg (or tar.gz if you find a way to compile the source code on client systems). Read the how-to [1] to learn more. Additionally you should care about Qt vs. Gtk2/3 to make sure that your program fits both KDE and Gnome. That's IMHO more important than 32 vs 64bit. [1] http://wiki.freepascal.org/Deploying_Your_Application#Unix_installers ---------------------------------------------------------------------- gabriemarcelo · 2013-09-24 17:48 thanks Ocye! any comment on the size diff between both executables when compiling one for i386 and the same for x86_64? ---------------------------------------------------------------------- Rails · 2013-09-24 18:40 KDE and Gnome aren't the only desktops available to Linux users. They are just the best known. Any desktop should be able to handle an app (yes, app, it's simply a contraction for application, not a term owned by the mobile crowd)  compiled for either GTK2 or QT as long as the requisite libraries are installed. Most Linux users use a mix of applications and will already have the libraries installed. A couple of things to be aware of. GTK3 isn't ready for prime time in Lazarus, and QT produces much, much faster applications than GTK2. ---------------------------------------------------------------------- Leledumbo · 2013-09-25 02:59 Quoteany comment on the size diff between both executables when compiling one for i386 and the same for x86_64?Generally, x86_64 programs would be bigger, maybe twice as, especially if it uses a lot of pointers (since the main data type that will differ between this two arch is pointer). ---------------------------------------------------------------------- Ocye · 2013-09-25 11:11 (Spoiler: All discussion out of topic) >KDE and Gnome aren't the only desktops available to Linux users Pure X programs, Motif, or TCL/TK with FPC? Or do you want to point out that Gnome (aka GTK+, GTK2) is used for LXDE and XFCE as well? >(yes, app, it's simply a contraction for application, not a term owned but the mobile crowd) I suggest to separate desktop environment from mobile devices by calling it program or application. >Most Linux users use a mix of applications and will already have the libraries installed. I disagree. Most users do not have both frameworks running. Especially Gnomies do not want to install almost the complete KDE. >QT produces much, much faster applications than GTK2. Any evidence for this argument? ---------------------------------------------------------------------- Rails · 2013-09-25 12:08 Quote from: Ocye on September 25, 2013, 01:11:38 pm(Spoiler: All discussion out of topic) >KDE and Gnome aren't the only desktops available to Linux users Pure X programs or TCL/TK with FPC? Or do you want to point out that Gnome (aka GTK+, GTK2) is used for LXDE and XFCE as well? >(yes, app, it's simply a contraction for application, not a term owned but the mobile crowd) I suggest to separate desktop environment from mobile devices by calling it program or application. >Most Linux users use a mix of applications and will already have the libraries installed. I disagree. Most users do not have both frameworks running. Especially Gnomies do not want to install almost the complete KDE. >QT produces much, much faster applications than GTK2. Any evidence for this argument? Just because Gnome and GTK are both part of the GNU Project doesn't make them equal. Running QT apps on a XFCE desktop, for example, which is something I do, does not require any KDE garbage, only the necessary QT libraries. I am going to strongly disagree with you on the use of the term app versus application. Microsoft, Apple, and others, but especially those two, try to exert control over people by copyrighting or attempting to copyright common terms. In other words, they want to convert public terms to private use for private profit. Microsoft did that with Windows, and the the US Government let them get away with it by awarding a copyright to the word Windows with the upper case W. Apple tried the same thing with app. AFAIK, they were turned down. The abbreviation app has been in general English language use as slang for application for a long, long time. Native English speakers tend toward short slang terms for rather long technical terms, and app falls in that category. We are not going to change just because the ghost of Steve Jobs, the semi-comatose personage of Steve Ballmer, or anyone else wishes otherwise. You can Google GTK2 versus QT and find plenty of information on the speed differences, especially in animations, something which QT was designed specifically to handle. This forum also has posts regarding the slowness of GTK2. Personally, I had to switch my project's target widget set to QT from GTK2 because it was far too sluggish in GTK2. I look forward to trying GTK3 when it is ready in Lazarus. It is a ground up redesign and should be much faster. ---------------------------------------------------------------------- Leledumbo · 2013-09-25 12:59 Quote>QT produces much, much faster applications than GTK2. Any evidence for this argument?My Lazarus Qt installation everywhere. I don't know what's wrong with GTK2, but it seems indeed slower than Qt. I have several Qt and GTK2 apps and Qt ones are almost always faster after loaded. The startup times is longer and memory usage is higher though. ---------------------------------------------------------------------- Ocye · 2013-09-25 13:39 Quote from: Rails on September 25, 2013, 02:08:37 pmWe are not going to change just because the ghost of Steve Jobs, the semi-comatose personage of Steve Ballmer, or anyone else wishes otherwise.Acknowledged, I will verify my opinion. Quote from: Leledumbo on September 25, 2013, 02:59:48 pmMy Lazarus Qt installation everywhere.When I compile my program for Gtk2 or Qt both run smooth. I'll take a closer look at controls. Personally, I prefer Qt and would like to have those arguments. But I'm afraid the alleged speed advance is too sophisticated. Anyway, we are far away from topic (which might be solved).