Building from source on Linux Mint 20.3 - Hit a snag. Topic is solved

Users and developers helping users with generic and technical Pale Moon issues on all operating systems.

Moderator: trava90

Forum rules
This board is for technical/general usage questions and troubleshooting for the Pale Moon browser only.
Technical issues and questions not related to the Pale Moon browser should be posted in other boards!
Please keep off-topic and general discussion out of this board, thank you!
BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-04, 16:04

I'm trying to work my second contribution to the Pale Moon source: https://repo.palemoon.org/MoonchildProd ... ssues/1897

My first contribution was so simple, I didn't need to test it. This change will need testing, so I believe I'll need to build from source. (If that's not the case, I'm all ears!)

My OS details:

Code: Select all

System:    Kernel: 5.15.0-56-generic x86_64 bits: 64 compiler: N/A Desktop: MATE 1.26.0 wm: Compiz 
           dm: LightDM Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal 
I'm following this guide of course: http://developer.palemoon.org/build/linux/

I've made it to the point where the build is looking for the alsa package. I've worked through half a dozen of these so far, but I'm not sure what to do here. Any advice?

Build error:

Code: Select all

 0:04.27 DEBUG: configure:11591: checking for alsa
 0:04.27 DEBUG: configure: error: You need ALSA for audio output on Linux.
 0:04.27 ERROR: old-configure failed

However, I have alsa-base instead and I'm not entirely sure how to proceed:

Code: Select all

$ sudo apt-get install alsa
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'alsa-base' instead of 'alsa'
alsa-base is already the newest version (1.0.25+dfsg-0ubuntu5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Maybe a symlink is in order? Or I need a dev package that I'm not finding?


Edit: Looking at the Pale Moon source, I found mention of alsa-base and alsa-utils in the Ubuntu test docker recipes so I tied installing alsa-utils but already had it as well:

Code: Select all

$ sudo apt-get install alsa-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
alsa-utils is already the newest version (1.2.2-1ubuntu2.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
I found mention of libsox-fmt-alsa and bluez:i386 as well in the docker recipes, so I installed those (I did not have them installed prior).
However, that has not solved the problem. I'm still getting the same build error shown above.

Similarly I've finding gstreamer0.10-alsa mentioned as well. This package is proving difficult to install. If I need it, I'm not sure how to get it right now.
(However I do have gstreamer1.0-alsa installed, but I'm not sure that's any help.)

Code: Select all

$ sudo apt-get install gstreamer0.10-alsa
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package gstreamer0.10-alsa
E: Couldn't find any package by glob 'gstreamer0.10-alsa'
E: Couldn't find any package by regex 'gstreamer0.10-alsa'

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by Moonchild » 2022-12-04, 16:48

We haven't used gstreamer for a while, so you shouldn't really have to look into that.

As for the packages, you probably need an alsa-dev package for building with alsa support, not just a base package (which would most likely be binary libs).
I defer to Linux specialists beyond these surface thoughts though; one complex OS from a dev point of view is quite sufficient for me ;)
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-04, 17:00

Moonchild wrote:
2022-12-04, 16:48
We haven't used gstreamer for a while, so you shouldn't really have to look into that.
Okay, gotcha. I found this and was trying to see if I could get gstreamer0.10-ffmpeg installed...
viewtopic.php?f=3&t=9824&p=67297&hilit= ... lsa#p67299
Moonchild wrote:
2022-12-04, 16:48
As for the packages, you probably need an alsa-dev package for building with alsa support, not just a base package (which would most likely be binary libs).
That's what I figured, but I'm having a hard time finding one. I'll keep looking.
Moonchild wrote:
2022-12-04, 16:48
I defer to Linux specialists beyond these surface thoughts though; one complex OS from a dev point of view is quite sufficient for me ;)
You and me both. I wish I knew Linux like I knew Windows. People pay me to fix their Windows problems...


Edit: I've installed these with no luck:
alsa-tools

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-04, 17:13

I've made progress installing libasound2-dev and now have a new error (about libpulse), so I might be on my way. :thumbup:
The tip to install libasound2-dev came from: https://askubuntu.com/a/1281226
Last edited by BenFenner on 2022-12-04, 17:23, edited 1 time in total.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by vannilla » 2022-12-04, 17:14

On systems with APT run this command:

Code: Select all

apt search alsa
Please note it is not apt-get.
If you scroll the output you should see some packages described as "development fikes". Just install the correct one and you should be done.

(Ninja'd by the latest update, but I didn't want to rewrite)
Do the same for every missing component and you should be fine.

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-04, 17:29

Thanks for the help everyone. I needed a few more packages and I think the build is underway properly now (all CPU cores are pegged at 100%, ~6GB of memory were allocated, and I'm getting good feedback from the console.)

Edit: Yep, the build completed successfully and I have a copy I've built from source. Now I can modify the source and see what I get afterward. It's a bit of a slow turn-around (735s) but not horrible.
Last edited by BenFenner on 2022-12-04, 20:36, edited 1 time in total.

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-04, 20:31

I'm moving the list of packages required to build for Mint out of the repo and into this thread.

To build Pale Moon from source of Linux Mint 20 you'll need to add some packages by running the commands below.

As mentioned in the docs:

Code: Select all

sudo apt-get install yasm

Code: Select all

wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar -zvxf autoconf-2.13.tar.gz
cd autoconf-2.13
./configure && make
sudo -i
make install
ln -s /usr/local/bin/autoconf /usr/local/bin/autoconf-2.13
Cntrl + D (leave root user and return to your user)


Not yet mentioned in the docs:

Code: Select all

sudo apt-get install gtk2.0
sudo apt-get install gconf-2.0
sudo apt-get install libgconf2-dev
sudo apt-get install libdbus-glib-1-dev
sudo apt-get install libasound2-dev
sudo apt-get install libpulse-dev
sudo apt-get install libxt-dev
sudo apt-get install libx11-xcb-dev
Last edited by BenFenner on 2022-12-04, 21:50, edited 1 time in total.

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2183
Joined: 2018-05-05, 13:29

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by vannilla » 2022-12-04, 21:41

I believe gconf and dbus are optional if you specify the relevant flag in the .mozconfig file.
Pulseaudio is too, but if you visit a lot of video-heavy websites you should have it enabled.

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-04, 21:51

Right, I just wanted to have the most recommended setup according to the supplied .mozconfig. If it came to that I'd have done it, but as-is I have the whole shebang.

User avatar
stevenpusser
Project Contributor
Project Contributor
Posts: 903
Joined: 2015-08-01, 18:33

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by stevenpusser » 2022-12-05, 01:22

The build-depends are the same as for Debian, which are already listed on the developer building page that you have linked:
Debian

Install the required build dependencies by executing the following command:

apt-get install build-essential libgtk2.0-dev libdbus-glib-1-dev autoconf2.13 \
yasm libegl1-mesa-dev libasound2-dev libxt-dev zlib1g-dev libssl-dev \
libsqlite3-dev libbz2-dev libpulse-dev libgconf2-dev libx11-xcb-dev \
zip python2.7 python-dbus
Add libgtk-3-dev if you want a GTK+ 3 version, and change mozconfig to use the cairo-gtk3 option.

Debianized packages for Ubuntu/Mint/Debian already exist, though, with everything already worked out...

https://build.opensuse.org/package/bina ... untu_20.04

Download and extract the debian.tar.xz file to see the build-depends I'm using, as well as the alternative runtime libavcodecXX packages that are needed for playback. gstreamer currently is not in the picture.

I believe you can add my OBS repos to your sources.list channels as "deb-src", then "apt source palemoon" to get and extract my sources into a ready to build directory. If you need to make changes to the source and rebuild, that can be done by easily making any changes to the source into a patch in debian/patches with "dpkg-source --commit", or just building it with the "-b" argument to accept any source changes without complaining that they have been changed. That last is not kosher with actual repo packages, but is OK for personal builds/experiments.

I have some changes coming up to the debian/rules file for 31.4.2, which has the actual procedure to build the packages, now that I know how to get it to use a custom mozconfig file depending on the CPU architecture. I could put the amd64 packages in lib64 automatically like in the example mozconfig, also...

BTW, I have read that using a hidden .mozconfig file is unnecessary and can just confuse novices. Just use "mozconfig".

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-05, 12:54

stevepusser wrote:
2022-12-05, 01:22
The build-depends are the same as for Debian, which are already listed on the developer building page that you have linked:
Yes, I realize that now. Similar to how the Debian package is the one you build that is used for Linux Mint.

I believe editing the header of the Debian-specific instructions to read "Debian / Ubuntu / Mint" would have saved me a lot of time, and maybe others in the future. What do you think Moonchild?
Similarly, Steve I wonder if your site could use the same addition? I know back when I was trying to install on Mint for the first time it took me a good bit of research to figure out that your Debian build was the one that would work on my OS.
stevepusser wrote:
2022-12-05, 01:22
BTW, I have read that using a hidden .mozconfig file is unnecessary and can just confuse novices. Just use "mozconfig".
Interesting tidbit. Luckily I'm not that specific kind of newb and hidden files are one of the first things I show on any new OS config.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by Moonchild » 2022-12-05, 13:30

stevepusser wrote:
2022-12-05, 01:22
BTW, I have read that using a hidden .mozconfig file is unnecessary and can just confuse novices. Just use "mozconfig".
you could actually use anything you want (I do this myself to quickly swap between builds) by using

Code: Select all

export MOZCONFIG=/path/to/mozconfig
before starting a mach build.
BenFenner wrote:
2022-12-05, 12:54
I believe editing the header of the Debian-specific instructions to read "Debian / Ubuntu / Mint" would have saved me a lot of time, and maybe others in the future. What do you think Moonchild?
I'm not sure. Is Mint usage big enough (and knowledge it's an Debian/Ubuntu derivative unknown enough) that it warrants it? I want to avoid having a huge list of distros (and then get complaints distro X or Y isn't in there as well) and just give some broad strokes for very large distros that specifically need their mention.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

BenFenner
Astronaut
Astronaut
Posts: 588
Joined: 2015-06-01, 12:52
Location: US Southeast

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by BenFenner » 2022-12-05, 16:32

Moonchild wrote:
2022-12-05, 13:30
I'm not sure. Is Mint usage big enough (and knowledge it's an Debian/Ubuntu derivative unknown enough) that it warrants it? I want to avoid having a huge list of distros (and then get complaints distro X or Y isn't in there as well) and just give some broad strokes for very large distros that specifically need their mention.
Understood.

As someone with enough familiarity with Linux to be dangerous, but hugely lacking compared to my administrative ability in Windows... I knew enough that I wanted Linux Mint + MATE, and I knew it was an Ubuntu derivative. I had/have no idea that Ubuntu leads back to Debian. "Debian" is a huge blind spot for me. :oops:

I'd have saved a lot of time if it included Mint in the list. Heck, I might have saved a lot of time if it just had "Ubuntu" in there. Personally I'd include as many distros as I could, maybe in a sub-heading if desired. The benefits seem to far outweigh the negatives in my mind. Your worry about complaints that it does not include X or Y distro seems odd to me. If the directions are already there, just add the distro to the heading as well? If it takes actual work to come up with directions because they don't exist yet, tell them the directions don't exist yet and you're happy for them to do the legwork like I had to before adding it to the list...

I curate a gigantic list and even include common misspellings in the sub-headings to aid in searching. I don't see the harm (as long as the actual advice pertains to that distro).

Of course, it is your call, and I'll stop mentioning it either way.

User avatar
andyprough
Astronaut
Astronaut
Posts: 700
Joined: 2020-05-31, 04:33

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by andyprough » 2022-12-05, 17:16

BenFenner wrote:
2022-12-05, 16:32
I had/have no idea that Ubuntu leads back to Debian. "Debian" is a huge blind spot for me.
Some blind spots it's probably better if you put in the time and the work to overcome them. They can be dangerous to just leave them "blind" forever.

If someone wants a distro that is similar to Mint but that auto-magically installs Pale Moon for them with no questions asked and no research required, that is what MX Linux is for.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by Moonchild » 2022-12-05, 19:38

For sake of clarity I updated the dev site to add Ubuntu and mentioning Mint as a derivative.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
Night Wing
Knows the dark side
Knows the dark side
Posts: 5151
Joined: 2011-10-03, 10:19
Location: Piney Woods of Southeast Texas, USA

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by Night Wing » 2022-12-05, 20:31

BenFenner wrote:
2022-12-05, 16:32

As someone with enough familiarity with Linux to be dangerous, but hugely lacking compared to my administrative ability in Windows... I knew enough that I wanted Linux Mint + MATE, and I knew it was an Ubuntu derivative. I had/have no idea that Ubuntu leads back to Debian. "Debian" is a huge blind spot for me. :oops:
Below is Debian's "family tree". Once you click on the link, you'll have to click on the illustration to enlarge it to see what offshoots are/came from Debian. If the enlargement is too big, you can scroll down the page and see all the distros which Debian is a grandfather to.

https://upload.wikimedia.org/wikipedia/ ... _11-06.png
Linux Mint 21.3 (Virginia) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
MX Linux 23.2 (Libretto) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox
Linux Debian 12.5 (Bookworm) Xfce w/ Linux Pale Moon, Linux Waterfox, Linux SeaLion, Linux Firefox

User avatar
stevenpusser
Project Contributor
Project Contributor
Posts: 903
Joined: 2015-08-01, 18:33

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by stevenpusser » 2022-12-05, 23:30

Standard Mint releases are based on Ubuntu LTS releases, such as 18.04, 20.04, and 22.04. They use the same Ubuntu kernel and use the Ubuntu repositories for most packages, so the Ubuntu Pale Moon packages for the corresponding Mint version is what is going to work. Debian packages might work, but why try when the Ubuntu ones are right there?

There is also a "LMDE" (Linux Mint Debian Edition) where you would use a corresponding Debian release. Mint includes inxi installed by default, which can provide a lot of info about your install.
Similarly, Steve I wonder if your site could use the same addition? I know back when I was trying to install on Mint for the first time it took me a good bit of research to figure out that your Debian build was the one that would work on my OS.
It's expected that users of Ubuntu or Debian derivatives know what mothership's packages are compatible with their distro. It's basically the first thing they need to know. There are many other derivatives in the same boat besides Mint...Though one could suggest that they also rebuild and package Pale Moon for value added to the Mint repos. They wouldn't even have to deal with the ARM headaches I've had since MX Linux added a Raspian-based version. (Raspian is almost exactly the same as armhf (Pi) Debian except they leave out a couple Qt5 packages from their repo for no good reason that I can find, though they can be installed perfectly from Debian. Otherwise my armhf qBittorrent builds won't install.)
wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.13.tar.gz
tar -zvxf autoconf-2.13.tar.gz
cd autoconf-2.13
./configure && make
sudo -i
make install
ln -s /usr/local/bin/autoconf /usr/local/bin/autoconf-2.13
^^^^^^^^^^^
Yeesh. Talk about reinventing the wheel! I sure hope your install isn't now farpotshket. (Yiddish word that has no English equivalent)
broken, because someone tried to fix it

This word doesn't just describe something that is broken, but something that is broken specifically because someone else tried to fix it, making it worse. It is used most commonly today to describe software engineering projects.
Mint includes a "system restore" utility called TimeShift that one should take advantage of.

About exporting the MOZCONFIG environment variable...that looks simpler than my present working code of overriding dh_auto_configure depending on the build CPU detected. Maybe if I get ambitious, I'll use sed instead to remove the line with "--enable-jxl" on the fly from mozconfig if an ARM processor is detected, since that was causing those builds to error out.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35474
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Building from source on Linux Mint 20.3 - Hit a snag.

Unread post by Moonchild » 2022-12-06, 02:18

Off-topic:
stevepusser wrote:
2022-12-05, 23:30
farpotshket
For those less familiar with Yiddish and not having enough Dutch or German language background to instinctively glean its meaning, a definition:
It means you completely ruin something by trying to fix a minor issue/inconsistency or visual blemish.

e.g. if you use a scrub brush to try and remove a stain from a pot and end up totally scratching the entire surface and making it ugly ;-P
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Locked