Recent

Author Topic: Complex package installation problem  (Read 3561 times)

JonBondy

  • New Member
  • *
  • Posts: 22
Complex package installation problem
« on: March 24, 2024, 02:21:03 am »
I have used Delphi for decades, but I am new to Lazarus.

I installed Lazarus on D: on my Win 11 system, and that may have been a horrible idea.  After lots of problems (including bad paths specifying C:) I uninstalled Lazarus and installed it fresh on C:

That did not improve things, because I think I need to generate Win32 code from my Win64 system, and cross compiling was not working.  So, again, I uninstalled Lazarus, and installed the Win32 version.

I am still having lots of problems.

I am trying to get the LazAudioPlayer to compile on my machine.  The files that come with LAP include some of the components and their source code.  As a newbie, I flailed around trying to get the compiler to see the components in the LAP directory tree. In the end I used the online package manager to install the RackCtls package (no error messages so far, but I may have not gotten there yet) and repeatedly installed and uninstalled ACS.  I downloaded the ACS in ZIP format but have no idea where to put the contents. 

At the moment, the error message that has persisted after repeated uninstalls and installs of Lazarus is that file acs_mixer cannot be found, even though there is a copy in the directory tree under LAP (but not in any directory tree associated with Lazarus) as well as one here:
C:\Users\jon\AppData\Local\lazarus\onlinepackagemanager\packages\acs\src\filters

I see LOTS of "duplicate unit" messages.  For example, for acs_types I find

"D:\Delphi\Lazarus\Audio Player\lib\i386-win32\acs_types.ppu" -- in the LAP directory tree
and
"laz_acs_lib 3.0.3", ppu="C:\Users\jon\AppData\Local\lazarus\onlinepackagemanager\packages\acs\packages\lib\i386-win32\acs_types.ppu",
source="C:\Users\jon\AppData\Local\lazarus\onlinepackagemanager\packages\acs\src\filters\acs_types.pas"

I need to get back to a clean installation, at least as regards paths and libraries/packages.  I had hoped that uninstalling and reinstalling Lazarus would do that, but some stuff must not be getting wiped (probably stuff in the LAP directory tree).  I don't know what to delete in the LAP directory tree.

I know this is a flailing and ill-defined problem description, but any advice would be appreciated.

Thanks

Jon

JonBondy

  • New Member
  • *
  • Posts: 22
Re: Complex package installation problem
« Reply #1 on: March 24, 2024, 03:31:56 am »
I am now getting the attached message.  I deleted all of the files in the LAP directory tree under ACS, and then all hell broke loose.  So I'm screwed if there are two identical units, and I am also screwed if there is only one.

Frustrating.


dsiders

  • Hero Member
  • *****
  • Posts: 1168
Re: Complex package installation problem
« Reply #2 on: March 24, 2024, 04:03:40 am »
I am now getting the attached message.  I deleted all of the files in the LAP directory tree under ACS, and then all hell broke loose.  So I'm screwed if there are two identical units, and I am also screwed if there is only one.

Frustrating.

Read the error message. You have more than one acs_audio installation on your PC.

This happened because you used Online Package Manager which writes to a location, and then you manually installed to another location (components). Pick one, either one, and physically delete it. Not just the LAP directory... everything in the duplicated ACS Audio install. Rebuild your IDE.

There is no issue with installing to any drive or directory. You didn't check the "overwrite previous IDE configuration" check box during install. So it kept the foobar'd settings from a previous install.

Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

dseligo

  • Hero Member
  • *****
  • Posts: 1282
Re: Complex package installation problem
« Reply #3 on: March 24, 2024, 12:04:15 pm »
There is no issue with installing to any drive or directory. You didn't check the "overwrite previous IDE configuration" check box during install. So it kept the foobar'd settings from a previous install.

Or he could check option 'Create a new secondary installation' during install and put config files (and packages) to a place of his choice.

JonBondy

  • New Member
  • *
  • Posts: 22
Re: Complex package installation problem
« Reply #4 on: March 24, 2024, 01:48:47 pm »
Thanks @dsiders. 

I deleted the ACS folder under the LAP folder and tried to rebuild the IDE, but that failed.  I then went to the Online Package Manager (OPM) and removed Laz_ACS.  Then the IDE would re-compile.

I now get stuck because file acs_volume cannot be found.  It does exist on disk, but only in folders under the OPM's folders.  That is, the only place the file exists is where I instructed the OPM to uninstall ACS.  I imagine that it should exist elsewhere, but I don't know where that would be.  Perhaps ACS was installed in some manner other than OPM: if I could uninstall it there and then reinstall it there, perhaps things would improve.

I would be happy to uninstall and reinstall Lazarus, if you think that would help.

I would be happy to delete everything in the OPM's folder(s) if you think that would help.

Jon

cdbc

  • Hero Member
  • *****
  • Posts: 1326
    • http://www.cdbc.dk
Re: Complex package installation problem
« Reply #5 on: March 24, 2024, 02:24:25 pm »
Hi
1. You have got the acs package i.e.: all the files downloaded and on your disk.
2. In your project, maybe you should include/depend on either: "laz_acs_lib.lpk" for console-apps or "laz_acs.lpk" for gui-apps. You do that in the "Project Inspector"
3. If that doesn't help, then in "Project Options" -> "Paths" -> "Other unit files" (-Fu), you can try to add the path to acs-files yourself...
4. Beware! acs doesn't use all the capabilities of the 'Lame-encoder', it's restricted to 16bit signed integer input - 128 kbit mp3 output.
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

JonBondy

  • New Member
  • *
  • Posts: 22
Re: Complex package installation problem
« Reply #6 on: March 24, 2024, 02:57:01 pm »
@cdbc: thank you!

I made laz_acs.lpk a Required Package, but that did not do the trick: acs_volume is still not found.

I added the path to the above file in the Other Paths, but that did not do the trick, either: acs_volume not found.

Note the persistent bad paths in the screen shot of the Other Paths.

Should I try to clean everything out and start again?  This would be my fourth attempt, so I would need to do something different this time.  Are the files that OPM creates persistent between Lazarus installations?  Should I delete them, and if so, at what part of the path?

C:\Users\jon\AppData\Local\lazarus\onlinepackagemanager\packages\acs\packages

Jon

cdbc

  • Hero Member
  • *****
  • Posts: 1326
    • http://www.cdbc.dk
Re: Complex package installation problem
« Reply #7 on: March 24, 2024, 09:24:56 pm »
Hi
In that screenshot, it seems you can click on "Delete Invalid paths"...
This button /only/ gets active, if you have invalid paths in there!!!
So, make a note of the 'acs'-directories you need to find, e.g.: ...\win32\lib etc. And a note of the rackctrls-directory, on a piece of paper.
Now you are ready to click the "Delete Invalid paths" button, after you have done that, some of the paths should be missing, these you have to recreate/find at the location where your components now reside...
The /binbows/ explorer is very good at hunting files, so use that to find the files lazarus is complaining about, then add them in lazarus.
Continue until you can compile.
And next time you'll think twice before making such a mess  :D
Happy hunting  8-)
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

JonBondy

  • New Member
  • *
  • Posts: 22
Re: Complex package installation problem
« Reply #8 on: March 26, 2024, 01:06:18 pm »
@cdbc: believe me, I was not looking to create this mess.  And, having reinstalled EVERYTHING three times, I can also tell you that there appears to be NO way to get a clean install.  And THAT is VERY frustrating.  I should not have to go through the process you describe.  I will try again.  Thanks!

JonBondy

  • New Member
  • *
  • Posts: 22
Re: Complex package installation problem
« Reply #9 on: March 26, 2024, 01:29:29 pm »
Can anyone explain how to do a completely clean install of Lazarus?  I am really wasting my time at this point.

There MUST be something outside of the regular Lazarus install that is causing the problems (since I have installed Lazarus 3 times already).  Should I find and delete all of the Online Package Manager directory tree?  Are the components that are inside the audio player directory tree causing problems?  Should I remove those directory trees (under the Components folder)?

How do I properly install missing packages, since the OPM seems to cause problems?

I looked, and did not find, an audio player among the Examples that come with Lazarus.

Has anyone successfully installed and compiled the audio player example?

Thanks.

Jon

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10063
  • Debugger - SynEdit - and more
    • wiki
Re: Complex package installation problem
« Reply #10 on: March 26, 2024, 01:38:21 pm »
There are the following locations used by Lazarus on Windows

C:\lazarus or whatever directory you installed to.

C:\Users\USERNAME\AppData\Local\lazarus  your config. (and propably online package mgr...)
Unless you did a "2ndary install" in which case you gave your own config dir / but such a non default config dir would then only be found by that 2ndary install / or if you called lazarus with --pcp=2ndary_conf_dir)


registry: Lazarus does not store anything in the registry (3rd party add ons may / not under control of Lazarus). Equally Lazarus does not read the registry itself.

The inno setup installer will write
- file associations. So if you double click a lpi file it opens the IDE. But that does not affect what the IDE does with it.
- location of the previous install (so it can offer that on the next install)
- name/location of the unistaller.



The uninstaller does not delete the config dir.

However the installer has an option to do that. (disabled by default)

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10063
  • Debugger - SynEdit - and more
    • wiki
Re: Complex package installation problem
« Reply #11 on: March 26, 2024, 01:41:33 pm »
Quote
At the moment, the error message that has persisted after repeated uninstalls and installs of Lazarus is that file acs_mixer cannot be found

Those errors may SOMETIMES happen, even on a perfectly ok install => due to some issues in fpc.

- Open the package that contains the file.
- in "Custom Options" add -Ur
- in the toolbar, from the drop down at the end of the toolbar, select "compile clean"

Then (re)build your IDE (you may want to also check "make clean".




This does not fix the problem if a unit with the same name exists in 2 packages.

That is always a problem
- Chose either one package, and forget the other
- trunk fpc has namespace, that should allow to fix the issue. But will require some work....
« Last Edit: March 26, 2024, 01:44:30 pm by Martin_fr »

wp

  • Hero Member
  • *****
  • Posts: 12122
Re: Complex package installation problem
« Reply #12 on: March 26, 2024, 06:19:46 pm »
Referring to the initial post, I see two problems
  • as a Laz-beginner you have issues to install Lazarus
  • there are difficulties in getting the LazAudioPlayer project up and running.
Let's begin with the first issue: installation of Lazarus. You can be assured that I've installed lazarus on Windows many many times, and never had severe issues - it must be working!. It's like an ordinary Windows installation: run the installer, and that's it. However, you mention 32bit and 64 bit, and here the 1-click-installation becomes complicated. Either you install a cross-compiler, or you make a second Lazarus installation: one for 32-bit and one for 64-bit. That's the way I am doing it because I never was happy with cross-compilation.

To make two independent installations, you do the following steps:
  • Download the 32-bit and 64-bit release versions of Lazarus: 32-bit from https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2032%20bits/Lazarus%203.2/lazarus-3.2-fpc-3.2.2-win32.exe/download, 64-bit from https://sourceforge.net/projects/lazarus/files/Lazarus%20Windows%2064%20bits/Lazarus%203.2/lazarus-3.2-fpc-3.2.2-win64.exe/download.
  • Run the 32-bit installer (or the 64-bit - the order does not matter).
  • You can install to any directory or drive to which you have write access without being admin. Do not install to "c:\program files" - you will have lots of problems when you later install components and must recompile the IDE. Preferrably install to an SSD because Lazarus accesses many files. All my Lazarus installations are in C:\lazarus, there is one directory for each version. The 32bit version of Lazarus 3.2 for example is installed in c:\lazarus\lazarus-32_fpc322_32bit, the 64bit version in c:\lazarus\lazarus-32_fpc322_64bit. I am adding the version numbers since I also have other versions on the system.
  • On the second page of the installer where you specify the directory name for the installation check the box "secondary installation". This is the main trick to have independent Lazarus versions on the same system.
  • On the next page of the installer ("Select configuration directory") specify a directory in which Lazarus will store its settings. Again, you can use any directory to which you can write without being admin. To avoid too much scatter on the disk, I have c:\lazconfigs as root for all settings and a subdirectory c:\lazconfigs\lazarus-32_fpc322_32bit for the settings of the 32-bit version and c:\lazconfigs\lazarus_32_fpc322_64bit for the 64bit version. Always use a new directory, do not share the settings directory between different Lazarus installations because if some absolute file paths in the config files.
  • On the next page ("Select components") I select "complete installation", but uncheck registration of the file types because sooner or later you will no longer know which Lazarus version will open when you double-click on a pas or lpi file. Later, do not open files by double-clicking in the Explorer, but by using the file menu of the IDE.
  • That's all what's important. Run the installation
  • After the installation, right-click on c:\lazarus\lazarus_32_fpc322_32bit\lazarus.exe (or correspondingly for the 64-bit version) and select "Create desktop link"; mention at least the bitness in the link name or use a full name such as "Laz32_FPC_322_32bit". You can assign different icons to the different versions; many Lazarus icons with different overlays can be found in https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/applications/laz_icons/
  • Double-click on the link to start the IDE for the first time. Not 100% sure, but it should start right away; maybe there is a confirmation window about the current settings, but that should be fine
  • The IDE starts with an empty project. Press F9 to compile it. This should be fine, and the empty window should appear at runtime. This MUST work. If not you have serious problems in your system. OK - well a possible one: the antivirus scanner! Go to the settings of your anti-virus application and add the Lazarus installation directory as well as the directory in which you store your projects to the white-list of the AV. Make sure that subdirectories are included.
  • Repeat with the Lazarus for the other bitness.
  • In view of you current issues, do not install any packages before you are not convinced that the default Lazarus is running correctly. Ask again if you want me to tell you how to install components and packages.
The second issue mentioned in the beginning is the LazAudioPlayer project. This is a completely different issue, because such internet projects often are very old and have issues with the current Lazarus/FPC versions. My first question here: where is this project from? I found one at https://sourceforge.net/projects/lazaudioplayer/. Please confirm or give an alternative download location so that I can  check it myself.

JonBondy

  • New Member
  • *
  • Posts: 22
Re: Complex package installation problem
« Reply #13 on: March 27, 2024, 01:55:11 am »
@Martin_fr: thank you!

@wp:  Yes, I was trying to get the LazAudioPlayer working from sourceforge.net.  And, yes, it is old!

At this point I may delete everything that Martin_fr mentioned, reinstall Lazarus, and try to write an audio player from scratch.

Jon

TRon

  • Hero Member
  • *****
  • Posts: 2845
Re: Complex package installation problem
« Reply #14 on: March 27, 2024, 08:45:53 am »
At this point I may delete everything that Martin_fr mentioned, reinstall Lazarus, and try to write an audio player from scratch.
The audioplayer you refer to is not able to build with recent Lazarus (and updated ACS components from OPM). The with the audioplayer accompanied acs components also do not seem to install on a recent Lazarus. That is ofc the "out of the box experience" so it might be possible after modifying the project(s)/package(s). I gave up after a dozen or so of changes into several packages and the project code because I simply lack the time.

When using OPM (Online Package Manager) (see also here, search for ACS) it is possible to install a more up to date version of the ACS component suite and which comes accompanied with some example demo's, including a small audioplayer.

User wp made some valid points so please follow his guidance to get FPC and Lazarus installed correctly but in case all else fails there is always FPCUpDeluxe (I always use a temporary custom install myself when trying to test other stuff (such as trying to build that audioplayer you referred to) in order to not mess up my existing customized installation of FPC/Lazarus).
« Last Edit: March 27, 2024, 08:57:19 am by TRon »

 

TinyPortal © 2005-2018