WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] Fail to run portaudio examples  (Read 12072 times)

Offline nickob

  • Newbie
  • *
  • Posts: 10
[SOLVED] Fail to run portaudio examples
« on: October 21, 2013, 01:10:30 PM »
Hi,

For a project I am working on, I have downloaded and compiled the portaudio library. To check if everything is fine I compiled some examples coming with the lib. Compilation worked, but execution fails with the following message:

Code: (bash) [Select]
./paex_sine: line 1: syntax error: unexpected word (expecting ")")
I do not see what it means.. I am on a RPi model B, with core v4.7.5 running, and alsa, gcc, ... installed.

Thanks in advance,

Nicolas
« Last Edit: October 25, 2013, 05:57:49 PM by nickob »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Fail to run portaudio examples
« Reply #1 on: October 21, 2013, 01:42:31 PM »
Which example you run?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14783
Re: Fail to run portaudio examples
« Reply #2 on: October 21, 2013, 01:57:12 PM »
You could load the bash extension (if not already done) and try again

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Fail to run portaudio examples
« Reply #3 on: October 21, 2013, 02:50:32 PM »
Please post output of
Code: [Select]
file -k paex_sine

EDIT:
...in case you have the 'file' extension installed, that is...
« Last Edit: October 21, 2013, 02:52:28 PM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline nickob

  • Newbie
  • *
  • Posts: 10
Re: Fail to run portaudio examples
« Reply #4 on: October 21, 2013, 05:19:50 PM »
I was trying the paex_sine example, located in portaudio/examples.

I compiled the source with:

Code: (bash) [Select]
gcc -o paex_sine -c paex_sine.c -I/usr/local/include/ -L/usr/local/lib -lm -lportaudio
I have the bash extension installed.

$file -k ./paex_sine gives:

Code: (bash) [Select]
./paex_sine: ELF 32-bit LSB  relocatable, ARM, EABI5 version 1 (SYSV), not stripped

Offline nickob

  • Newbie
  • *
  • Posts: 10
Re: Fail to run portaudio examples
« Reply #5 on: October 22, 2013, 11:15:42 AM »
Hi,

Good news, I have rebooted and the equivocal message has gone... Yet, the executable still do not launch. Now I get:

Code: (bash) [Select]
./paex_sine: error while loading shared libraries: libportaudio.so.2: cannot open shared object file: No such file or directory
libportaudio.so.2 is actually in /usr/local/lib/ (but not as a symbolic link as it is the case for all the other files), and I had declared the directory to the gcc command.

Did I miss something in the installation of portaudio?

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Fail to run portaudio examples
« Reply #6 on: October 22, 2013, 12:06:56 PM »
Probably

Code: [Select]
ldconfig
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline nickob

  • Newbie
  • *
  • Posts: 10
Re: Fail to run portaudio examples
« Reply #7 on: October 23, 2013, 01:56:41 PM »
Ok, so I rolled up my sleeves, and built the portaudio extension for the PiCore. If anyone is interested I could share it.

Offline armpulseuser1

  • Newbie
  • *
  • Posts: 1
Re: [SOLVED] Fail to run portaudio examples
« Reply #8 on: November 11, 2013, 09:45:43 AM »

Posted by: nickob
« on: October 23, 2013, 09:56:41 AM »

    Insert Quote


Ok, so I rolled up my sleeves, and built the portaudio extension for the PiCore. If anyone is interested I could share it.


     Hi , 

 i 'm interested about portaudio extension for the Picore , thank's.

Offline nickob

  • Newbie
  • *
  • Posts: 10
[SOLVED] Fail to run portaudio examples
« Reply #9 on: November 12, 2013, 12:30:47 PM »
Hi,

Here is the extension (I could not upload it here, because of the file size restriction):

Download link deleted to keep post compliant to Forum rules. bmarkus

Just untar and copy the 3 files to your tce/optional directory, then load it the usual way. You will have to install the alsa extension first to get it work.

The extension was built with piCore version 4.7. I have no idea if this will work on other versions.

Regards,

Nicolas
« Last Edit: November 12, 2013, 03:13:32 PM by bmarkus »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: [SOLVED] Fail to run portaudio examples
« Reply #10 on: November 12, 2013, 03:11:35 PM »
Nicolas,

contribution to repo always welcome. However Forum rules do not allow posting direct download links. If you have an extension for the repo, send it in email to picoresubmit@gmail.com

Yor extension in the present form doesn't comply to repo repo requirements.

- dev files are not separated
- no .dep file, while extension depends on libasound
- .info file is missing
- breaking upstream license as license text is missing
- it is not compiled against jack, celt, libopus and dbus
- cxx binding is disabled

Please study how extensions packed in the repo and the source tarball.

Bela

P.S. Download link deleted

« Last Edit: November 12, 2013, 03:15:12 PM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline nickob

  • Newbie
  • *
  • Posts: 10
Re: [SOLVED] Fail to run portaudio examples
« Reply #11 on: November 12, 2013, 05:05:01 PM »
Sorry, I initially created the extension for my own needs, and I did not intend to produce a formal extension for the repo. I just shared the link to help, but I understand it is not a good practice for the consistency of the whole project.

I will try to wrap it properly and to submit to the repo in a near future.

Regards,

Nicolas

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: [SOLVED] Fail to run portaudio examples
« Reply #12 on: November 12, 2013, 05:47:22 PM »
Nicolas,

it is in the piCore 5.x repo already. I suggest to change to 5.x as its repo is reacher, more up to date.


Regards... Bela
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."