Recent

Author Topic: [solved] ACS Install Fails in Package Manager -- BASS OK  (Read 1431 times)

QEnnay

  • Jr. Member
  • **
  • Posts: 53
[solved] ACS Install Fails in Package Manager -- BASS OK
« on: April 30, 2020, 05:04:23 pm »
Hi, I just used the "Online Package Manager" to install the ACS audio suite in Linux to build a very simple music player for my Grandma.

PC, Mint 19.3+Cinnamon and Lazarus 2.0.6 and 2.0.8. (it failed with 2.0.6, so I installed 2.0.8 but it failed too)

I selected "Repository" to install from as the "External Source" option seems a little risky.

It fails to compile 2 units and thus does not install.

laz_acs_lib.lpk
and
laz_acs.lpk

How can I get this to install or is there a suitable alternative?

I downloaded the BASS files but there is no Linux Demo to start from.

Thanks
« Last Edit: May 04, 2020, 04:54:58 pm by QEnnay »
Laz 2.0.8
Linux-Mint 20.04.0 + Cinnamon, Kernel 5.8 (NOT stock Ubuntu/Mint 5.4 Kernel)
Lenovo Flex 5 Ryzen 5 4500, 512GB-NVMe, 16GB memory

winni

  • Hero Member
  • *****
  • Posts: 1894
Re: ACS Install Fails in Package Manager
« Reply #1 on: April 30, 2020, 05:18:07 pm »

I downloaded the BASS files but there is no Linux Demo to start from.

Thanks

Look for the Delphi examples.
They work with Lazarus.

Winni

QEnnay

  • Jr. Member
  • **
  • Posts: 53
Re: ACS Install Fails in Package Manager
« Reply #2 on: April 30, 2020, 07:58:42 pm »
Look for the Delphi examples.
They work with Lazarus.

Thanks for the quick reply, I had to download the win32 .zip for the Delphi examples. I then converted BassTest from Delphi but it bombs out in the OnCreate with

Code: Pascal  [Select][+][-]
  1. if not BASS_Init(-1, 44100, 0, Handle, nil) then
  2.                 Error('Error initializing audio!');
  3.  

I suspect the "Handle" needs to be a Pointer address, but no idea how to get that for Linux. I did some searching but I guess I am not using the correct search terms for that.

Also, shouldn't the libbass.so go somewhere? Where do I need to put that?
Laz 2.0.8
Linux-Mint 20.04.0 + Cinnamon, Kernel 5.8 (NOT stock Ubuntu/Mint 5.4 Kernel)
Lenovo Flex 5 Ryzen 5 4500, 512GB-NVMe, 16GB memory

QEnnay

  • Jr. Member
  • **
  • Posts: 53
Re: ACS Install Fails in Package Manager
« Reply #3 on: April 30, 2020, 08:21:33 pm »
Getting nowhere fast. :)

Tried adding this to the OnCreate and it gets past the error, not sure it is likely to work though.
Code: Pascal  [Select][+][-]
  1. var
  2.         Handle : Pointer;
  3.  

Then I get
Quote
Compile Project, Target: lib/x86_64-linux/BassTest: Exit code 1, Errors: 1
linker: /usr/bin/ld: skipping incompatible /home/userz/Laz2/tools/bass24-linux/lazarus/basstest//libbass.so when searching for -lbass
linker: /usr/bin/ld: cannot find -lbass
BassTest.lpr(21,1) Error: Error while linking
Laz 2.0.8
Linux-Mint 20.04.0 + Cinnamon, Kernel 5.8 (NOT stock Ubuntu/Mint 5.4 Kernel)
Lenovo Flex 5 Ryzen 5 4500, 512GB-NVMe, 16GB memory

eljo

  • Sr. Member
  • ****
  • Posts: 408
Re: ACS Install Fails in Package Manager
« Reply #4 on: April 30, 2020, 08:42:11 pm »
Hi, I just used the "Online Package Manager" to install the ACS audio suite in Linux to build a very simple music player for my Grandma.

PC, Mint 19.3+Cinnamon and Lazarus 2.0.6 and 2.0.8. (it failed with 2.0.6, so I installed 2.0.8 but it failed too)

I selected "Repository" to install from as the "External Source" option seems a little risky.

It fails to compile 2 units and thus does not install.

laz_acs_lib.lpk
and
laz_acs.lpk

How can I get this to install or is there a suitable alternative?

I downloaded the BASS files but there is no Linux Demo to start from.

Thanks
Please post the error you get when trying to install  it, sorry no linux access to test my self.
Thanks for the quick reply, I had to download the win32 .zip for the Delphi examples. I then converted BassTest from Delphi but it bombs out in the OnCreate with

Code: Pascal  [Select][+][-]
  1. if not BASS_Init(-1, 44100, 0, Handle, nil) then
  2.                 Error('Error initializing audio!');
  3.  

I suspect the "Handle" needs to be a Pointer address, but no idea how to get that for Linux. I did some searching but I guess I am not using the correct search terms for that.

Also, shouldn't the libbass.so go somewhere? Where do I need to put that?

This sample uses the Bass dynamic library the above command tries to load the library in memory, so yes you need the Bass.so or what ever is called in linux  in the folder that linux looks for libraries. I have no idea what the parameters are for the init but I doubt that the handle is an out paramter on windows its probably the application handle that you need to pass to library.

Try an other sample something that does not use any exernal libraries to start,  after you solved the installation problem.

winni

  • Hero Member
  • *****
  • Posts: 1894
Re: ACS Install Fails in Package Manager
« Reply #5 on: May 01, 2020, 05:30:33 pm »
Hi!

How to install and initialize  BASS on Linux:

a) copy the libbass.so from the download to /usr/local/lib/
b) inform your system about the new library: sudo ldconfig
c) use this code to initialize the BASS system:

Code: Pascal  [Select][+][-]
  1. procedure TForm1.FormCreate(Sender: TObject);  
  2. begin
  3. if BASS_Init(-1, 44100, 0, @Handle, nil) then showmessage ('OK') else
  4.     showMessage ('Error');
  5. end;
  6.  


Keep on rockin with BASS!

Winni
« Last Edit: May 01, 2020, 05:34:51 pm by winni »

QEnnay

  • Jr. Member
  • **
  • Posts: 53
Re: ACS Install Fails in Package Manager
« Reply #6 on: May 02, 2020, 05:30:34 pm »
b) inform your system about the new library: sudo ldconfig

Hi, thanks for that, you are a Hero. :)

Almost ready for grandma to rock, but, I get a linking error.

Quote
Compile Project, Target: lib/x86_64-linux/BassTest: Exit code 1, Errors: 1
linker: /usr/bin/ld: skipping incompatible //usr/lib/libbass.so when searching for -lbass
linker: /usr/bin/ld: cannot find -lbass
BassTest.lpr(21,1) Error: Error while linking

I tried copying a different sized libbass.so in the mp3-free folder of the Linux download. Same error.
Laz 2.0.8
Linux-Mint 20.04.0 + Cinnamon, Kernel 5.8 (NOT stock Ubuntu/Mint 5.4 Kernel)
Lenovo Flex 5 Ryzen 5 4500, 512GB-NVMe, 16GB memory

QEnnay

  • Jr. Member
  • **
  • Posts: 53
Re: ACS Install Fails in Package Manager
« Reply #7 on: May 02, 2020, 05:39:02 pm »
Please post the error you get when trying to install  it, sorry no linux access to test my self.

I did "fails to compile" as in,
"failed to compile laz_acs_lib.lpk"
"failed to compile laz_acs.lpk"
Laz 2.0.8
Linux-Mint 20.04.0 + Cinnamon, Kernel 5.8 (NOT stock Ubuntu/Mint 5.4 Kernel)
Lenovo Flex 5 Ryzen 5 4500, 512GB-NVMe, 16GB memory

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 835
Re: ACS Install Fails in Package Manager
« Reply #8 on: May 02, 2020, 11:29:56 pm »
hello,
Hi, I just used the "Online Package Manager" to install the ACS audio suite in Linux to build a very simple music player for my Grandma.
ACS has not been checked on linux. There are compilation errors. This can be resolved but i am not sure that all the components will work in a project after.
What is your goal ?  what kind of music player ? mp3 ? midi file ? cd ?  why not vlc  (lazvlc paslibvlc) ?

Friendly J.P
« Last Edit: May 02, 2020, 11:37:36 pm by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

QEnnay

  • Jr. Member
  • **
  • Posts: 53
Re: ACS Install Fails in Package Manager
« Reply #9 on: May 03, 2020, 11:53:38 pm »
What is your goal

Thanks, as mentioned, it is for my grandma, she can't see very well so I wanted to make a large simple set of buttons for her touch-screen. First, Play, Pause, Stop, Next -- to play music CDs. I can VNC in to her PC and set up what she wants to listen to for the day.

Laz 2.0.8
Linux-Mint 20.04.0 + Cinnamon, Kernel 5.8 (NOT stock Ubuntu/Mint 5.4 Kernel)
Lenovo Flex 5 Ryzen 5 4500, 512GB-NVMe, 16GB memory

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8784
  • FPC developer.
Re: ACS Install Fails in Package Manager
« Reply #10 on: May 04, 2020, 12:40:19 am »
Put the library in /usr/lib and run ldconfig (as root?)

Only certain directories are allowed for libraries. And make sure  your application and the library are either both 32-bit or both 64-bit.

Jurassic Pork

  • Hero Member
  • *****
  • Posts: 835
Re: ACS Install Fails in Package Manager
« Reply #11 on: May 04, 2020, 03:04:07 am »
hello,
Thanks, as mentioned, it is for my grandma, she can't see very well so I wanted to make a large simple set of buttons for her touch-screen. First, Play, Pause, Stop, Next -- to play music CDs. I can VNC in to her PC and set up what she wants to listen to for the day.
to do that you can use  the package lazvlc   with vlc installed in your O.S.
screenshot of example with modified test project of lazvlc (testlcl) in attachment  (Lazarus 1.8.2  - Centos 8 - vlc 3.0.9)
Friendly, J.P
« Last Edit: May 04, 2020, 03:06:17 am by Jurassic Pork »
Jurassic computer : Sinclair ZX81 - Zilog Z80A à 3,25 MHz - RAM 1 Ko - ROM 8 Ko

QEnnay

  • Jr. Member
  • **
  • Posts: 53
Re: ACS Install Fails in Package Manager
« Reply #12 on: May 04, 2020, 04:53:59 pm »
  And make sure  your application and the library are either both 32-bit or both 64-bit.

Ah-Haaa!  Bingo, thanks, now it compiles and runs the BassTest from the Delphi BASS .zip.

I missed seeing the "x64" folder in the Linux BASS .zip, just assumed it would run with that unpacked .zip as it was. I never thought the default unpacking would be for x86, seems a little weird, maybe a cruel joke by un4seen?  ;)

All good so far, the test complies but will not play a .wav yet. I will dig into it and see what I can do,

Thanks again.
Laz 2.0.8
Linux-Mint 20.04.0 + Cinnamon, Kernel 5.8 (NOT stock Ubuntu/Mint 5.4 Kernel)
Lenovo Flex 5 Ryzen 5 4500, 512GB-NVMe, 16GB memory

 

TinyPortal © 2005-2018