Build Audacity with mod-script-pipe on Raspberry Pi [SOLVED]

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
adaptiman
Posts: 30
Joined: Fri Mar 16, 2018 8:28 pm
Operating System: Linux Debian

Build Audacity with mod-script-pipe on Raspberry Pi [SOLVED]

Post by adaptiman » Mon Mar 19, 2018 7:05 pm

I've compiled Audacity 2.2.2 as well as mod-script-pipe.so. I've also run make install. For my installation, the audacity executable is located in /usr/local/bin/. I've tried all of the locations to copy mod-script-pipe.so to register it with no avail. When accessing the modules dialog, Audacity returns

Code: Select all

No modules were found
So far, I've tried these locations:

/usr/local/bin/modules/
/usr/local/share/audacity/modules/
~/audacity-build-directory/modules/
~/.audacity-files/modules/
~/.audacity-data/modules/

When I execute audacity as root (i.e., sudo audacity) the module is read, but I don't know which copy of the file is being read, nor how to fix the installation so I can run audacity as a non-priviledged user. Any tips on getting mod-script-pipe to load correctly?

steve
Site Admin
Posts: 47287
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: mod-script-pipe.so won't load

Post by steve » Mon Mar 19, 2018 7:26 pm

It should work in:

Code: Select all

~/.audacity-files/modules/mod-script-pipe.so
Note that after enabling it in Preferences, Audacity must be restarted.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

adaptiman
Posts: 30
Joined: Fri Mar 16, 2018 8:28 pm
Operating System: Linux Debian

Re: mod-script-pipe.so won't load

Post by adaptiman » Mon Mar 19, 2018 7:46 pm

steve wrote:It should work in:

Code: Select all

~/.audacity-files/modules/mod-script-pipe.so
Note that after enabling it in Preferences, Audacity must be restarted.
That location doesn't work. The only path I can get it to register is:

/usr/local/share/audacity/modules/mod-script-pipe.so

and ONLY when executing Audacity as root via sudo audacity. I have successfully registered and loaded the module when executing as root. The non-privileged user can't see the file, probably because of a permissions problem.

steve
Site Admin
Posts: 47287
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: mod-script-pipe.so won't load

Post by steve » Mon Mar 19, 2018 8:53 pm

You should not need to run Audacity as root.

Code: Select all

/usr/local/share/audacity/modules/mod-script-pipe.so
should also work, but should not require running as root. Is your user account the owner of mod-script-pipe.so

I've got it mod-script-pipe in:

Code: Select all

~/.audacity-files/modules/mod-script-pipe.so
and the permissions are:

Code: Select all

-rwxrwxr-x 1 <user> <user> 409320 Mar 19 13:35 mod-script-pipe.so
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

adaptiman
Posts: 30
Joined: Fri Mar 16, 2018 8:28 pm
Operating System: Linux Debian

Re: mod-script-pipe.so won't load

Post by adaptiman » Mon Mar 19, 2018 9:04 pm

Code: Select all

$ ls -al ~/.audacity-files/modules/mod-script-pipe.so 
-rwxrwxr-x 1 pi pi 40552 Mar 19 15:55 /home/pi/.audacity-files/modules/mod-script-pipe.so
Still doesn't work.
Attachments
2018-03-19-160244_1024x614_scrot.png
2018-03-19-160244_1024x614_scrot.png (89.65 KiB) Viewed 871 times

steve
Site Admin
Posts: 47287
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: mod-script-pipe.so won't load

Post by steve » Mon Mar 19, 2018 11:28 pm

and I presume that you are logged in as "pi"?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

adaptiman
Posts: 30
Joined: Fri Mar 16, 2018 8:28 pm
Operating System: Linux Debian

Re: mod-script-pipe.so won't load

Post by adaptiman » Mon Mar 19, 2018 11:40 pm

steve wrote:and I presume that you are logged in as "pi"?
Yes sir. Sorry for the trouble, and thanks for the help!!

steve
Site Admin
Posts: 47287
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: mod-script-pipe.so won't load

Post by steve » Tue Mar 20, 2018 9:33 am

I don't understand why it only works for you when running as root, so I've posted to the developer's mailing list to see if anyone there has any ideas.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

adaptiman
Posts: 30
Joined: Fri Mar 16, 2018 8:28 pm
Operating System: Linux Debian

Re: mod-script-pipe.so won't load

Post by adaptiman » Wed Mar 21, 2018 2:36 am

I've done some more checking and confirmed the following conditions:

1. The module only loads when audacity is run as root, and will load if the module is located in either:

/root/.audacity-files/modules/mod-script-pipe.so
or
/usr/local/share/audacity/modules/mod-script-pipe.so

2. The module will not run under the non-privileged user in any location that I have tried. I have confirmed permissions on files in all of the typical locations and am tending toward thinking it's probably not a permissions problem.

3. The location in the source where the module file paths are defined is in and about:

/src/AudacityApp.cpp (1275)

I can't see anything wrong with the code (then again, I'm not a C programmer).

At this point, I suspect that the problem is seeing/loading the module requires a process that requires elevated privileges, although I don't know what that would be. I'm going to do some checking along these lines, but there definitely seems to be a problem, either with the configuration of my Debian system (probably) or Audacity itself (possible).

steve
Site Admin
Posts: 47287
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu
Contact:

Re: mod-script-pipe.so won't load

Post by steve » Wed Mar 21, 2018 10:25 am

What are the file permissions for your "/tmp" folder? (mod-script-pipe requires rw access to /tmp)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked