Updated to 1.2.4 win32 cross compiler still using 2.6.2 lazarus / 32-Linux ---------------------------------------------------------------------- snorkel · 2014-06-19 20:17 I recently updated to 1.2.4 and also rebuilt the win32 cross compiler but when I build a win32 app it still showing it's built by 2.6.2 in the version info.  I can't find anywhere where it's point to the old 2.6.2 directory and when build it for linux the version info shows 2.6.4 Any ideas? ---------------------------------------------------------------------- snorkel · 2014-06-19 21:18 well, I removed the 2.6.2 FPC directories and now I can't cross build anything. I get this now: fcllaz.pas(0,0) Fatal: Can not find unit system used by fcllaz of package FCL. I am going by the guide here: http://wiki.lazarus.freepascal.org/Cross_compiling_for_Win32_under_Lin ux#Newer_FPCs_-_2.1.1_and_newer it says for newer versions all I have to do is:  make all OS_TARGET=win32 CPU_TARGET=i386 and $ su -c "make crossinstall OS_TARGET=win32 CPU_TARGET=i386" and then I added this to the fpc.cfg in /etc -Fu/usr/local/lib/fpc/$fpcversion/units/$fpctarget/* This how I got it working for 2.6.2 and the 2.6.4 cross compiler built and installed ok with no errors. So what am I missing? I think a new wiki just for the newer versions of Lazarus and FPC is needed for win32  cross compiling the current one is kind of confusing with the new and old way mixed together. ---------------------------------------------------------------------- BigChimp · 2014-06-19 21:52 Are all your path settings in lazarus options ok? That's all I can really think of.. Quote from: snorkel on June 19, 2014, 11:18:15 pmI think a new wiki just for the newer versions of Lazarus and FPC is needed for win32  cross compiling the current one is kind of confusing with the new and old way mixed together. Very good idea. Please feel free to move the old stuff to a separate page... ---------------------------------------------------------------------- snorkel · 2014-06-20 03:06 Quote from: BigChimp on June 19, 2014, 11:52:02 pmAre all your path settings in lazarus options ok? That's all I can really think of.. Quote from: snorkel on June 19, 2014, 11:18:15 pmI think a new wiki just for the newer versions of Lazarus and FPC is needed for win32  cross compiling the current one is kind of confusing with the new and old way mixed together. Very good idea. Please feel free to move the old stuff to a separate page... Be happy to do that once I get it working again. Non cross compiling works fine, so the paths must be right and the version info shows it's 2.6.4. ---------------------------------------------------------------------- snorkel · 2014-06-20 15:12 Well, I built the win64 cross compiler and that works fine from the IDE. I am rebuilding the win32 one again. Not sure what is going on with the win32 cross compiler, but somewhere it's still pointing to the non existant 2.6.2 FPC. Note: prior to the update to Laz 1.2.4 I did not have the win64 cross compiler installed. ---------------------------------------------------------------------- BigChimp · 2014-06-20 15:55 Hmmm... does your fpc.cfg contain paths pointing to the old FPC install? Also, IIRC a systemwide /etc/fpc.cfg can mess with settings in an fpc.cfg in your user directory. It's documented in the FPC manual section about fpc.cfg but that's definitely not my favourite late night reading... ---------------------------------------------------------------------- snorkel · 2014-06-20 17:24 This is getting frustrating... I uninstalled everything and used the find command to make sure no fpc files where left.  I also made sure no other fpc.cfg files where left anywhere. Then I rebuilt the cross compilers win32 and win64 and the system.ppu for both are here: /usr/local/lib/fpc/2.6.4/units/x86_64-win64/rtl/system.ppu /usr/local/lib/fpc/2.6.4/units/i386-win32/rtl/system.ppu When I build for win64 it works fine no problem. When I build for win32 it can't find the system.ppu now get this if I create this path: /usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/ and put the system.ppu in it it can then find it but craps out because it can't find any of the other required files. Does anyone have any idea what may be holding on to the 2.6.2 path? I also check the env vars and no reference to 2.6.2. What the heck is going on? ---------------------------------------------------------------------- snorkel · 2014-06-20 17:26 I did find / -name fpc.cfg and the only one that came back was in /etc ---------------------------------------------------------------------- snorkel · 2014-06-20 20:18 well, by doing a dirty hack I have it cross compiling win32, I had to do this: cp /usr/local/lib/fpc/2.6.4 /usr/local/lib/fpc/2.6.2 -R by copying the entire structure and contents from the 2.6.4 to a 2.6.2 dir in /usr/local/lib/fpc it now magically works.  I have no freaking idea where it's storing the ref to 2.6.2 since I completely uninstalled all the .debs and then used find to locate any left over FPC files.  I even deleted the .lazarus folder in my home dir. I also used the find function to locate and delete all references to fpc.cfg. ---------------------------------------------------------------------- Martin_fr · 2014-06-20 20:41 well, you should first trace which ppc*** is used. That is you see the IDE call fpc -... and fpc uses some ppc for that. There must be some way to specify a flag that it will tell you the ppcxxx used. Then, you can run this, and check which version it has. You can also use  -va This will display ALL  files accessed, including which fpc.cfg It will be a huge amount of output, so redirect to a file. In Lazarus, you must do "Copy all shown and hidden msgs" ---------------------------------------------------------------------- snorkel · 2014-06-20 20:58 ok will try that. My hack does not fully work as it's picking up the FPC version from somewhere as 2.6.2 so stuff like this is failing:                 {$IF FPC_FULLVERSION>20602}                 PDev.Device := PChar(TmpDevModeA^.dmDeviceName);                 {$ELSE}                 PDev.Device := PChar(PByte(TmpDevModeA^.dmDeviceName));                 {$ENDIF} ---------------------------------------------------------------------- snorkel · 2014-06-20 21:03 With showing everthing I see stuff like this in the messages: PPU Loading /usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/system.ppu PPU Loading /usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/objpas.ppu PPU Loading /usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/classes.ppu I just can't figure this out, I uninstalled everything I could find yet it still thinking the cross compiler is 2.6.2 I am thinking the FPC version lazarus is using is messed up somewhere. with my hack 2.6.2 dir removed the IDE reports this: project1.lpr(0,0) Fatal: Can not find system used by project1, ppu=/usr/local/lib/fpc/2.6.2/units/i386-win32/rtl/system.ppu ---------------------------------------------------------------------- snorkel · 2014-06-20 21:16 I think I may have found the why: in .lazarus (a newly generated one from a fresh install) the FPCdefines.xml file has this:             If I change the FullVersion to 2.6.4 the IDE changes it back to 2.6.2 Also in that same xml file: