Recent

Author Topic: Rebuild Lazarus IDE on Linux fails when installing package  (Read 4232 times)

Coxy

  • New Member
  • *
  • Posts: 32
Rebuild Lazarus IDE on Linux fails when installing package
« on: July 07, 2021, 10:06:25 am »

Clean install of Lazarus IDE 2.0.10 on Linux Mint 20.1, Tools/Build Lazarus with Profile Normal IDE works. However if I install "lazopenglcontext 0.01" and "Save and Rebuild IDE" I get "Error: Error while linking".

Remove package and IDE Rebuild works!

This also happens with "Online Package Manager" when adding BGRABitmap and BGRAControls.

Coxy

  • New Member
  • *
  • Posts: 32
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #1 on: July 07, 2021, 10:51:04 am »
Bit more info.

Used option Configure "Build Lazarus" and with profile "Clean Up + Build all". Bottom of log is

Code: Text  [Select][+][-]
  1. (9022) Compiling resource /home/simon/.lazarus/units/x86_64-linux/gtk2/lazarus.or
  2. (9015) Linking /home/simon/.lazarus/bin/lazarus
  3. /usr/bin/ld: cannot find -lGL
  4. /usr/share/lazarus/2.0.10/ide/lazarus.pp(165,1) Error: (9013) Error while linking
  5. /usr/share/lazarus/2.0.10/ide/lazarus.pp(165,1) Fatal: (10026) There were 1 errors compiling module, stopping
  6. Fatal: (1018) Compilation aborted
  7. make[2]: *** [Makefile:4144: lazarus] Error 1
  8. make[1]: *** [Makefile:4574: idepkg] Error 2
  9. make: *** [Makefile:3605: idepkg] Error 2
  10. Error: /usr/bin/ppcx64 returned an error exitcode
  11. make[2]: Leaving directory '/usr/share/lazarus/2.0.10/ide'
  12. make[1]: Leaving directory '/usr/share/lazarus/2.0.10/ide'
  13. make: Leaving directory '/usr/share/lazarus/2.0.10'
  14.  

This is when installing package "lazopenglcontext 0.01"

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #2 on: July 07, 2021, 10:58:03 am »
I remember having issues with BGRA, too.
If memory serves, it was an incompatibilty with another, already installed, package.

I'd try in a VM (VirtualBox) a vanilla install of Linux, and a vanilla install of Lazarus.
And then try to install the package as the first one
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

af0815

  • Hero Member
  • *****
  • Posts: 1291
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #3 on: July 07, 2021, 11:11:38 am »
/usr/bin/ld: cannot find -lGL
The ld say, you have a needed library not on your system. It is missing libGL(-dev)

This is not a issue from OPM or something similar. If a package need a library, YOU must fullfill the requirements on your system and other systems where the software should run.
« Last Edit: July 07, 2021, 11:13:39 am by af0815 »
regards
Andreas

Coxy

  • New Member
  • *
  • Posts: 32
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #4 on: July 07, 2021, 11:30:32 am »
/usr/bin/ld: cannot find -lGL
The ld say, you have a needed library not on your system. It is missing libGL(-dev)

This is not a issue from OPM or something similar. If a package need a library, YOU must fullfill the requirements on your system and other systems where the software should run.

Installed libgl-dev (libGL-dev fails) using,

Code: Text  [Select][+][-]
  1. sudo apt-get install libgl-dev

Package "lazopenglcontext 0.0.1" now installs correctly and so do the BGRA ones.

Many thanks

wp

  • Hero Member
  • *****
  • Posts: 11911
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #5 on: July 07, 2021, 12:30:06 pm »
I have a similar issue with LazOpenGL in Ubuntu 20.10, qt5: "undefined reference to `QLCLOpenGLWidget_override_paintGL'". gtk2 installs fine, libgl-dev is installed. Any idea?

Coxy

  • New Member
  • *
  • Posts: 32
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #6 on: July 07, 2021, 01:37:37 pm »
I have a similar issue with LazOpenGL in Ubuntu 20.10, qt5: "undefined reference to `QLCLOpenGLWidget_override_paintGL'". gtk2 installs fine, libgl-dev is installed. Any idea?

Although Linux Mint is based on Ubuntu I have not come across this problem and am unable to suggest anything. Hopefully someone else will have a solution.

devEric69

  • Hero Member
  • *****
  • Posts: 648
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #7 on: July 07, 2021, 02:20:04 pm »
I have a similar issue with LazOpenGL in Ubuntu 20.10, qt5: "undefined reference to `QLCLOpenGLWidget_override_paintGL'". gtk2 installs fine, libgl-dev is installed. Any idea?

Maybe, check your fpc.cfg file. Try to add inside something like...:

Code: [Select]
-Fl/usr/local/lib
...or another path pointing towards the {gtk2} *.so installed libraries \ symlinks.
But this is a trick: normally, you have to configure such paths in the Linux loader!
See loading libraries under Linux , in https://wiki.freepascal.org/Lazarus/FPC_Libraries.

« Last Edit: July 07, 2021, 02:39:11 pm by devEric69 »
use: Linux 64 bits (Ubuntu 20.04 LTS).
Lazarus version: 2.0.4 (svn revision: 62502M) compiled with fpc 3.0.4 - fpDebug \ Dwarf3.

Zvoni

  • Hero Member
  • *****
  • Posts: 2327
Re: Rebuild Lazarus IDE on Linux fails when installing package
« Reply #8 on: July 07, 2021, 03:41:25 pm »
I have a similar issue with LazOpenGL in Ubuntu 20.10, qt5: "undefined reference to `QLCLOpenGLWidget_override_paintGL'". gtk2 installs fine, libgl-dev is installed. Any idea?
Sounds similiar:
https://forum.lazarus.freepascal.org/index.php?topic=54010.0
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

 

TinyPortal © 2005-2018