Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install (on Fedora)? #141

Closed
francoisromain opened this issue Feb 11, 2023 · 16 comments
Closed

How to install (on Fedora)? #141

francoisromain opened this issue Feb 11, 2023 · 16 comments

Comments

@francoisromain
Copy link

Hello Takashi,
Me again with noob questions :).

I try to make the fireface 802 work on Fedora.


If I don't install any specific library on the system, I can see the fireface 802 in Bitwig preferences and configure the audio inputs and outputs. However there is no audio going through.
Is it normal?


To fix it I try to install snd-fireface-ctl-service.
I installed the dependencies (rust and cargo, libinawa, libitaki and alsa-gobject).

Howevere when I do snd-fireface-ctl-service 0,
There is an error : snd-fireface-ctl-service: error while loading shared libraries: libhitaki.so.0: cannot open shared object file: No such file or directory.

libhitaki.so.0 is installed.

ls -la /usr/local/lib64/
total 1388
drwxr-xr-x. 1 root root    750 11 févr. 14:19 .
drwxr-xr-x. 1 root root     90  9 août   2022 ..
drwxr-xr-x. 1 root root      0  9 août   2022 bpf
drwxr-xr-x. 1 root root    278 11 févr. 14:19 girepository-1.0
lrwxrwxrwx. 1 root root     15 11 févr. 14:07 libalsactl.so -> libalsactl.so.0
lrwxrwxrwx. 1 root root     19 11 févr. 14:07 libalsactl.so.0 -> libalsactl.so.0.3.0
-rwxr-xr-x. 1 root root 215304 11 févr. 14:06 libalsactl.so.0.3.0
lrwxrwxrwx. 1 root root     17 11 févr. 14:07 libalsahwdep.so -> libalsahwdep.so.0
lrwxrwxrwx. 1 root root     21 11 févr. 14:07 libalsahwdep.so.0 -> libalsahwdep.so.0.3.0
-rwxr-xr-x. 1 root root  74208 11 févr. 14:06 libalsahwdep.so.0.3.0
lrwxrwxrwx. 1 root root     19 11 févr. 14:07 libalsarawmidi.so -> libalsarawmidi.so.0
lrwxrwxrwx. 1 root root     23 11 févr. 14:07 libalsarawmidi.so.0 -> libalsarawmidi.so.0.3.0
-rwxr-xr-x. 1 root root 115072 11 févr. 14:06 libalsarawmidi.so.0.3.0
lrwxrwxrwx. 1 root root     15 11 févr. 14:07 libalsaseq.so -> libalsaseq.so.0
lrwxrwxrwx. 1 root root     19 11 févr. 14:07 libalsaseq.so.0 -> libalsaseq.so.0.3.0
-rwxr-xr-x. 1 root root 333720 11 févr. 14:07 libalsaseq.so.0.3.0
lrwxrwxrwx. 1 root root     17 11 févr. 14:07 libalsatimer.so -> libalsatimer.so.0
lrwxrwxrwx. 1 root root     21 11 févr. 14:07 libalsatimer.so.0 -> libalsatimer.so.0.3.0
-rwxr-xr-x. 1 root root 166112 11 févr. 14:06 libalsatimer.so.0.3.0
lrwxrwxrwx. 1 root root     14 11 févr. 14:11 libhinawa.so -> libhinawa.so.2
lrwxrwxrwx. 1 root root     18 11 févr. 14:11 libhinawa.so.2 -> libhinawa.so.2.5.1
-rwxr-xr-x. 1 root root 239944 11 févr. 14:11 libhinawa.so.2.5.1
lrwxrwxrwx. 1 root root     14 11 févr. 14:19 libhitaki.so -> libhitaki.so.0
lrwxrwxrwx. 1 root root     18 11 févr. 14:19 libhitaki.so.0 -> libhitaki.so.0.1.1
-rwxr-xr-x. 1 root root 204072 11 févr. 14:10 libhitaki.so.0.1.1
drwxr-xr-x. 1 root root    152 11 févr. 14:19 pkgconfig

How can I make this work?

Thank you

@francoisromain
Copy link
Author

oups just after I posted I realized I made a mistake on my side.
I don't need to install snd-fireface-ctl-service to make the soundcard work.

I am now curious to understand the role of this service.

@takaswie
Copy link
Member

@francoisromain

I am now curious to understand the role of this service.

The service program emulates RME TotalMix FX.

@francoisromain
Copy link
Author

Ok 🤯
I want to try it now.
From my post above do you understand what is wrong in install?

@takaswie
Copy link
Member

From my post above do you understand what is wrong in install?

I'd like you to reopen the issue.

Then please check your local system according to the instruction in this issue:

@francoisromain
Copy link
Author

Ok. I reopen and follow the instruction on the link.

In libhitaki : meson configure build

Directories        Current Value        Possible Values      Description
  -----------        -------------        ---------------      -----------
  bindir             bin                                       Executable directory
  datadir            share                                     Data file directory
  includedir         include                                   Header file
                                                               directory
  infodir            share/info                                Info page directory
  libdir             lib64                                     Library directory
  libexecdir         libexec                                   Library executable
                                                               directory
  localedir          share/locale                              Locale data
                                                               directory
  localstatedir      /var/local                                Localstate data
                                                               directory
  mandir             share/man                                 Manual page
                                                               directory
  prefix             /usr/local                                Installation prefix
  sbindir            sbin                                      System executable
                                                               directory
  sharedstatedir     /var/local/lib                            Architecture-
                                                               independent data
                                                               directory
  sysconfdir         etc                                       Sysconf data
                                                               directory

in snd-firewire-ctl-services : ldd ./target/debug/snd-fireface-ctl-service
does not work because there is no /debug dir inside /target, only a release dir.

Thank you for your help

@takaswie
Copy link
Member

in snd-firewire-ctl-services : ldd ./target/debug/snd-fireface-ctl-service does not work because there is no /debug dir inside /target, only a release dir.

The cargo build has two profiles; debug and release. If you can not find any executable under target/debug directory, it means that release profile is used and you can see the executable under target/release.

@francoisromain
Copy link
Author

francoisromain commented Feb 12, 2023

ldd ./target/release/snd-fireface-ctl-service

	linux-vdso.so.1 (0x00007ffff78ed000)
	libhitaki.so.0 => not found
	libhinawa.so.2 => /lib64/libhinawa.so.2 (0x00007f50a3c45000)
	libalsaseq.so.0 => not found
	libalsactl.so.0 => not found
	libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f50a3be4000)
	libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f50a3aa2000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f50a3a82000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f50a38a5000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f50a3e32000)
	libffi.so.8 => /lib64/libffi.so.8 (0x00007f50a3899000)
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f50a37fc000)

readelf -l target/debug/snd-bebob-ctl-service | grep interpreter

[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

/lib64/ld-linux-x86-64.so.2 --help

Shared library search path:
  (libraries located via /etc/ld.so.cache)
  /lib64 (system search path)
  /usr/lib64 (system search path)

find /usr/local | grep hitaki

/usr/local/include/hitaki
/usr/local/include/hitaki/hitaki_sigs_marshal.h
/usr/local/include/hitaki/hitaki_enums.h
/usr/local/include/hitaki/hitaki.h
/usr/local/include/hitaki/hitaki_enum_types.h
/usr/local/include/hitaki/snd_motu_register_dsp_parameter.h
/usr/local/include/hitaki/alsa_firewire.h
/usr/local/include/hitaki/quadlet_notification.h
/usr/local/include/hitaki/efw_protocol.h
/usr/local/include/hitaki/motu_register_dsp.h
/usr/local/include/hitaki/motu_command_dsp.h
/usr/local/include/hitaki/tascam_protocol.h
/usr/local/include/hitaki/snd_unit.h
/usr/local/include/hitaki/snd_digi00x.h
/usr/local/include/hitaki/snd_dice.h
/usr/local/include/hitaki/snd_efw.h
/usr/local/include/hitaki/snd_motu.h
/usr/local/include/hitaki/snd_tascam.h
/usr/local/lib64/pkgconfig/hitaki.pc
/usr/local/lib64/libhitaki.so.0.1.1
/usr/local/lib64/libhitaki.so.0
/usr/local/lib64/libhitaki.so

It looks very similar to other issue, but still, I don't understand how to fix it. Thank you for your help.

@takaswie
Copy link
Member

Shared library search path:
  (libraries located via /etc/ld.so.cache)
  /lib64 (system search path)
  /usr/lib64 (system search path)

It means that libraries installed under /usr/local are longer used by your system. Nevertheless meson
installed libraries to the directory:

Directories        Current Value        Possible Values      Description
  -----------        -------------        ---------------      -----------
  ...
  prefix             /usr/local                                Installation prefix
                                                               directory
  ...

I think you should uninstalled libhitaki and libraries of alsa-gobject, then install them again with adequate path, like:

$ meson uninstall -C your-build-directory
$ mecon configure --prefix=/usr/lib64 your-build-directory
$ meson install -C your-build-directory

Then the ELF program intrerpreter can find them when loading the service program.

Regards

@takaswie
Copy link
Member

For your information:

@francoisromain
Copy link
Author

francoisromain commented Feb 13, 2023

I tried meson uninstall -C ./build but it made an error :

usage: meson [-h] {setup,configure,dist,install,introspect,init,test,wrap,subprojects,rewrite,compile,devenv,env2mfile,help} 
meson: error: unrecognized arguments: -C ./build

Sorry for my lack of understanding, and again, thank you for your help.

@takaswie
Copy link
Member

takaswie commented Feb 13, 2023

I tried meson uninstall -C ./build but it made an error :

usage: meson [-h] {setup,configure,dist,install,introspect,init,test,wrap,subprojects,rewrite,compile,devenv,env2mfile,help} 
meson: error: unrecognized arguments: -C ./build

Oops. I'm sorry but I forgot that meson does not support uninstall operation...

We need to use ninja command directly for the purpose, like:

$ cd your-local-repository
$ cd your-build-directory
$ ninja uninstall

It is likely to execute the uninstall operation by super-user privilege.

@francoisromain
Copy link
Author

I uninstalled and re-instaled libhitaki and alsa-gobject.

find /usr/lib64/ | grep hitaki
/usr/lib64/include/hitaki
/usr/lib64/include/hitaki/hitaki_sigs_marshal.h
/usr/lib64/include/hitaki/hitaki_enums.h
/usr/lib64/include/hitaki/hitaki.h
/usr/lib64/include/hitaki/hitaki_enum_types.h
/usr/lib64/include/hitaki/snd_motu_register_dsp_parameter.h
/usr/lib64/include/hitaki/alsa_firewire.h
/usr/lib64/include/hitaki/quadlet_notification.h
/usr/lib64/include/hitaki/efw_protocol.h
/usr/lib64/include/hitaki/motu_register_dsp.h
/usr/lib64/include/hitaki/motu_command_dsp.h
/usr/lib64/include/hitaki/tascam_protocol.h
/usr/lib64/include/hitaki/snd_unit.h
/usr/lib64/include/hitaki/snd_digi00x.h
/usr/lib64/include/hitaki/snd_dice.h
/usr/lib64/include/hitaki/snd_efw.h
/usr/lib64/include/hitaki/snd_motu.h
/usr/lib64/include/hitaki/snd_tascam.h
/usr/lib64/lib64/pkgconfig/hitaki.pc
/usr/lib64/lib64/libhitaki.so.0.1.1
/usr/lib64/lib64/libhitaki.so.0
/usr/lib64/lib64/libhitaki.so

However, same error on service startup.

snd-fireface-ctl-service 5
snd-fireface-ctl-service: error while loading shared libraries: libhitaki.so.0: cannot open shared object file: No such file or directory
ldd ./target/release/snd-fireface-ctl-service
	linux-vdso.so.1 (0x00007ffd9c567000)
	libhitaki.so.0 => not found
	libhinawa.so.2 => /lib64/libhinawa.so.2 (0x00007f5a53929000)
	libalsaseq.so.0 => not found
	libalsactl.so.0 => not found
	libgobject-2.0.so.0 => /lib64/libgobject-2.0.so.0 (0x00007f5a538c8000)
	libglib-2.0.so.0 => /lib64/libglib-2.0.so.0 (0x00007f5a53786000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f5a53766000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f5a53589000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f5a53b16000)
	libffi.so.8 => /lib64/libffi.so.8 (0x00007f5a5357d000)
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007f5a534e0000)

What did I do wrong?

@takaswie
Copy link
Member

find /usr/lib64/ | grep hitaki
...
/usr/lib64/lib64/pkgconfig/hitaki.pc
/usr/lib64/lib64/libhitaki.so.0.1.1
/usr/lib64/lib64/libhitaki.so.0
/usr/lib64/lib64/libhitaki.so

The /usr/lib64/lib64 is not under the search paths. Please recheck configuration of meson.

@takaswie
Copy link
Member

I find that --prefix should be /usr, not /usr/lib64.

$ meson uninstall -C your-build-directory
$ mecon configure --prefix=/usr your-build-directory
$ meson install -C your-build-directory

@francoisromain
Copy link
Author

francoisromain commented Feb 13, 2023

It works. Thank you very much for your patience.

Now I can see every inputs / ouptuts in alsamixer.


Install on Fedora

Dependencies

Rust and Cargo

https://www.rust-lang.org/tools/install

Libhinawa

# install the dependencies
sudo dnf install meson glib2-devel gobject-introspection-devel gi-docgen

# clone the repo
git clone https://github.com/alsa-project/libhinawa
cd libhinawa

# build
meson . build
cd build
meson dist
cd ..

# copy the archive
mkdir ~/rpmbuild/SOURCES/
cp build/meson-dist/libhinawa-2.5.1.tar.xz ~/rpmbuild/SOURCES/

# build package 
rpmbuild -bb libhinawa.spec

# install package
sudo dnf install ~/rpmbuild/RPMS/x86_64/libhinawa-2.5.1-1.fc37.x86_64.rpm

Alsa-gobject

# install the dependencies
sudo dnf install meson cmake systemd-devel

# clone the repo
git clone https://github.com/alsa-project/alsa-gobject/
cd alsa-gobject/

# build
meson . build
meson configure --prefix=/usr
meson compile -C build
meson test -C build
meson install -C build

Libhitaki

# clone
git clone https://github.com/alsa-project/libhitaki
cd libhitaki/

# build
meson . build
meson configure --prefix=/usr
meson compile -C build
meson test -C build
meson install -C build

Install the service

# clone the repo 
git clone https://github.com/alsa-project/snd-firewire-ctl-services

# Install the executable
cd snd-firewire-ctl-services
cargo install --path runtime/fireface

# get the card id
arecord -l 

# run the executable 
snd-fireface-ctl-service 5

@takaswie
Copy link
Member

It works. Thank you very much for your patience.

Great.

Now I can see every inputs / ouptuts in alsamixer.

For your information, qashctl in quastools (https://gitlab.com/sebholt/qastools) is more friendly than alsamixer, IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants