Recent

Author Topic: [SOLVED] Help/Advice Wanted Re Updating (OpenSSL) Package  (Read 363 times)

silvercoder70

  • Full Member
  • ***
  • Posts: 158
    • Tim Coates
[SOLVED] Help/Advice Wanted Re Updating (OpenSSL) Package
« on: March 12, 2025, 01:29:41 pm »
looking for some advice. I am writing a small program to connect to a web server via https and when the programs attempts to connect  a exception occurs because it cannot find the (version of ) openssl installed...

BACKGROUND

* Installed/using lazarus 4.0 RC2 on Linux Mint.
* Using ssl 3.0.13.

On viewing openssl.pas...

  { ADD NEW ONES WHEN THEY APPEAR!
    Always make .so/dylib first, then versions, in descending order!
    Add "." .before the version, first is always just "" }
  DLLVersions: array[1..19] of string = ('', '.1.1', '.11', '.10', '.1.0.6', '.1.0.5', '.1.0.4', '.1.0.3',
                                        '.1.0.2', '.1.0.1','.1.0.0','.0.9.8', ...

Would like to use the version installed on laptop. Thought about rebuilding after adding '.3' to the list as per what I saw in fpc source code on github but then I have to remake ...

XXXXXXXXXXXXX:/usr/share/fpcsrc/3.2.2/packages/openssl$ make
/usr/bin/ppcx64 fpmake.pp -n -Fu../../rtl -Fu../../packages/paszlib -Fu../../packages/fcl-process -Fu../../packages/hash -Fu../../packages/libtar -Fu../../packages/fpmkunit 
Fatal: Can't find unit system used by fpmake
Fatal: Compilation aborted
make: *** [Makefile:2481: fpmake] Error 1

Tried as root as well! And yes, I know should not do not it in these folders. I cannot remember if the 'installer' blows the folders away after completing.

Thought I might fppkg and get more recent version of openssl but I always get an error about the configuration not existing...

XXXXXXXXXXXXXXX:/usr/share/fpcsrc/3.2.2/packages/openssl$ fppkg -V
Warning: The directory "/etc/fppkgconf.d/" of the include-mask "/etc/fppkgconf.d/*.conf" does not exist
Version: 3.3.1

and as an aside, on page https://wiki.freepascal.org/fppkg

it refers to the system wide configuration file as /etc/fppkg.cfg and so a little unsure what to do about this, as in, having a "user-specific configuration file" that I can use within lazarus. And it also states on that page

"When fppkg is started it first tries to load fppkg.cfg from a user-specific location. If a user-specific version can not be found fppkg searches for a system-wide fppkg.cfg. See the table for the exact location of these files. If both files do not exist a configuration file is created. When the current user is a superuser, a system-wide configuration file is made, else a user-specific one. When creating the configuration file fppkg tries some reasonable defaults for all settings."

So here is what I want to do.... replace/update the openssl package that is installed as part of fpc that is used within lazarus.

Any ideas and advice greatly appreciated. Thanks,
« Last Edit: March 13, 2025, 01:24:29 pm by silvercoder70 »
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

paweld

  • Hero Member
  • *****
  • Posts: 1327
Re: Help/Advice Wanted Re Updating (OpenSSL) Package
« Reply #1 on: March 13, 2025, 07:20:01 am »
Hi,
In my opinion, instead of manually editing all the required files, I would install FPC from the 3.2-fixes branch, which already supports OpenSSL 3.

The easiest way to install Lazarus and FPC in selected versions is to use FPCUpDeluxe: https://github.com/LongDirtyAnimAlf/fpcupdeluxe
You can also install everything yourself from scratch, a big help would be this script shared by @rvk: https://forum.lazarus.freepascal.org/index.php/topic,68845.msg540271.html#msg540271  - you just need to choose the right target (it's AARCH64) and platform (it's QT5), but the descriptions are in the script
Best regards / Pozdrawiam
paweld

dbannon

  • Hero Member
  • *****
  • Posts: 3297
    • tomboy-ng, a rewrite of the classic Tomboy
Re: Help/Advice Wanted Re Updating (OpenSSL) Package
« Reply #2 on: March 13, 2025, 11:49:15 am »
If you are a Linux user (and bit of a risk taker), you could get FPC324-branch (which supports openssl3) from my github repo.  I have there binary (and source) install kits for a couple of versions of FPC that don't require you to first install FPC322 and compile. Faster and kinder on disk space.

Also adds the correct PATH statement to your .bashrc.

https://github.com/davidbannon/FPC_Laz_Install

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

silvercoder70

  • Full Member
  • ***
  • Posts: 158
    • Tim Coates
Re: [SOLVED] Help/Advice Wanted Re Updating (OpenSSL) Package
« Reply #3 on: March 13, 2025, 01:27:03 pm »
I saw paweld reply first and played with that which solved my main problem.

And I will also check out your repo db.

(I might have experience in some parts of software, but not when it come to the ins and outs of fpc!)
Explore the beauty of modern Pascal programming with Delphi & Free Pascal - https://www.youtube.com/@silvercoder70

 

TinyPortal © 2005-2018