Can't install UPX to Compress application on MAC lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- freddieboy · 2010-04-07 15:38 I downloaded upx from the web site to reduce the size of my first Lazarus IDE VCL program which was 18 MEG.  Strip will reduce it to 4Meg and then Stuffit to 1 MEG.  I wanted to try upx but after I put it on the MAC and tried to run it from in terminal mode all I get is "unable to execute binary file." As you can see my Unix is very rusty.  I have checked permissions on the program and they are OK.  I just do not know how to install it and the web site assumes you know all that. Can anybody help me or is it too simple for any one to care? Fred ---------------------------------------------------------------------- freddieboy · 2010-04-07 18:01 I am replying to my own post since the problem really was simple.  I found this posting on a UPX forum: Hi, Here is the link for the universal binary of the new release 3.03 of upx. I added this time a version with LZMA support that can enhance compression but is less tested. http://www.idrix.fr/Root/MacOSX/upx-3.03-universal-macosx.tar.gz and for LZMA support : http://www.idrix.fr/Root/MacOSX/upx-3.03-lzma-universal-macosx.tar.gz Cheers, Mounir IDRASSI IDRIX http://www.idrix.fr I downloaded the universal binary and it runs fine on my Max.  Just to summarize: Raw Application with debugging info:  18 M After running STRIP:                            4.2 M After running UPX                                 1.2 M  (without LZMA) After running Stuffit                              1.2 M So I guess UPX does what Stuffit would do but with UPX the program runs without unpacking. Hope this may help someone as dumb as me. Fred ---------------------------------------------------------------------- Marc · 2010-04-08 09:04 Quote from: freddieboy on April 07, 2010, 08:01:16 pmSo I guess UPX does what Stuffit would do but with UPX the program runs without unpacking. Yes. UPX is not some wondertool shrinking your exe, but it is just an selfextracting archiver which can run the compressed exe. This said, it means that every time for every instance the exe is run it needs to be uncompressed and either kept in memory or on some temp drive. So the size may look nice, it's pure artificial ---------------------------------------------------------------------- LazaruX · 2010-04-08 09:13 And the startup speed is also slower ---------------------------------------------------------------------- Zaher · 2010-04-09 19:12 Quote from: BPsoftware on April 08, 2010, 11:13:27 amAnd the startup speed is also slower In WinCE the startup it more faster with UPX ---------------------------------------------------------------------- marcov · 2010-04-09 20:34 Quote from: Zaher on April 09, 2010, 09:12:33 pmQuote from: BPsoftware on April 08, 2010, 11:13:27 amAnd the startup speed is also slower In WinCE the startup it more faster with UPX That probably depends on the medium it is read from. http://wiki.freepascal.org/Size_Matters ---------------------------------------------------------------------- Marc · 2010-04-09 21:54 Quote from: Zaher on April 09, 2010, 09:12:33 pmQuote from: BPsoftware on April 08, 2010, 11:13:27 amAnd the startup speed is also slower In WinCE the startup it more faster with UPX That depends. on WinCE devices you can have 2 kinds of memory, sram and flash. Most devices only can run apps from sram, which means copying program data from (slow) flash to (fast) sram. In this case upx may help, since the program has to be copied anyway, reading a smaller file, results in shorter copy times. However if the app is installed on sram, it doesn't have to be copied, even better, it doesn't even be loaded, since WinCE can execute it directly. Using UPX here will be slower. ---------------------------------------------------------------------- ydk2 · 2013-07-27 22:34 Use HomeBrew and brew install upx, at all. ---------------------------------------------------------------------- marcov · 2013-07-28 09:01 Using UPX is not recommended. It was removed from the FPC distribution due to constant problems and doubtful gains. Both problems in UPX, and external (false positives of antiviruses) ---------------------------------------------------------------------- kamischi · 2013-08-03 12:28 If you are concerned about the size for distributing your Mac OS X application, you should use a compressed disk image. The tool to build it is hdiutil. For an example see the Makefile of Ultrastar Deluxe and check the tag "macosx-dmg". The advantage of a disk image is that it can even be used to start the application directly from the disk image without installing it. Launching a program with a size of 4 MB is nothing to worry about. ---------------------------------------------------------------------- BigChimp · 2013-08-03 12:33 I suspect the OP has solved his problem after 3 years...