Recent

Author Topic: cant build lazarus trunk on latest fpc.  (Read 10749 times)

delphian

  • New Member
  • *
  • Posts: 39
cant build lazarus trunk on latest fpc.
« on: February 19, 2016, 06:20:00 am »
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

  • Hero Member
  • *****
  • Posts: 1058
Re: cant build lazarus trunk on latest fpc.
« Reply #1 on: February 22, 2016, 03:49:38 pm »
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)

kapibara

  • Hero Member
  • *****
  • Posts: 610
Re: cant build lazarus trunk on latest fpc.
« Reply #2 on: February 22, 2016, 04:04:08 pm »
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.


Lazarus trunk / fpc 3.2.2 / Kubuntu 22.04 - 64 bit

delphian

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #3 on: February 23, 2016, 02:40:24 am »
I am on Win64 dos prompt building using Make All , so i don't know where i should put -vut


Delphian

delphian

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #4 on: February 23, 2016, 04:52:21 am »
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

  • Hero Member
  • *****
  • Posts: 1058
Re: cant build lazarus trunk on latest fpc.
« Reply #5 on: February 23, 2016, 01:47:26 pm »
Quote
I 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

Quote
i 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

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #6 on: February 24, 2016, 02:15:32 am »
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

  • Hero Member
  • *****
  • Posts: 1058
Re: cant build lazarus trunk on latest fpc.
« Reply #7 on: February 24, 2016, 09:49:55 am »
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

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #8 on: February 24, 2016, 11:25:42 am »
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

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #9 on: February 24, 2016, 11:28:48 am »
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

  • Hero Member
  • *****
  • Posts: 1058
Re: cant build lazarus trunk on latest fpc.
« Reply #10 on: February 24, 2016, 11:50:44 am »
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

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #11 on: February 24, 2016, 12:02:11 pm »
 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

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: cant build lazarus trunk on latest fpc.
« Reply #12 on: February 24, 2016, 12:20:43 pm »
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

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #13 on: February 24, 2016, 01:58:23 pm »
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

  • New Member
  • *
  • Posts: 39
Re: cant build lazarus trunk on latest fpc.
« Reply #14 on: February 24, 2016, 02:26:48 pm »
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.

 

TinyPortal © 2005-2018