Cross compiling from linux64 to win64 lazarus / 1-Linux ---------------------------------------------------------------------- process_1 · 2020-07-17 18:10 https://wiki.freepascal.org/Cross_compiling Here is available all variations except cross compiling from linux64 to win64. Perhaps I'm missing that guide? ---------------------------------------------------------------------- lucamar · 2020-07-17 19:59 It should be basically the same as Cross compiling for Win32 under Linux, only changing "win32" for "win64", "i386" by "x86_64", and so on. ---------------------------------------------------------------------- process_1 · 2020-07-18 00:31 Installed: Code: [Select]sudo apt install mingw-w64 mingw-w64-tools sudo ln -s /usr/bin/x86_64-w64-mingw32-windres /usr/bin/windres sudo dpkg -i fpc-src_3.2.0-1_amd64.deb sudo dpkg -i fpc-laz_3.2.0-1_amd64.deb sudo dpkg -i lazarus-project_2.0.10-0_amd64.deb Win32: Code: [Select]cd /usr/share/fpcsrc/3.2.0 sudo make clean all OS_TARGET=win32 CPU_TARGET=i386 sudo make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usr sudo ln -sf /usr/lib/fpc/3.2.0/ppcross386 /usr/bin/ppcross386 Win64: Code: [Select]cd /usr/share/fpcsrc/3.2.0 sudo make clean all OS_TARGET=win64 CPU_TARGET=x86_64 sudo make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/usr sudo ln -sf /usr/lib/fpc/3.2.0/ppcrossx64 /usr/bin/ppcrossx64 Accordingly, ppccross* are sym linked correctly and can be executed from any active directory : Code: [Select]file:///usr/bin/ppcrossx64 file:///usr/bin/ppcross386 Cross compiling with Win32 settings works fine, however not with Win64. When switch to Win64 settings, error window with following content is shown: " The project uses target OS=win64 and CPU=x86_64. The system.ppu for this target was not found in the FPC binary directories. Make sure fpc is installed correctly for this target and the fpc.cfg contains the right directories. " Obviously, something is missing here, however I'm not certain what. ---------------------------------------------------------------------- dbannon · 2020-07-18 00:53 These are my notes relating to windows  from when I setup my Linux64 to L32, W32, W64 cross compiler, they assume you are using a package installed compiler (ie probably 3.0.4) installed in root space (so must be done as root).  Last time I did it it was with a tarball compiler in user space. I used these notes but unfortunatly I did not update them. (I should probably do it again and update my notes AND the wiki page) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i # Setup 32bit and 64 bit Windowscd /usr/share/fpcsrc/$FPCVERmake clean all OS_TARGET=win32 CPU_TARGET=i386make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=/usrln -sf /usr/lib/fpc/$FPCVER/ppcross386 /usr/bin/ppcross386 make clean all OS_TARGET=win64 CPU_TARGET=x86_64make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=/usrln -sf /usr/lib/fpc/$FPCVER/ppcrossx64 /usr/bin/ppcrossx64 # Make sure its all there (we should see ppcross386, ppcrossx64)echo "watch for ppcross386, ppcrossx64"ls -la /usr/lib/fpc/$FPCVER/ppcross*ls -la /usr/bin/ppcross* Davo ---------------------------------------------------------------------- Fred vS · 2020-07-18 01:05 For cross-compiling from Linux to Windows, you may also use fpc.exe (32 and 64 bit) via wine (Windows emulator). You may even use the fpc Windows installer via wine. It works perfectly and your code is compiled by a native Windows compiler. ---------------------------------------------------------------------- dbannon · 2020-07-18 01:29 Quote from: Fred vS on July 18, 2020, 03:05:08 amFor cross-compiling from Linux to Windows, you may also use fpc.exe (32 and 64 bit) via wine (Windows emulator). You may even use the fpc Windows installer via wine. Always good to have an alterative approach. But would seem a lot of install if you are not otherwise a Wine user ?  And having a "native" cross compiler lets you, for example, run a script that builds all your targets (and, in the case of https://github.com/tomboy- notes/tomboy-ng/blob/master/package/package.bash do some packaging). FPC is so good at cross compiling, surprises me that people have trouble. But I would like to add Mac Cocoa and Raspberry Pi to my script mentioned above. At present, I build them separately. Davo ---------------------------------------------------------------------- Fred vS · 2020-07-18 01:50 QuoteBut would seem a lot of install if you are not otherwise a Wine user ? Yes of course wine must be installed. After this, I just do: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i wine /directory/of/fpc.exe myprogram.pas And no need to install anything else. The advantage to use wine is that after compilation you may run and test your Windows executable with wine. ---------------------------------------------------------------------- process_1 · 2020-07-18 02:12 Wine is quite a ballast. Anyway, I have it installed on dev machine. What was the problem in the past is that Lazarus through wine didn't worked fine, some other executables as well etc. Thus where main difference and the reason to test executable on native OS... I would also like to have cross-compiling  for Mac (OS X) on Linux, however, as far I have understood (I'm not a lawyer), that is forbidden by Apple license... Anyway, my original issue with cross-compiling  on Linux64 to Win64 persists and I'm not certain what causing it, as error message is quite confusing, probably not point to the right cause as compiling and installing cross-platform fpc went without an issue. ---------------------------------------------------------------------- trev · 2020-07-18 03:13 What do you have listed as the compiler in Tools > Options > Compiler executable ? This has caught me out in the past. ---------------------------------------------------------------------- dbannon · 2020-07-18 03:32 Quote from: process_1 on July 18, 2020, 04:12:08 am Anyway, my original issue with cross-compiling  on Linux64 to Win64 persists and I'm not certain what causing it, as error message is quite confusing, probably not point to the right cause as compiling and installing cross-platform fpc went without an issue. OK, I should have read your message more carefully, its a lazarus setup issue rather than compiler by the sound of it. OK, lets check how Lazarus is setup then ? Tools->Options->Environment .... Compiler executable (eg fpc) = /home/dbannon/bin/FPC/fpc-3.2.0/bin/fpc Project Options Config and target      Target OS (-T) = Win64      Target CPU family (-P) = x86_64 Additions and Overrides      (its a grid, for this mode, Win64 release I have ticked  -)      LCLWidgetType := win32     Compiler Commands      Compiler                Command = ppcrossx64 The path to ppcross64 is indicated by the which command - dbannon@uMate2004bVB:~$  which ppcrossx64 [enter] /home/dbannon/bin/FPC/fpc-3.2.0/bin/ppcrossx64 Important that your compiler be set to fpc and that fpc be able o find an appropriate ppcrossx64 in its path. Davo ---------------------------------------------------------------------- process_1 · 2020-07-18 05:26 All is set correctly, AFAICS, but still the error is the same. which ppcrossx64 -> /usr/bin/ppcrossx64 system.ppu is phisically present here: /usr/share/fpcsrc/3.2.0/rtl/units/x86_64-win64 Because of that, the error have no sense. It is funny, but where are i386 compiled files (ppu) ? These are not present in /usr/share/fpcsrc/3.2.0/rtl/units/ ! Here are only two directories listed: x86_64-linux x86_64-win64 Anyway, cross-compilation for i386 (and native Linux64) works fine from Lazarus, but not for Win64. BTW, LCLWidgetType = win32 shouldn't have anything related with win64? Anyway, checking it back brings the same error. ---------------------------------------------------------------------- dbannon · 2020-07-18 05:56 OK, try - ppcrossx64 -it [enter] The list should include Win64. Yes, you should be using the win32 widgets, thats all there is. Look in your Lazarus directory, lcl/units/x86_64-win64, you should have a whole lot of *.o files there, I suspect you won't. If you compiled your own Lazarus, you will know where to find those files, if its a package install, and therefore in root space, its a bit harder. From memory it will be in your home directory, .lazarus and down a few levels because Lazarus makes new files there because it cannot write to to the ones in root space (thats why I always build my own!). Davo ---------------------------------------------------------------------- process_1 · 2020-07-18 06:22 Code: [Select]$ ppcrossx64 Free Pascal Compiler version 3.2.0 [2020/07/17] for x86_64 Copyright (c) 1993-2020 by Florian Klaempfl and others /usr/lib/fpc/3.2.0/ppcrossx64 [options] [options]  Put + after a boolean switch option to enable it, - to disable it. ... The  /usr/share dir is not under root privileges, nor it is any file here. BTW, i386 comiled dir is here: ~/.lazarus/lib/LazUtils/lib/i386-win32 . But win64 is in the share dir! I beleve the mess is made here by mixing directories by compilation process itself, which cannot be my fault as I did all by recommended guide. When components are added in lazarus, it will recompile istelf, the executable will be placed in ./lazarus, as well as  all compiled system files should be there, not in share dir, except for native platform FPC compiler. Then, why when compiled cross-compiler for Win64 files are stored in share dir? That probably makes real mess. Moving all win64 compiled dirs to ./lazarus by side of i386, then all will probably work. Let see... ---------------------------------------------------------------------- process_1 · 2020-07-18 06:36 No, that will not be possible as all compilations for Win64 where under individual libs subdir... It is quite a mess (bad idea, at least) mixing share and ./lazarus directories! I have no idea how to fix that, instead developers itself to look what they did... ---------------------------------------------------------------------- process_1 · 2020-07-18 06:54 BTW, object files (*.o files) for Win64 are in share dir (along with ppu). ---------------------------------------------------------------------- trev · 2020-07-18 07:04 > ~/.lazarus/lib/LazUtils/lib/i386-win32 . But win64 is in the share dir! I believe that Lazarus compiles in the ~/.lazarus directory ONLY when the /usr/local/share or /usr/share (depends on OS) directory is read- only which is the normal case wth any Unix-like OS. It may therefore be you who created the  "mess" when you changed the read-only permissions on your /usr/share directory ---------------------------------------------------------------------- dbannon · 2020-07-18 07:12 Quote from: process_1 on July 18, 2020, 08:22:34 amCode: [Select]$ ppcrossx64 Free Pascal Compiler version 3.2.0 [2020/07/17] for x86_64 Copyright (c) 1993-2020 by Florian Klaempfl and others /usr/lib/fpc/3.2.0/ppcrossx64 [options] [options]  Put + after a boolean switch option to enable it, - to disable it. ... The  /usr/share dir is not under root privileges, nor it is any file here. Sorry, I don't quite see the relevance of /usr/share here. But it definitely SHOULD be under root privileges. When you initially did the first steps to create a cross compiler, you would have had to do that as root, correct ? Are you sure that there was no prior install of FPC there ?  If all works well, all the FPC stuff ends up below the /usr file system. I cannot tell you exactly where as mine is all in user space (a practice I  recommend). Quote from: process_1 on July 18, 2020, 08:22:34 amBTW, i386 comiled dir is here: ~/.lazarus/lib/LazUtils/lib/i386-win32 . But win64 is in the share dir! The i386 files you see are Lazarus files, very important to remember that FPC and Lazarus are two different products. Quote from: process_1 on July 18, 2020, 08:22:34 amI beleve the mess is made here by mixing directories by compilation process itself, which cannot be my fault as I did all by recommended guide. I understand your frustration but I have installed it several times, lots of other people out there do so too. If we can get to the bottom of this problem, together we can improve the wiki documentation, thats how open source works. Quote from: process_1 on July 18, 2020, 08:22:34 amThen, why when compiled cross-compiler for Win64 files are stored in share dir? Sorry, don't understand. lazarus files are stored in $HOME/.lazarus, FPC are generated during that initial creation of the cross compiler, as root. And stored up in the /usr tree. Quote from: process_1 on July 18, 2020, 08:22:34 amThat probably makes real mess. Moving all win64 compiled dirs to ./lazarus by side of i386, then all will probably work. I believe you are better having FPC files in user space and most certainly should have lazarus files there. But people like to install from Packages..... Now, you keep mentioning the share directory, do you mean /usr/share ?  Thats where, in a package install, the FPC source ends up. You will compile a number of units as the there as the last stage of making the cross compiler. As root. Davo ---------------------------------------------------------------------- process_1 · 2020-07-18 07:13 Trev: "It may therefore be you who created the  "mess" when you changed the read-only permissions on your /usr/share directory" How can you be sure that devs are not messed up all that? It is hardly possible that is my failt, since I didn't  messed with nor  changed any permisions, only installed exactly as I already shown upper. How it is possible that cross-compiled files for Win64 are located in share dir, but i386 in ./lazarus dir? That is weird at least. Devs, look at you scripts, please! ---------------------------------------------------------------------- process_1 · 2020-07-18 07:35 @dbannon I have removed previously installed FPC and Lazarus with apt-get and removed manually ./lazarus. I did seen some 3.0.4 residues in /usr/share dir I have removed manually. Some other steps are required? ---------------------------------------------------------------------- dbannon · 2020-07-18 07:37 Quote from: process_1 on July 18, 2020, 09:13:15 amIt is hardly possible that is my failt, since I have not chaned any permisions, only installed exactly as I already shown upper. How it is possible that cross-compiled files for Win64 are located in share dir, but i386 in ./lazarus dir? That is weird at least. Because, as I just said, you are confusing FPC and Lazarus files. I think personally, if you really do have a badly messed up install, especially if it has involved changing permission in places like /usr/share, then you may be better to remove it and start again.  I strongly suggest, given your need to install cross compilers that both FPC and Lazarus should be in user space. Its a well documented process, involves a few medium to big downloads but you end up with a system thats easy to control and easy to modify. And I can assure you, the FPC/Lazarus devs have not shipped packages that would change the permissions on any major root file system. Even the windows using ones. Ever ! Davo ---------------------------------------------------------------------- dbannon · 2020-07-18 07:44 Quote from: process_1 on July 18, 2020, 09:35:42 am.... I did seen some 3.0.4 residues in /usr/share dir I have removed manually. .... OK, now we are making progress.  First, I suggest you make sure you have removed everything associated with Lazarus and FPC and perhaps move $HOME/.lazarus Then, three step process, install FPC, build Lazarus and then the cross compiler. https://wiki.lazarus.freepascal.org/Installing_the_Free_Pascal_Compile r#FPC_Tar_Balls https://wiki.freepascal.org/Installing_Lazarus_on_Linux#Build_Lazarus_ from_Source Then, the cross compiler. I will follow up on that shortly. Davo ---------------------------------------------------------------------- Handoko · 2020-07-18 08:32 Quote from: process_1 on July 18, 2020, 09:35:42 amSome other steps are required? This is how to do the cleaning up: https://forum.lazarus.freepascal.org/index.php/topic,42364.msg295596.h tml#msg295596 ---------------------------------------------------------------------- dbannon · 2020-07-18 09:34 OK, here are some notes I initially prepared to update the wiki but, as usual, never got around to it.  For a while I used fpc320 beta / rc1 and the note were not updated, sorry.  So, I have hacked away here, IT HAS NOT BEEN TESTED but you can see what we are trying to do, if you get a an error message, I am sure you will be able to adjust it accordingly. This all assumes you have installed fpc and its source in the locations mentioned in the wiki page, if you have them somewhere else, you will have to adjust.  (You will probably need to adjust for my mistakes anyway !) Installing Lazarus Cross Compiler Mis named actually, Lazarus does not need anything done to cross- compile, everything you do is done to FPC and its friends. But do build Lazarus, one way or another, from source, you need it in user space. Install FPC from a tarball, I will then build the Lazarus IDE from source so all lazarus files end up in my home directory and I don't need to mess with permissions to to change them. The alt is to use the sourceforge lazarus deb but I found that a bit constricting. Setup Linux i386 compiler and Windows compilers These are the dependencies for the i386 linux compiler. apt install libc6-dev-i386  libx11-6:i386  libx11-dev:i386  libgdk- pixbuf2.0-0:i386  libatk1.0-dev:i386 libgdk-pixbuf2.0-dev:i386  libpango1.0-dev:i386  libgtk2.0-dev:i386 libnotify-dev:i386 we need libc6-dev-i386 (they are just little bash scripts that call ld and as with specific options), see if you have them already - which i386-linux-ld which i386-linux-as If not, they could be installed under /usr but probably makes sense to do so in the same place we put FPC binaries, a place we will add to path, $HOME/bin/FPC/fpc-3.2.0/bin cat > $HOME/bin/FPC/fpc-3.2.0/bin/i386-linux-ld !#/bin/bash ld -A elf32-i386 $@ cat > $HOME/bin/FPC/fpc-3.2.0/bin/i386-linux-as #!/bin/bash as --32 $@ chmod +x  $HOME/bin/FPC/fpc-3.2.0/bin/i386-linux-ld chmod +x  $HOME/bin/FPC/fpc-3.2.0/bin/i386-linux-as # Setup i386 underlying stuff cd $HOME/bin/FPC/SRC/3.2.0/ make all CPU_TARGET=i386 make crossinstall CPU_TARGET=i386 INSTALL_PREFIX=/home/bin/dbannon/FPC/fpc-3.2.0 # Setup 32bit and 64 bit Windows cd $HOME/bin/FPC/SRC/3.2.0 make clean all OS_TARGET=win32 CPU_TARGET=i386 make crossinstall OS_TARGET=win32 CPU_TARGET=i386 INSTALL_PREFIX=$HOME/bin/FPC/fpc-3.2.0/bin/ OK, we now have a working cross compiler, lets build the libraries make clean all OS_TARGET=win64 CPU_TARGET=x86_64 make crossinstall OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=$HOME/bin/FPC/fpc-3.2.0/bin/ // ln -sf /usr/lib/fpc/$FPCVER/ppcrossx64 /usr/bin/ppcrossx64  // ignore, I think.... # Make sure its all there (we should see ppcross386, ppcrossx64) which ppcrossx64 which ppcross386 Notes - All this might be nonsense, I have not proof read it ! To install the necessary 32 bit libraries, we need to add  :i386 to package name Issues with Linux32 Try a compile, its quite likely that the two windows modes will work fine but the Linux32 will fail at the linking stage, you must solve missing libraries and/or object files.  And its a mess ! Multiarch Ubuntu can transparently support both 32bit and 64bit code but there seems there is no agreement about where the necessary extra files live. So, lets deal with the packages first. Lazarus will tell you what its missing in its messages window. Your problem may be that the 32bit library is not installed, it may be installed somewhere where Lazarus is not looking or it maybe that the name Lazarus is checking for does not exist but the library is there all along. So, a good start is to search for the name as mentioned in the lazarus error message, lets say the message mentions  "-lX11" (meaning the linked was passed X11 as a parameter to -l) - find /usr -name "libX11*" /usr/lib/i386-linux-gnu/libX11.so.6.3.0 /usr/lib/i386-linux-gnu/libX11.so.6 /usr/lib/x86_64-linux-gnu/libX11.so /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0 /usr/lib/x86_64-linux-gnu/libX11.so.6 Here (a few lines removed for clarity) we have two real libraries, one in gnu 32bit and one in the gnu 64bit directory. The remainders are symlinks (go ahead, try ls -l on them).  But while there is a symlink called  libX11.so in the 64bit dir, there is not one in the 32bit dir.  And that is what Lazarus is looking for. ln  -s  /usr/lib/i386-linux-gnu/libX11.so.6   /usr/lib/i386-linux- gnu/libX11.so  If there is no 32bit version showing up, install it - sudo apt install libX11:i386 Note the ':i386', thats how we tell it to get the 32bit version. And, the third possibility, its there all along but Lazarus cannot see it, ..... NOTE: at this stage, I initially played with fpc.cfg, however, that now seems unnecessary, maybe it was a one off while generating the cross compiler ??  Anyway, in this block # path to the gcclib, #ifdef cpui386 -Fl/usr/lib/gcc/x86_64-linux-gnu/9/32 #endif I had added -Fl/usr/lib32    and -FL/usr/lib/i386-linux-gnu   confirm later ..... just why this is necessary, I don't know, should Lazarus be searching for the various combinations or should Ubuntu install all possible links ?  In /usr/lib/x86_64-linux-gnu/libX11 for example, we have all possible links.... If you see messages about crtn.o (or crti.0) failure at linking stage,  first check where your 32bit versions of these files are. find  /usr  -name crtn.o They may well be in /usr/lib32 but apparently pointing a -Fl at them does not help (it seems other things, maybe ld itself, does really wants them in the gcc dir). Best thing to do is add a sym link from each to the gcc directory, its already mentioned in fpc.cfg. In my case, the gcc release is '9', your may well be anything from 7 to infinity. Use the one mentioned in your fpc.cfg file, fpcmakcfg knows what its doing. ln -s /usr/lib32/crti.o /usr/lib/gcc/x86_64-linux-gnu/9/32/crti.o ln -s /usr/lib32/crtn.o /usr/lib/gcc/x86_64-linux-gnu/9/32/crtn.o ---------------------------------------------------------------------- process_1 · 2020-07-18 10:26 Thank you Handoko and dbannon. I will try all... But, one thing make me quite curious: why all that is not made inside process to remove packages, even a script publically available? I.e., if all upper care is required in order to remove  all residues from previous versions, as they are config files as well, symbolic links, environment variables etc, why not include that inside removable process? If these scripts to install or upgrade probably read old config files and env. variables, then old ones are certainly necessary to be removed as well, even asking questions to remove each. Specifically for DEB pakage as I do assume it is much better that all install/upgrade/remova process is done by package scripts, not to leave that to user/programmer. That would probably be better also for tracking issues in scripts, since environment is clean for another installation. And perhaps, a sticky thread "How to properly remove old versions for FPC and Lazarus" could be made here if not on wiki pages. ---------------------------------------------------------------------- dbannon · 2020-07-18 10:57 I think the problem requiring "remove all" relates to mixing models.  Some one initially installs via a package manager, because its easy and reliable.  But they quickly come across some limitations of that model and make a few changes, "under the covers". And things become unpredictable. In fact, that process I pointed you too is reasonably free of those sort of problems because it is, firstly self contained and secondly, because it puts the path to your new FPC install ahead of all others.  So, even if you have some manually created compiler lurking somewhere, you should get the recently installed one first so the historic one will be ignored. If the package managers made a full cross compile package, maybe that would solve it. But, fact is, cross compiling is complicated and not needed by most users so, it does not happen. The install we have talked about could be scripted but honestly, its really does not need it, you don't do it that often. And the script itself would have to take a lot of care to make sure everything happens as expected.  Everyones system is a bit different so, a little bit of doing and a lot of checking. By doing it by hand, you get to see and evaluate the result of each step, that way, as soon as something does not work, you can see what happened, adjust what you do and immediately edit the wiki page ! Davo ---------------------------------------------------------------------- PascalDragon · 2020-07-18 12:34 Quote from: process_1 on July 18, 2020, 07:26:22 amsystem.ppu is phisically present here: /usr/share/fpcsrc/3.2.0/rtl/units/x86_64-win64 Did you do a make crossinstall CPU_TARGET=x86_64 OS_TARGET=win64 INSTALL_PREFIX=/whatever? Is that path entered in your fpc.cfg (either the global one in /etc/fpc.cfg or the global one in ~/.fpc.cfg)? It should be something like the following (assuming your INSTALL_PREFIX was indeed /whatever): Code: [Select]# searchpath for units and other system dependent things -Fu/whatever/lib/fpc/$fpcversion/units/$fpctarget -Fu/whatever/lib/fpc/$fpcversion/units/$fpctarget/* -Fu/whatever/lib/fpc/$fpcversion/units/$fpctarget/rtl You could also try to compile a simple example application on the command line and supply -vt to check where the compiler is looking for units, e.g.: Code: [Select]ppcrossx64 -Twin64 -vt helloworld.pas ---------------------------------------------------------------------- process_1 · 2020-07-18 16:00 Probably not the perfect cleaning, however after making and executing this script based on upper info but using DEB packages only, at least Win32 and Win64 cross-compillers compiled demo app without problems from lazarus. Now, only left to find how to fix "Bad EXE format" when running 64-bit exe with wine... ---------------------------------------------------------------------- PascalDragon · 2020-07-18 16:16 Quote from: process_1 on July 18, 2020, 06:00:42 pmNow, only left to find how to fix "Bad EXE format" when running 64-bit exe with wine... Is your wine set up correctly? ---------------------------------------------------------------------- dbannon · 2020-07-19 02:27 Quote from: process_1 on July 18, 2020, 06:00:42 pmProbably not the perfect cleaning, however after making and executing this script based on upper info but using DEB packages only, at least Win32 and Win64 cross-compillers compiled demo app without problems from lazarus. Now, only left to find how to fix "Bad EXE format" when running 64-bit exe with wine... OK, does that 64-bit exe work under windows ?  I personally have not had good experiences with Wine. If you are using it to test if something is OK, and it fails, you never really know if its a Wine problem or a 'something' problem.  Disclaimer, I have not used Wine for a very long time. Davo ---------------------------------------------------------------------- process_1 · 2020-07-19 06:31 Well, I had to install dev. version of wine and wine64 from WineHQ. Simply there is some package dependeces and conflict issues on default repository. At least it work for preliminary test on Linux, as I do not have any Windows machine for a long time now. Wine is far from ideal and many issues can be expected (which I had), but at least I can test briefly executable before I make installation file. Windows seems to be free now (with some restrictions), but I simply do not need it anymore, nor I have spare space on HDD (nor other HDD) to install it. ---------------------------------------------------------------------- dbannon · 2020-07-20 00:09 I would consider Windows running in a VM a much more valid test then one using Wine. After all, I  test my app against six or seven Linux distro at each release, one extra for Windows is not too bad.   Davo