crouton
crouton copied to clipboard
Figure out a way to build audio target now that autotools is removed
https://chromium.googlesource.com/chromiumos/third_party/adhd/+/879fe7a51784eb07d1b85473d8927050fb000f87 removed cras/src/Makefile.am
that we used to rely on.
Not sure how we can work around this, implementing a bazel parser is definitely not something I'm looking forward to.
That CL landed in 15378.0.0.
5 options from discussion with @dnschneid :
- On >=15378.0.0, fix cras fetch version to
879fe7a51784eb07d1b85473d8927050fb000f87^
. IMHO that'll break fairly quickly as the structures change. - On >=15378.0.0 fetch
Makefile.am
from879fe7a51784eb07d1b85473d8927050fb000f87^
. That might last a bit longer and we can still patch changes as needed. - Deprecate audio target.
- Implement Bazel to shell converter.
- Audio over websocket.
4/5 are like, intern-sized project, so non-starter.
I think we'll end up with 3 eventually, but 2 should be easy to implement.
Basically, we just need to add a download step around here: https://github.com/dnschneid/crouton/blob/master/targets/audio#L59
mkdir -p "$CRASBUILDTMP/cras/src"
wget https://chromium.googlesource.com/chromiumos/third_party/adhd/+/c2ece09f69565afcbcf511b1693f3fe735bde511/cras/src/Makefile.am?format=TEXT -O- | base64 -d > "$CRASBUILDTMP/cras/src/Makefile.am"
(this can be done unconditionally as the extraction phase would override it)
Why can't we just eliminate cras? If you install a basic core, e.g.,
sudo crouton -r focal -t core
then from within the chroot, install alsa-utils, e.g.,
sudo apt install alsa-utils
my experience is that you can both record and play audio using, .e.g., arecord and aplay.
I've always been able to do this in crouton. So why do we even need the cras module?
That should indeed work in many cases. Volume control will not integrate well though (nor any of the cras-applied volume curves, for example), and only integrated audio would work (no BT/USB headset). And there might be some weird interactions between cras and whatever userspace app.
Thanks, drinkcat. I realize how little I know about the inner workings of crouton. You've been involved as long as I can remember. Thanks for your contributions.
The main branch is still not fixed. How do I download your branch?
Is Google intentionally sabotaging Crouton?
Is Google intentionally sabotaging Crouton?
This one is easy to answer. No, absolutely not. Chrome OS devs are moving forward and unintentionally breaking things in crouton. This happened many times throughout the years, and we could usually play catch up. This time, none of us have time (or even hardware) to test these fixes locally, so we'd need somebody from the community to step up.
@CroutonIsFun,
I think it can be tested using the new experimental branch 'longliveautotools' like this:
-
sudo CROUTON_BRANCH=longliveautotools crouton ...
Enter the crouton options you would normally use to add or update a chroot in the command above.
-DennisLfromGA
@DennisLfromGA i tried it out with the command and cras compiles perfectly but then this happens,
cp: cannot stat 'Makefile.am': No such file or directory Failed to complete chroot setup. Unmounting /mnt/stateful_partition/crouton/chroots/jammy...
@ducksosu,
That's strange since the PR downloads a previous 'lastgoodam', not sure why it's failing, sorry. Maybe @drinkcat [EDIT: or @dnschneid] will know.
-DennisLfromGA
I pushed a small change to hopefully fix that. Give it another shot, @ducksosu?
@dnschneid i tried and and its back to the first problem
Compiling CRAS (i386)... gcc: error: unrecognized command-line option '-Wundef-prefix=HAVE_,CRAS_' Failed to complete chroot setup. Unmounting /mnt/stateful_partition/crouton/chroots/jammy...
Yeah, this fix needs to be combined with whatever fix for #4923, unfortunately.
Thanks for the feedback, guys!
I also tried the longliveautotools branch:
Compiling CRAS (i386)... gcc: error: unrecognized command line option '-Wundef-prefix=HAVE_,CRAS_' Failed to complete chroot setup.
Edit: Disregard the below. The i386 is needed by AutoTools, otherwise we wouldn't be adding it.
̶S̶o̶ ̶h̶e̶r̶e̶'̶s̶ ̶a̶n̶o̶t̶h̶e̶r̶ ̶o̶u̶t̶s̶i̶d̶e̶-̶t̶h̶e̶-̶b̶o̶x̶ ̶s̶u̶g̶g̶e̶s̶t̶i̶o̶n̶:̶ ̶e̶l̶i̶m̶i̶n̶a̶t̶e̶ ̶t̶h̶e̶ ̶i̶3̶8̶6̶ ̶a̶r̶c̶h̶i̶t̶e̶c̶t̶u̶r̶e̶.̶ ̶W̶h̶y̶ ̶i̶s̶ ̶i̶t̶ ̶n̶e̶e̶d̶e̶d̶?̶
I think I was using crouton before cras was baked into the chroot. Also, it used to be that focal would install without cras, and I could access the sound card(s) directly using qjackctl and qsynth. But soon enough, the "oversight" was fixed.
There are many use cases without the need for pretty sounds. Option 3 above, deprecate audio, is looking better and better. If crouton is going to break early and often, and take days or weeks to be fixed, then it's useless, save as an intellectual curiosity.
I'm trying to keep the people on r/Crouton apprised of the situation, many of whom have no clue where to look for help. Thanks for all you guys do and have done over the years.
James :)
so if i removed the '-Wundef-prefix=HAVE_,CRAS_' option from the makefile would that cause any issues with cras or sound in general
All you can do is try it and see what happens
@CroutonIsFun yeah still trying to figure out where the makefile is though. do you know?
@ducksosu Would this be it?
https://github.com/dnschneid/crouton/blob/9eaac08b3ffc3994a3eb64ee6dca313b09cba006/targets/audio
@ducksosu,
The new audio file is in the 'longliveautotools' branch, you can find it here:
- https://github.com/dnschneid/crouton/blob/longliveautotools/targets/audio
Look at lines 60-65 where the Makefile.am is downloaded.
You could modify the file to add the sed
command below:
-
sed -i -e 's/\-Wundef\-prefix=HAVE_,CRAS_//g' Makefile.am
-DennisLfromGA
@DennisLfromGA if i want to get rid of
gcc: error: unrecognized command-line option '-Wundef-prefix=HAVE_,CRAS_'
Failed to complete chroot setup.
do i replace my old one with the new one and not add the sed commmand?
Running the below is prompting me to include the sed i think
sudo CROUTON_BRANCH=longliveautotools crouton -t xfce
What distro are you selecting to install?
@IsolatedRainbow ubuntu jammy with xfce
I stopped getting that error with specifying the branch. I'm hoping that the devs have an idea about whats going on. Im happy to help however I can. Just recently learned about Crouton so excited to use it
@IsolatedRainbow with the longliveautotools branch?
yeah
which distro did you install @IsolatedRainbow
sudo CROUTON_BRANCH=longliveautotools crouton -t xfce -u
I'm attempting to install xfce xenial
im gonna try xenial just to see if its just jammy doing it
@IsolatedRainbow what version of chromeos are you on because this issue is only for chromeos 111