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 Ubuntu)? #85

Closed
francoisromain opened this issue Jul 12, 2022 · 14 comments
Closed

How to install (on Ubuntu)? #85

francoisromain opened this issue Jul 12, 2022 · 14 comments
Assignees
Labels
question Further information is requested

Comments

@francoisromain
Copy link

francoisromain commented Jul 12, 2022

Hello,
I am new to this. Sorry for my stupid questions.

I just would like to install the firewire driver for the fireface 802 on ubuntu 22.04.

I cloned this repo, then I installed the dependencies:

  • rust and cargo,
  • and with apt install: libudev1, gobject-introspection, meson, ninja-build, build-essential and libgtk2.0-dev

Now I would like to install libhinawa, libhitaki and alsa-gobject. So I cloned the 3 repos to build them. But in the docs, I don't understand what are the directory-to-install and the build-directory variables.

Could you explain how to do it please?

@takaswie takaswie added the question Further information is requested label Jul 13, 2022
@takaswie takaswie self-assigned this Jul 13, 2022
@takaswie
Copy link
Member

Hi,

But in the docs, I don't understand what are the directory-to-install and the build-directory variables.

It depends on system; e.g. Ubuntu in your case.

For Ubuntu distribution, I think it convenient to generate deb package by hand. Each repositories for libhinawa, libhinoko, and alsa-gobject has topic/debian branch.
You can generate the package by:

$ dpkg-buildpackage -rfakeroot -uc -b

At least, below 14 packages should be installed in your system:

  • libhinawa2_2.5.1-1_amd64.deb

  • libhitaki0_0.1.1-1_amd64.deb

  • libalsactl0_0.3.0_amd64.deb

  • libalsahwdep0_0.3.0_amd64.deb

  • libalsarawmidi0_0.3.0_amd64.deb

  • libalsaseq0_0.3.0_amd64.deb

  • libalsatimer0_0.3.0_amd64.deb

  • gir1.2-hinawa-3.0_2.5.1-1_amd64.deb

  • gir1.2-hitaki-0.0_0.1.1-1_amd64.deb

  • gir1.2-alsactl-0.0_0.3.0_amd64.deb

  • gir1.2-alsahwdep-0.0_0.3.0_amd64.deb

  • gir1.2-alsarawmidi-0.0_0.3.0_amd64.deb

  • gir1.2-alsaseq-0.0_0.3.0_amd64.deb

  • gir1.2-alsatimer-0.0_0.3.0_amd64.deb

P.S. libgtk2.0-dev package is not required since the software has no relationship to GUI framework.

When install the above packages, the software could be built in your local system
without any specific notice.

Cheers.

@francoisromain
Copy link
Author

Thank you for your answer.
I had to install missing dependendies libudev-dev, libgirepository1.0-dev and gi-docgen.
Then I generated the deb pakages for alsa-gobject and libhitaki.

But libhinawa doesn't have a topic/debian branch, and I was not able to build the deb files for this one. How should I do it?

@dreamcat4
Copy link
Contributor

@francoisromain thanks for this updated list of build dependancies for ubuntu 22.04. Very helpful, much appreciated.

But libhinawa doesn't have a topic/debian branch, and I was not able to build the deb files for this one. How should I do it?

well... @takaswie is great so he probably will just update the git to fix that now that you have mentioned it

But in the meantime (if you cannot wait for that), then it should be possible manually build and install it onto your system with the following set of cmds:

# build lib
mkdir -p ~/.builds/firewire
cd ~/.builds/firewire
git clone https://github.com/alsa-project/libhinawa
cd libhinawa
meson --prefix=/usr build-directory
meson compile -C build-directory
meson test -C build-directory
sudo meson install -C build-directory

# build crate
mkdir -p ~/.builds/firewire
cd ~/.builds/firewire
git clone https://github.com/alsa-project/hinawa-rs.git
cd hinawa-rs
git submodule update --init --recursive
./generate.py

(or something like that, at least it worked for me with the recent v0.3x release)

@takaswie
Copy link
Member

But libhinawa doesn't have a topic/debian branch, and I was not able to build the deb files for this one. How should I do it?

Oops, indeed. I've never pushed the branch from my local repository to the remote repository since releases of libhinawa has already been in Debian/Ubuntu official repositories. I'm waiting for v2.5.1 packaging:

For convenience, I pushed it now:

I'm sorry to puzzle you.

@takaswie
Copy link
Member

# build crate
mkdir -p ~/.builds/firewire
cd ~/.builds/firewire
git clone https://github.com/alsa-project/hinawa-rs.git
cd hinawa-rs
git submodule update --init --recursive
./generate.py

I note that the step is not required just to build the software since the software is configured
to pull git remote repositories for dependent Rust crates at present.

@takaswie
Copy link
Member

Hi,

Today I finished relevant work for hinawa-rs/hitaki-rs/alsa-gobject-rs to depends on glib crate v0.15, and commit to master so that whole codes are based on them.

I updated README.rst to simplify dependency description. It's enough just to take care of
dependent C libraries since all of external crates are now available in crate.io.

Cheers.

@francoisromain
Copy link
Author

francoisromain commented Jul 16, 2022

Hello Takashi,
Thank you for your help.

I generated the deb files for libhinawa also. Then, I installed the 14 generated packages you listed above.

example:

❯ sudo apt install ./libhitaki0_0.1.1-1_amd64.deb 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'libhitaki0' instead of './libhitaki0_0.1.1-1_amd64.deb'
The following NEW packages will be installed:
  libhitaki0
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/20,4 kB of archives.
After this operation, 86,0 kB of additional disk space will be used.
Get:1 /home/fr/Desktop/alsa-deb/libhitaki0_0.1.1-1_amd64.deb libhitaki0 amd64 0.1.1-1 [20,4 kB]
Selecting previously unselected package libhitaki0:amd64.
(Reading database ... 234428 files and directories currently installed.)
Preparing to unpack .../libhitaki0_0.1.1-1_amd64.deb ...
Unpacking libhitaki0:amd64 (0.1.1-1) ...
Setting up libhitaki0:amd64 (0.1.1-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3) ...
N: Download is performed unsandboxed as root as file '/home/fr/Desktop/alsa-deb/libhitaki0_0.1.1-1_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Now when I go back to the snd-firewire-ctl-services directory, git pull the updated content and run cargo build, it starts to build but then makes many errors like : error: could not find system library 'hitaki' required by the 'hitaki-sys' crate.

Same error when I run cargo run --bin snd-fireface-ctl-service.

What am i doing wrong here?

@dreamcat4
Copy link
Contributor

btw also... not sure why you have debian/ subfolder in its own seperate branches. it would be easier for others to build if it was just merged into the main branch

@takaswie
Copy link
Member

Now when I go back to the snd-firewire-ctl-services directory, git pull the updated content and run cargo build, it starts to build but then makes many errors like : error: could not find system library 'hitaki' required by the 'hitaki-sys' crate.

Oops, I forget that ll of the FFI crates (*-sys) check pkg-config files provided by dependent libraries when being built. The build dependency has *-dev deb packages; e.g. libhitaki-dev, while I missed it in README.md...

Would I ask you to install generated *-dev deb packages as well before building the software.

I'm sorry to use your time for the task like dogfooding... I should have added details into install section of README.

Cheers

@takaswie
Copy link
Member

takaswie commented Jul 16, 2022

btw also... not sure why you have debian/ subfolder in its own seperate branches. it would be easier for others to build if it was just merged into the main branch

I intentionally split stuffs of deb packaging from software source since they can intercept process to import source code into official deb source repository (https://salsa.debian.org).

@francoisromain
Copy link
Author

Thank you again :).

I already installed libalsactl0_0.3.0_amd64.deb and libalsatimer0_0.3.0_amd64.deb and still have 2 errors when doing cargo build fromsnd-firewire-ctl-services :

  • error: could not find system library 'alsactl' required by the 'alsactl-sys' crate
  • error: could not find system library 'alsatimer' required by the 'alsatimer-sys' crate

@takaswie
Copy link
Member

I already installed libalsactl0_0.3.0_amd64.deb and libalsatimer0_0.3.0_amd64.deb and still have 2 errors when doing cargo build fromsnd-firewire-ctl-services :

* `error: could not find system library 'alsactl' required by the 'alsactl-sys' crate`

* `error: could not find system library 'alsatimer' required by the 'alsatimer-sys' crate`

It means that generated 'alsa-gobject-dev' package is not installed into your system. The package includes pkg-config files for all of included libraries such as libalsactl0 and libalsatimer0.

@francoisromain
Copy link
Author

Ok it works! 😄 🥳


Here is a recap of the whole process to install a firewire driver on Ubuntu 22.04

  1. Install rust and cargo. Instructions

  2. Install dependencies sudo apt install libudev1 gobject-introspection meson ninja-build build-essential libudev-dev libgirepository1.0-dev gi-docgen

  3. Generate the deb packages for other dependencies libhinawa, libhitaki and alsa-gobject
    For each repo:

    • clone the repo, fetch the remote branch topic/debian and checkout this branch.
    • generate the deb packages with dpkg-buildpackage -rfakeroot -uc -b
  4. Install the generated deb packages for the additional dependencies with sudo apt install ./<package_name.deb> for:

    • libhinawa2_2.5.1-1_amd64.deb
    • libhitaki0_0.1.1-1_amd64.deb
    • libalsactl0_0.3.0_amd64.deb
    • libalsahwdep0_0.3.0_amd64.deb
    • libalsarawmidi0_0.3.0_amd64.deb
    • libalsaseq0_0.3.0_amd64.deb
    • libalsatimer0_0.3.0_amd64.deb
    • gir1.2-hinawa-3.0_2.5.1-1_amd64.deb
    • gir1.2-hitaki-0.0_0.1.1-1_amd64.deb
    • gir1.2-alsactl-0.0_0.3.0_amd64.deb
    • gir1.2-alsahwdep-0.0_0.3.0_amd64.deb
    • gir1.2-alsarawmidi-0.0_0.3.0_amd64.deb
    • gir1.2-alsaseq-0.0_0.3.0_amd64.deb
    • gir1.2-alsatimer-0.0_0.3.0_amd64.deb
    • libhinawa-dev_2.5.1-1_amd64.deb
    • libhitaki-dev_0.1.1-1_amd64.deb
    • alsa-gobject-dev_0.3.0_amd64.deb
  5. Clone this repo snd-firewire-ctl-services

  6. Get the card_id of the firewire soundcard with arecord -l. In my case card_id is 4.

  7. Run the driver: cargo run --bin <driver_name> <card_id>. Ex: cargo run --bin snd-fireface-ctl-service 4


Thank you very much for your time making these drivers and for your help.
(I would be happy to donate to support your work, if you have a way of doing that.)

I have 2 more questions for now :

  • how to handle the update on my computer when you update the drivers?
  • will this process eventually become easier, or is it the normal way to go?

You can close the issue.
Thank you again.
🙏

@takaswie
Copy link
Member

takaswie commented Sep 1, 2022

Closed.

@takaswie takaswie closed this as completed Sep 1, 2022
@francoisromain francoisromain changed the title How to install? How to install (on Ubuntu)? Feb 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants