Recent

Author Topic: [SOLVED] Re-Compile Lazarus on FreeBSD  (Read 7305 times)

photor-laz

  • Newbie
  • Posts: 5
[SOLVED] Re-Compile Lazarus on FreeBSD
« on: December 25, 2020, 03:49:05 pm »
Hello Forum,

Sorry, for not being soo often here - I usually use the German Forum. But my question seems to be too special. So, they pointed me here.

My problem: re-compiling the Lazarus IDE on FreeBSD starts but does not seem to come to an end:
 I have installed FreeBSd 12.2 on an old MacBook Pro (8.2) which seems to run OK (the machine is not running MacOS anymore).

I want to use Lazarus on that machine so I installed Lazarus from the packages (latest). Installation went fine, but, when I try to compile the IDE (maybe to add some Lazarus packages; e.g. to get the 1-window-layout of the IDE) the compilation starts quite good. But after some time it looks like it is stopped: no new messages in the message window; title of menu-window shows "... compiling"; no possibility to start new compilation; error message about still running compiliation when shutting down IDE (or machine).

As I am not very familiar with Lazarus in detail (just did the above on Linux and never had that kind of problems), what can I do to fix it? Or, what can I do, to find out, what is going wrong here?

I hope some poeple with (Free)BSD experience are here.

Thank you for your help,

Photor
« Last Edit: December 29, 2020, 12:25:05 am by trev »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Re-Compile Lazarus on FreeBSD
« Reply #1 on: December 25, 2020, 10:49:28 pm »
I just tested a new FreeBSD 12.2-RELEASE VM with an installation of Lazarus (GTK2) from the ports collection.

There is one issue, FPC cannot find the linker -- it's looking for /bin/ld.bfd -- solved by soft-linking /usr/local/bin/ld.bfd to /bin. I've logged a bug for this in the BugTracker.

I can rebuild the Lazarus IDE without any issues from Tools > Build Lazarus... (tried a couple of different profiles).

I cannot install any packages from Package > Online Package Manager though - always the same error (see attachment).

Exactly what are you doing?

photor-laz

  • Newbie
  • Posts: 5
Re: Re-Compile Lazarus on FreeBSD
« Reply #2 on: December 26, 2020, 05:53:42 pm »
Hello trev,

thank you for testing and the reply. I have not tried the soft link (I will do as soon as possible) but this sounds as the 1st solution to try out: no linker means no chance for a working executable. But why do I get no message about that - here is the output I get (only the last lines - if more is needed I can post of course):
Code: [Select]
....
sparta_fakeformbackground.pas(83,30) Hint: Parameter "AValue" not used
sparta_fakeformbg.pas(20,66) Hint: Unit "sparta_DesignedForm" not used in sparta_FakeFormBG
sparta_reg_smartformeditor.pas(41,51) Warning: Constructing a class "TStarterDesignTimeUtilsManager" with abstract method "GetEDTU"
spartaapi.pas(81,14) Hint: Found abstract method: GetEDTU(<TSTADesignTimeUtilsManager>;LongInt):Class Of TEDTU;
sparta_reg_smartformeditor.pas(20,78) Hint: Unit "sparta_FakeFormBG" not used in sparta_reg_SmartFormEditor
Compile package AnchorDockingDsgn 1.0: Success, Hints: 1
registeranchordocking.pas(179,5) Note: Call to subroutine "procedure TIDEAnchorDockMaster.IncreaseChangeStamp;" marked as inline is not inlined
Compile package sparta_ToolsAPI 0.0: Success
Compile package DateTimeCtrlsDsgn 1.5.1: Success
Compile package fpcunitide 0.1: Success
Compile package EditorMacroScript 0.0: Success
Compile package SQLDBLaz 1.0.2: Success, Hints: 2
sqlstringspropertyeditordlg.pas(167,77) Note: Call to subroutine "operator =(const op1:Variant;const op2:Variant):Boolean;" marked as inline is not inlined
sqlstringspropertyeditordlg.pas(281,77) Note: Call to subroutine "operator =(const op1:Variant;const op2:Variant):Boolean;" marked as inline is not inlined
Compile package SynEditDsgn 1.0: Success
Compile package TurboPowerIProDsgn 0.0: Success
Compile package printers4lazide 0.0: Success
Compile package MemDSLaz 1.2.1: Success
Compile package InstantFPCLaz 1.0: Success
Compile package LazControlDsgn 0.0: Success
Compile package DBFLaz 0.1.1: Success


it just stops; nothing about linking.

So, thanks for now; I come back after testing with the soft link created.

Ciao,
Photor

PS: created the link and I was able to compile (and link and execute) one of my own projects (good). BUT unfortunately, compiling the Lazarus IDE did not work - same as before.
« Last Edit: December 26, 2020, 07:59:47 pm by photor-laz »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Re-Compile Lazarus on FreeBSD
« Reply #3 on: December 26, 2020, 09:27:41 pm »
See if you can increase error verbosity,  by turning off filtering by right clicking on a line in the error window. After you do that you must try to recompile

nummer8

  • Full Member
  • ***
  • Posts: 108
Re: Re-Compile Lazarus on FreeBSD
« Reply #4 on: December 26, 2020, 11:09:13 pm »
I had the same problem with OPM. As I set the download directory to a visible and accessible one there was no problem with recompiling.

photor-laz

  • Newbie
  • Posts: 5
Re: Re-Compile Lazarus on FreeBSD
« Reply #5 on: December 27, 2020, 07:54:25 pm »
Hello Forum,

I have experimented a little more. After the linker is found now I have removed some (all?) non-default packages and started compiling the IDE again. Now I get the following:
Code: [Select]
...
/usr/local/share/lazarus-2.0.10/components/onlinepackagemanager/fpcmod/opkman_httpclient.pas(426,19) Hint: Function result variable of a managed type does not seem to be initialized
/usr/local/share/lazarus-2.0.10/components/onlinepackagemanager/opkman_downloader.pas(265,21) Hint: Local variable "JSON" of a managed type does not seem to be initialized
/usr/local/share/lazarus-2.0.10/components/onlinepackagemanager/opkman_createrepositoryfrm.pas(766,22) Hint: Variable "AJSON" of a managed type does not seem to be initialized
Build IDE: Exit code 1, Errors: 101
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3127: warning: using previous script for "ifdef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3487: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3488: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3489: warning: duplicate script for target "ifdef" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3127: warning: using previous script for "ifdef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3490: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3509: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3510: Could not find fpcmake.loc
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3511: Need an operator
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3647: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3648: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3658: Need an operator
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3663: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3664: warning: duplicate script for target "ifneq" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3129: warning: using previous script for "ifneq" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3664: warning: duplicate script for target "(,)" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3138: warning: using previous script for "(,)" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3665: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3683: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3684: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3686: Need an operator
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: Unknown modifier '/'
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3687: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3688: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3690: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3691: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3692: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3694: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3695: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3696: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3698: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3699: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3700: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3709: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3711: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3713: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3714: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3716: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3717: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3719: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3720: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3722: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3723: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3725: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3727: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3728: warning: duplicate script for target "ifneq" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3129: warning: using previous script for "ifneq" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3728: warning: duplicate script for target "(,)" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3138: warning: using previous script for "(,)" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3729: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3730: Missing dependency operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3731: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3733: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3734: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3738: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3756: warning: duplicate script for target "ifdef" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3127: warning: using previous script for "ifdef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3757: warning: duplicate script for target "ifdef" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3127: warning: using previous script for "ifdef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3758: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3761: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3764: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3765: warning: duplicate script for target "ifdef" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3127: warning: using previous script for "ifdef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3766: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3772: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3773: warning: duplicate script for target "ifdef" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3127: warning: using previous script for "ifdef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3774: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3776: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3777: warning: duplicate script for target "ifndef" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3732: warning: using previous script for "ifndef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3778: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3788: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3789: warning: duplicate script for target "ifdef" ignored
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3127: warning: using previous script for "ifdef" defined here
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3790: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3792: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3793: Need an operator
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3794: Need an operator
Panic:
Panic: make: stopped in /usr/local/share/lazarus-2.0.10
Panic: make: Fatal errors encountered -- cannot continue
Panic: tool stopped with exit code 1. Use context menu to get more information.
That looks like trouble with the makefile or with the installed make-tool? The latter would be something special to FreeBSD I guess.

Any ideas?

Ciao,
Photor

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Re-Compile Lazarus on FreeBSD
« Reply #6 on: December 27, 2020, 10:32:17 pm »
I can't speak for xBSD, but thinking back to experience with Solaris which I believe is related: I note your reference to BFD, can you try the GNU binutils?

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Re-Compile Lazarus on FreeBSD
« Reply #7 on: December 27, 2020, 11:24:52 pm »
No need to (re)install binutils, it's a dependancy which is already installed.

Code: [Select]
trev@shadow [/home/trev] $ pkg which /usr/local/bin/ld.bfd
/usr/local/bin/ld.bfd was installed by package binutils-2.33.1_4,1

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Re-Compile Lazarus on FreeBSD
« Reply #8 on: December 27, 2020, 11:32:32 pm »
Code: [Select]
[...]
Panic: make: "/usr/local/share/lazarus-2.0.10/Makefile" line 3794: Need an operator
Panic:
Panic: make: stopped in /usr/local/share/lazarus-2.0.10
Panic: make: Fatal errors encountered -- cannot continue
Panic: tool stopped with exit code 1. Use context menu to get more information.
That looks like trouble with the makefile or with the installed make-tool? The latter would be something special to FreeBSD I guess.

Any ideas?

You specified the FreeBSD make utility - you need to use the GNU make utility which is called gmake and is probably already installed in /usr/local/bin.

Quickest fix, delete your ~/.lazarus directory and re-run lazarus which should then prompt you for the setup again and this time specify gmake and not make. If you want debugging, you will also need to install gdb from ports as the system version is ancient and will not work (and is due to be removed in FBSD 13).

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Re-Compile Lazarus on FreeBSD
« Reply #9 on: December 28, 2020, 10:45:32 am »
No need to (re)install binutils, it's a dependancy which is already installed.

I was emphasising *GNU* binutils.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2020
  • Former Delphi 1-7, 10.2 user
Re: Re-Compile Lazarus on FreeBSD
« Reply #10 on: December 28, 2020, 11:50:42 am »
Am I missing something? This is the GNU binutils:

Code: [Select]
$ pkg info binutils
binutils-2.33.1_4,1
Name           : binutils
Version        : 2.33.1_4,1
Installed on   : Thu Nov  5 18:45:29 2020 AEDT
Origin         : devel/binutils
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : devel
Licenses       : GPLv3, LGPL3
Maintainer     : ports@FreeBSD.org
WWW            : https://www.gnu.org/software/binutils/
Comment        : GNU binary tools
Annotations    :
        FreeBSD_version: 1202500
        cpe            : cpe:2.3:a:gnu:binutils:2.33.1:::::freebsd12:x64:4
        flavor         : native
Flat size      : 168MiB
Description    :
The GNU Binutils are a collection of binary tools. The main ones are:

* ld - the GNU linker.
* as - the GNU assembler.

Most of these programs use BFD, the Binary File Descriptor library, to do
low-level manipulation. Many of them also use the opcodes library to assemble
and disassemble machine instructions.

This port may be used as a replacement for the system binutils and support
features from the latest versions of GCC.

For cross-compilation, see the devel/cross-binutils port.

WWW: https://www.gnu.org/software/binutils/

MarkMLl

  • Hero Member
  • *****
  • Posts: 6676
Re: Re-Compile Lazarus on FreeBSD
« Reply #11 on: December 28, 2020, 12:11:52 pm »
Am I missing something? This is the GNU binutils:

You said "no need to install Binutils". I was emphasising that- certainly on Solaris- there were /two/ binutils: the native Solaris ones and the GNU ones (Oracle pulled the rug from under the maintainer of those as soon as they took over).

You agreed that it was important to check (g)make. Experience suggests that some of the other utilities might be problems, e.g. tar.

Is BFD use universal these days? I tend to get confused between that and Gold.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

PascalDragon

  • Hero Member
  • *****
  • Posts: 5446
  • Compiler Developer
Re: Re-Compile Lazarus on FreeBSD
« Reply #12 on: December 28, 2020, 12:42:36 pm »
Is BFD use universal these days? I tend to get confused between that and Gold.

BFD is the default linker from the beginning. Gold is the new one that's not fully supported by FPC.

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Re-Compile Lazarus on FreeBSD
« Reply #13 on: December 28, 2020, 03:41:01 pm »
Is BFD use universal these days? I tend to get confused between that and Gold.

BFD is the default linker from the beginning. Gold is the new one that's not fully supported by FPC.

On FreeBSD LLVM is default nowadays.

photor-laz

  • Newbie
  • Posts: 5
Re: Re-Compile Lazarus on FreeBSD
« Reply #14 on: December 28, 2020, 04:50:22 pm »
So, I did some things in between:

gmake was not installed; binutils were. So, I installed gmake package.

To get a new clear start I moved away .lazarus directory. Now starting Lazarus comes with "Welcome to Lazarus IDE 2.0.10"-dialog that cpmplaines about missing FPC sources (the other entries are found and seem to be correct: make is set to "gmake").

The fpc sources are installed in version 3.2.0. The dialog is looking for rtl-directory, right? That can be found under /usr/local/lib/fpc/3.2.0/units/X86_64-freebsd/rtl. But specifying this (by hand or using browse.button) does not help - still get "Error: directory rtl not found".

One additional information that might be interesting: directly after FreeBSD was installed the package repo was quarterly. As lazarus version was not the latest version (as under Linux) I changed to latest and updated. But maybe something is left over.

Ciao,
Photor

 

TinyPortal © 2005-2018