Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-01

Compiling IDE issues using FreeBSD 9.1 & FPC 2.6.0

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Lazarus IDE fails to compile under FreeBSD 9.1 (64-bit) using FPC 2.6.0.

First of all, the Readme.txt file is wrong. It says to use 'make clean all', well apparently not so under FreeBSD. After peeking at the Makefile in the /usr/ports/editors/lazarus/ directory, I guessed I should use 'gmake' instead. This started compiling lazarus, but then I got an issue of a missing unit.

I've checked out Lazarus Trunk r40096.

ps:
I don't want to install FPC and Lazarus from ports, because I want different install locations, and will be switching to FPC 2.6.1 (fixes) branch soon. Also I want to try Lazarus Trunk, instead of 1.0.4.

----8<-------------8<-------------8<-------------8<-------------8<---- $ uname -a
FreeBSD graeme-desktop 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012
:/usr/obj/usr/src/sys/GENERIC amd64

$ echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/graemeg/bin:/data/devel/fpc-2.6.0/x86_64-freebsd/bin
$ pwd
/data/devel/lazarus

$ gmake bigide
...snip...
Compiling otheridentifiertree.pas
Assembling otheridentifiertree
Compiling codetoolscfgscript.pas
Assembling codetoolscfgscript
Compiling ctxmlfixfragment.pas
Assembling ctxmlfixfragment
Compiling codetoolsfpcmsgs.pas
Assembling codetoolsfpcmsgs
Compiling unitdictionary.pas
Assembling unitdictionary
Compiling ctloadlaz.pas
Assembling ctloadlaz
Compiling ctunitgroupgraph.pas
Assembling ctunitgroupgraph
Assembling codetools
117099 lines compiled, 5.6 sec
/bin/cp -f Makefile.compiled units/x86_64-freebsd/CodeTools.compiled gmake[1]: Leaving directory `/data/devel/lazarus/components/codetools' gmake -C lcl LCL_PLATFORM=nogui
gmake[1]: Entering directory `/data/devel/lazarus/lcl' /bin/rm -f units/x86_64-freebsd/alllclunits.ppu
/data/devel/fpc-2.6.0/x86_64-freebsd/bin/ppcx64 -gl -Fu../packager/units/x86_64-freebsd
-Fu../components/lazutils/lib/x86_64-freebsd -Fu. -Funonwin32 -Fuforms -Fuwidgetset -Fiinclude -FE. -FUunits/x86_64-freebsd -Cg -dx86_64 alllclunits.pp
Free Pascal Compiler version 2.6.0 [2011/12/30] for x86_64 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: FreeBSD for x86-64
Compiling alllclunits.pp
Compiling barchart.pp
Compiling lclproc.pas
Compiling lclstrconsts.pas
Writing Resource String Table file: lclstrconsts.rst Assembling lclstrconsts
PPU Loading units/x86_64-freebsd/fileutil.ppu
PPU Source: fileutil.pas not found
PPU Source: fileutil.inc not found
Recompiling FileUtil, checksum changed for LCLStrConsts fileutil.pas(42,62) Fatal: Can't find unit FileUtil used by LazLogger Fatal: Compilation aborted
gmake[1]: *** [alllclunits.ppu] Error 1
gmake[1]: Leaving directory `/data/devel/lazarus/lcl' gmake: *** [lazbuild] Error 2
----8<-------------8<-------------8<-------------8<-------------8<----

Yet, if I do the following, it does seem to find the unit in the directory hierarchy.

$ find . -name fileutil.* -print
./components/lazutils/fileutil.inc
./components/lazutils/lib/x86_64-freebsd/fileutil.ppu ./components/lazutils/lib/x86_64-freebsd/fileutil.o ./components/lazutils/fileutil.pas
./docs/xml/lazutils/fileutil.xml
./lcl/units/x86_64-freebsd/fileutil.ppu
./lcl/units/x86_64-freebsd/fileutil.o

Any ideas?

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys

OK, it seems that there is a problem with the 'gmake bigide' option. I always used to use 'make bigide' under Linux, so wanted to use the same options under FreeBSD.

Atfer that failure, I thought what the hell, let try a few others. I then tried 'gmake clean all' for the minimal IDE, and that worked correctly.

So again, it seems somewhere in the Makefile there is an issue with the 'bigide' option, or one of the packages that 'bigide' pulls in has a compile problem under FreeBSD.

Regards,
- Graeme -

Graeme Geldenhuys wrote 57 lines
$ gmake bigide ...snip... Compiling ctunitgroupgraph.pas Assembling ctunitgroupgraph Assembling codetools 117099 lines compiled, 5.6 sec /bin/cp -f Makefile.compiled units/x86_64-freebsd/CodeTools.compiled gmake[1]: Leaving directory `/data/devel/lazarus/components/codetools' gmake -C lcl LCL_PLATFORM=nogui gmake[1]: Entering directory `/data/devel/lazarus/lcl' /bin/rm -f units/x86_64-freebsd/alllclunits.ppu /data/devel/fpc-2.6.0/x86_64-freebsd/bin/ppcx64 -gl -Fu../packager/units/x86_64-freebsd -Fu../components/lazutils/lib/x86_64-freebsd -Fu. -Funonwin32 -Fuforms -Fuwidgetset -Fiinclude -FE. -FUunits/x86_64-freebsd -Cg -dx86_64 alllclunits.pp Free Pascal Compiler version 2.6.0 [2011/12/30] for x86_64 Copyright (c) 1993-2011 by Florian Klaempfl and others Target OS: FreeBSD for x86-64 Compiling alllclunits.pp Compiling barchart.pp Compiling lclproc.pas Compiling lclstrconsts.pas Writing Resource String Table file: lclstrconsts.rst Assembling lclstrconsts PPU Loading units/x86_64-freebsd/fileutil.ppu PPU Source: fileutil.pas not found PPU Source: fileutil.inc not found Recompiling FileUtil, checksum changed for LCLStrConsts fileutil.pas(42,62) Fatal: Can't find unit FileUtil used by LazLogger Fatal: Compilation aborted gmake[1]: *** [alllclunits.ppu] Error 1 gmake[1]: Leaving directory `/data/devel/lazarus/lcl' gmake: *** [lazbuild] Error 2 ----8<-------------8<-------------8<-------------8<-------------8<---- Yet, if I do the following, it does seem to find the unit in the directory hierarchy. $ find . -name fileutil.* -print ./components/lazutils/fileutil.inc ./components/lazutils/lib/x86_64-freebsd/fileutil.ppu ./components/lazutils/lib/x86_64-freebsd/fileutil.o ./components/lazutils/fileutil.pas ./docs/xml/lazutils/fileutil.xml ./lcl/units/x86_64-freebsd/fileutil.ppu ./lcl/units/x86_64-freebsd/fileutil.o Any ideas? Regards, - Graeme -

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 11 lines
OK, it seems that there is a problem with the 'gmake bigide' option. I always used to use 'make bigide' under Linux, so wanted to use the same options under FreeBSD. Atfer that failure, I thought what the hell, let try a few others. I then tried 'gmake clean all' for the minimal IDE, and that worked correctly. So again, it seems somewhere in the Makefile there is an issue with the 'bigide' option, or one of the packages that 'bigide' pulls in has a compile problem under FreeBSD.

Please create a bug report with the complete output of the "make clean bigide" output.

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner
Mattias Gaertner wrote
> 'bigide' option, or one of the packages that 'bigide' pulls in has a > compile problem under FreeBSD. Please create a bug report with the complete output of the "make clean bigide" output.

And the dates of both fileutil.ppu's.

Reply by email

Mattias Gaertner
to Graeme Geldenhuys: OK, it seems that there is a problem with the 'gmake bigide' option. I always used to use…
Show quoted text 46 lines
[...] On 01/31/13 17:25, Graeme Geldenhuys wrote: > > $ gmake bigide > ...snip... > Compiling ctunitgroupgraph.pas > Assembling ctunitgroupgraph > Assembling codetools > 117099 lines compiled, 5.6 sec > /bin/cp -f Makefile.compiled units/x86_64-freebsd/CodeTools.compiled > gmake[1]: Leaving directory `/data/devel/lazarus/components/codetools' > gmake -C lcl LCL_PLATFORM=nogui > gmake[1]: Entering directory `/data/devel/lazarus/lcl' > /bin/rm -f units/x86_64-freebsd/alllclunits.ppu > /data/devel/fpc-2.6.0/x86_64-freebsd/bin/ppcx64 -gl > -Fu../packager/units/x86_64-freebsd > -Fu../components/lazutils/lib/x86_64-freebsd -Fu. -Funonwin32 -Fuforms > -Fuwidgetset -Fiinclude -FE. -FUunits/x86_64-freebsd -Cg -dx86_64 > alllclunits.pp > Free Pascal Compiler version 2.6.0 [2011/12/30] for x86_64 > Copyright (c) 1993-2011 by Florian Klaempfl and others > Target OS: FreeBSD for x86-64 > Compiling alllclunits.pp > Compiling barchart.pp > Compiling lclproc.pas > Compiling lclstrconsts.pas > Writing Resource String Table file: lclstrconsts.rst > Assembling lclstrconsts > PPU Loading units/x86_64-freebsd/fileutil.ppu > PPU Source: fileutil.pas not found > PPU Source: fileutil.inc not found > Recompiling FileUtil, checksum changed for LCLStrConsts > fileutil.pas(42,62) Fatal: Can't find unit FileUtil used by LazLogger > Fatal: Compilation aborted > gmake[1]: *** [alllclunits.ppu] Error 1 > gmake[1]: Leaving directory `/data/devel/lazarus/lcl' > gmake: *** [lazbuild] Error 2 > ----8<-------------8<-------------8<-------------8<-------------8<---- > > Yet, if I do the following, it does seem to find the unit in the > directory hierarchy. > > $ find . -name fileutil.* -print > ./components/lazutils/fileutil.inc > ./components/lazutils/lib/x86_64-freebsd/fileutil.ppu > ./components/lazutils/lib/x86_64-freebsd/fileutil.o

This is ok.

> ./components/lazutils/fileutil.pas > ./docs/xml/lazutils/fileutil.xml > ./lcl/units/x86_64-freebsd/fileutil.ppu > ./lcl/units/x86_64-freebsd/fileutil.o

Where is this fileutil.ppu coming from?

Maybe the "gmake clean" does not work under FreeBSD?

Mattias

Reply by email

Marco van de Voort
to Mattias Gaertner
Mattias Gaertner wrote 15 lines
> > $ find . -name fileutil.* -print > > ./components/lazutils/fileutil.inc > > ./components/lazutils/lib/x86_64-freebsd/fileutil.ppu > > ./components/lazutils/lib/x86_64-freebsd/fileutil.o This is ok. > > ./components/lazutils/fileutil.pas > > ./docs/xml/lazutils/fileutil.xml > > ./lcl/units/x86_64-freebsd/fileutil.ppu > > ./lcl/units/x86_64-freebsd/fileutil.o Where is this fileutil.ppu coming from? Maybe the "gmake clean" does not work under FreeBSD?

Are there any custom rules regarding this file, or SED use?

Makefile operation under FreeBSD is older than fpcmake generated makefiles.

Reply by email

Mattias Gaertner
to Marco van de Voort
Show quoted text 20 lines
On Sun, Feb 03, 2013 at 11:22:10PM +0100, Mattias Gaertner wrote: > > > $ find . -name fileutil.* -print > > > ./components/lazutils/fileutil.inc > > > ./components/lazutils/lib/x86_64-freebsd/fileutil.ppu > > > ./components/lazutils/lib/x86_64-freebsd/fileutil.o > > This is ok. > > > > ./components/lazutils/fileutil.pas > > > ./docs/xml/lazutils/fileutil.xml > > > ./lcl/units/x86_64-freebsd/fileutil.ppu > > > ./lcl/units/x86_64-freebsd/fileutil.o > > Where is this fileutil.ppu coming from? > > Maybe the "gmake clean" does not work under FreeBSD? Are there any custom rules regarding this file, or SED use? Makefile operation under FreeBSD is older than fpcmake generated makefiles.

[clean]
# clear all .ppu/.o/.rst files in all source and output directories files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) \
$(wildcard $(COMPILER_UNITTARGETDIR)/*.res) \
$(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \ $(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) \ $(wildcard widgetset/*$(OEXT)) $(wildcard widgetset/*$(PPUEXT)) $(wildcard widgetset/*$(RSTEXT))\ $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))

Mattias

Reply by email

Graeme Geldenhuys
to Mattias Gaertner: On Thu, 31 Jan 2013 17:33:27 +0000 This is ok. Where is this fileutil.ppu coming from?…
Mattias Gaertner wrote 8 lines
>> ./components/lazutils/fileutil.pas >> ./docs/xml/lazutils/fileutil.xml >> ./lcl/units/x86_64-freebsd/fileutil.ppu >> ./lcl/units/x86_64-freebsd/fileutil.o Where is this fileutil.ppu coming from? Maybe the "gmake clean" does not work under FreeBSD?

No idea. I normally don't trust 'make clean' etc commands, so I did a 'git clean -d -f', seeing that I used the git repository from Github. This removed any and all files or directories that are not tracked by the repository. After that a 'gmake bigide' worked.

Thinking about it a bit more, it might have been my own doing. Maybe it was because after I cloned the Lazarus repository from Github, it leaves you in the wrong branch ('master' instead of 'upstream'). [I still need to fix that] I think I might have tried to compile Lazarus while in the wrong (very old) branch, then realised I was in the wrong branch - switched to 'upstream', and then did another build. Thus leaving some compiled units in locations that confused the build process. The 'git clean' would have resolved this problem.

...few minutes later...

I just cloned the repository again, made sure I was in the correct 'upstream' branch, and did a 'gmake bigide' and everything went fine. So I guess it must have been left-over compiled units from being in the wrong branch before.

Sorry for the false alarm. It seems the only minor issue now, is that the readme file needs to be updated to say that FreeBSD users must use 'gmake' instead of 'make'. I've already updated the wiki with this info.

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Marco van de Voort
to Mattias Gaertner: On Sun, 3 Feb 2013 23:28:45 +0100 [clean] # clear all .ppu/.o/.rst files in all source…
Mattias Gaertner wrote 18 lines
> > > > Maybe the "gmake clean" does not work under FreeBSD? > > Are there any custom rules regarding this file, or SED use? > > Makefile operation under FreeBSD is older than fpcmake generated makefiles. [clean] # clear all .ppu/.o/.rst files in all source and output directories files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*.res) \ $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \ $(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) \ $(wildcard widgetset/*$(OEXT)) $(wildcard widgetset/*$(PPUEXT)) $(wildcard widgetset/*$(RSTEXT))\ $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))

Afaik such constructs should simply work. It will be passed to rm, and gmake is the same as make on linux, just might be a slightly older version.

Reply by email

Mattias Gaertner
to Marco van de Voort
Show quoted text 22 lines
On Sun, Feb 03, 2013 at 11:40:16PM +0100, Mattias Gaertner wrote: > > > > > > Maybe the "gmake clean" does not work under FreeBSD? > > > > Are there any custom rules regarding this file, or SED use? > > > > Makefile operation under FreeBSD is older than fpcmake generated makefiles. > > [clean] > # clear all .ppu/.o/.rst files in all source and output directories > files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \ > $(wildcard $(COMPILER_UNITTARGETDIR)/*$(PPUEXT)) \ > $(wildcard $(COMPILER_UNITTARGETDIR)/*$(RSTEXT)) \ > $(wildcard $(COMPILER_UNITTARGETDIR)/*.lfm) \ > $(wildcard $(COMPILER_UNITTARGETDIR)/*.res) \ > $(wildcard $(COMPILER_UNITTARGETDIR)/*.compiled) \ > $(wildcard ./units/*$(OEXT)) $(wildcard ./units/*$(PPUEXT)) $(wildcard ./units/*$(RSTEXT)) \ > $(wildcard widgetset/*$(OEXT)) $(wildcard widgetset/*$(PPUEXT)) $(wildcard widgetset/*$(RSTEXT))\ > $(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT)) Afaik such constructs should simply work. It will be passed to rm, and gmake is the same as make on linux, just might be a slightly older version.

False alarm. Graeme wrote it works, it was an user error.

Mattias

Reply by email