cant build lazarus trunk on latest fpc. lazarus / 64-FPC development ---------------------------------------------------------------------- delphian · 2016-02-19 05:20 i get these errors.. Free Pascal Compiler version 3.1.1 [2016/02/17] for x86_64 Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Win64 for x64 (3104) Compiling fcllaz.pas (3104) Compiling registerfcl.pas (3104) Compiling lazaruspackageintf.pas (10001) PPU Loading C:\LazarusExtras\fpc\3.1.1\units\x86_64-win64\fcl- extra\ServiceManager.ppu (10011) PPU Source: ServiceManager.pas not available (10028) Recompiling ServiceManager, checksum changed for Classes C:\lazarus\packager\registration\registerfcl.pas(43,3) Fatal: (10022) Can't find unit ServiceManager used by RegisterFCL Fatal: (1018) Compilation aborted make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory `C:/lazarus/packager/registration' make: *** [registration] Error 2 ---------------------------------------------------------------------- Jonas Maebe · 2016-02-22 14:49 This means that the compiler is not finding the units corresponding to that compiler version. Try compiling with -vut to see where the compiler looks for the compiled units (*.ppu) ---------------------------------------------------------------------- fpcoder · 2016-02-22 15:04 I'm on vacation and dont remember the steps exactly, but I had the same problem under win64. If I remember right it was because of Lazarus can allow starting only one instance of the IDE but the new mechanism for this was not implemented for win64. I changed the source so the old manager was used and that worked. ---------------------------------------------------------------------- delphian · 2016-02-23 01:40 I am on Win64 dos prompt building using Make All , so i don't know where i should put -vut Delphian ---------------------------------------------------------------------- delphian · 2016-02-23 03:52 i got it to search , but the path the file its looking for it does not search . its located in fcl-extra\src\win ---------------------------------------------------------------------- Jonas Maebe · 2016-02-23 12:47 QuoteI am on Win64 dos prompt building using Make All , so i don't know where i should put -vut To add the option when invoking make, use OPT=-vut Quotei got it to search , but the path the file its looking for it does not search . its located in fcl-extra\src\win The compiler should be configured to look in the directories containing the compiled, installed units. It is not supposed to look in the source directories. How and where did you install your FPC 3.1.1, which configuration file does it use (that is also printed when you use -vut, look for fpc.cfg or ppc386.cfg), and what does that configuration file contain? ---------------------------------------------------------------------- delphian · 2016-02-24 01:15 I built my fpc 3.1.1 using this command line make clean all install OS_TARGET=win64 CPU_TARGET=x86_64 INSTALL_PREFIX=c:/lazarusExtras/FPC/3.1.1 PP=C:\LazarusExtras\fpc\3.0.0\bin\x86_64-Win64\ppcx64.exe DATA2INC=C:\LazarusExtras\fpc\3.0.0\bin\x86_64-Win64\data2inc.exe I've attached my fpc.cfg file ( i have changed the extension so i could attach it) after compiling i have to copy RTL and Packages directory from the source directory into the install prefix path ( if there is a way to get this done with out having to do it manually it would be good to know) ---------------------------------------------------------------------- Jonas Maebe · 2016-02-24 08:49 You don't have to manually copy anything, the "install" part of your make command line will copy all necessary files. I don't use Windows, so I don't know exactly where the files should be. But as mentioned before, if you look at the -vut output of the compiler, it will tell you where exactly it is looking. It will also show how it expands the -Fu-FuC:\LazarusExtras\fpc\3.1.1\... statements you added to fpc.cfg (all directories it finds will be printed as "Using unit path: XXX"). If it doesn't print any such directories, then you can also add -vd to see how the compiler substitutes $fpctarget in those paths, in order to determine whether it is looking in the correct directories. Afterwards, also check those directories to make sure they contain all the .ppu and .o files. ---------------------------------------------------------------------- delphian · 2016-02-24 10:25 regardless of the rtl / packages directory the compiler can find the ppu and o files but its looking for the source which isnt in the search path. With out listing the directories C:\lazarus>make all make -C packager/registration make[1]: Entering directory `C:/lazarus/packager/registration' C:/LazarusExtras/fpc/3.1.1/bin/x86_64-win64/rm.exe -f ../units/x86_64-win64/fcllaz.ppu C:/LazarusExtras/fpc/3.1.1/bin/x86_64-win64/ppcx64.exe -MObjFPC -Scghi -O1 -g -gl -l -vewnhibq -Fu. -Fuc:/pp/units/x86_64-win64/rtl -FE. -FU../units/x86_64-win64 -dx86_64 fcllaz.pas Hint: (11030) Start of reading config file C:\LazarusExtras\fpc\3.1.1\bin\x86_64-win64\fpc.cfg Hint: (11031) End of reading config file C:\LazarusExtras\fpc\3.1.1\bin\x86_64-win64\fpc.cfg Free Pascal Compiler version 3.1.1 [2016/02/24] for x86_64 Copyright (c) 1993-2015 by Florian Klaempfl and others (1002) Target OS: Win64 for x64 (3104) Compiling fcllaz.pas (3104) Compiling registerfcl.pas (10001) PPU Loading C:\LazarusExtras\fpc\3.1.1\units\x86_64-win64\fcl- extra\ServiceManager.ppu (10011) PPU Source: ServiceManager.pas not available (10028) Recompiling ServiceManager, checksum changed for System C:\lazarus\packager\registration\registerfcl.pas(43,3) Fatal: (10022) Can't find unit ServiceManager used by RegisterFCL Fatal: (1018) Compilation aborted make[1]: *** [fcllaz.ppu] Error 1 make[1]: Leaving directory `C:/lazarus/packager/registration' make: *** [registration] Error 2 the issue is its looking for the source which is located in the packages\fcl-extra\src\win which isnt search or listed in the path. i can upload the log with the paths in it ( i've got it , its like 120Kb) ---------------------------------------------------------------------- delphian · 2016-02-24 10:28 should also note this wont happen on non windows platforms as the sericemanager is with in ifdef windows platform in registerfcl.pas uses   LazarusPackageIntf, {$ifdef mswindows}   ServiceManager, <---- this file {$endif}   Classes, SysUtils, Process, DB, BufDataset, SimpleIPC, XMLConf, EventLog; the service manager source is not in the search path. ---------------------------------------------------------------------- Jonas Maebe · 2016-02-24 10:50 The compiler is not supposed to find the sources, because all files should have been compiled and installed by the "make clean all install" you did before. The problem is that you have a ServiceManagers.ppu file that was compiled against a different system.ppu that then one the compiler currently finds. Either the system.ppu or the ServiceManagers.ppu is probably outdated. Perform a "make distclean" in your FPC 3.1.1 source directory, and then search for any remaining "units" directories under packages. If there are any left, delete those manually. This can happen  if you ever did an "svn update" before doing a "make distclean", as in that case if source files are moved to different directories, the compiled units in the old directories won't be cleaned anymore afterwards (since they only get cleaned in the new directories from then on). "make distclean" is the same as "make clean", except that it removes the compiled units for all targets instead of only for the current target. If you always only compile for win64, using "make clean" is also fine. ---------------------------------------------------------------------- delphian · 2016-02-24 11:02 Its my copy of fpc thats causing this i think. i opted to grab a copy of fpc i386-win32 and installed it and tried to compile and it worked some thing went screwy creating my copy of fpc. i am playing with it now re tracing my steps. Delphian ---------------------------------------------------------------------- marcov · 2016-02-24 11:20 The easiest remedy is to delete all .o and .ppu everywhere and then rebuild 1. FPC 2. lazarus. 3. lazarus components 4. your sources ---------------------------------------------------------------------- delphian · 2016-02-24 12:58 Well so far i went back and built FPC 3.0.0 using FPC 2.6.4 ( win32) , that worked then i built FPC 3.1.1 using FPC 3.0.0 i just built in the last step - that worked i am going back to a 64 bit copy of fpc 2.6.4 and use that to build a 64 bit copy of 3.0.0 as starting point ---------------------------------------------------------------------- delphian · 2016-02-24 13:26 its got  something to do with 64 bit generation of fpc. can't put my finger on it yet but 32 bit works ok 64 bit fails. ---------------------------------------------------------------------- delphian · 2016-02-26 02:59 Found the root cause by trail and error. i downloaded laz+fpc (1.6 & fpc 3.0.0 x64) , took the fpc out of the install and changed the paths to where i kept my copy of fpc ( i use a directory called lazarusExtras so i can blow away my lazarus install and not have to work out about loosing stuff ) and using that built fpc 3.1.1 and used the fpc.cfg from 3.0.0 fpc and it now works. suspect the root cause my fpc.cfg i was using was up the creek.