[feature request] --no-libcanberra

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!
[DC-1]

[feature request] --no-libcanberra

Unread post by [DC-1] » 2017-03-07, 12:35

I've found that libcanberra.so.0 is hardcoded in widget/gtk/nsSound.cpp:

Code: Select all

    if (!libcanberra) {
        libcanberra = PR_LoadLibrary("libcanberra.so.0");
        if (libcanberra) {
Could you make a compile or runtime option for disable this? I don't want libcanberra at all.

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

Re: [feature request] --no-libcanberra

Unread post by Moonchild » 2017-03-07, 13:40

It will attempt to load it at runtime, but won't use it if not found. So it's a "use it if present" kind of deal. Why do you want to prevent even the attempt at using it?
"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

[DC-1]

Re: [feature request] --no-libcanberra

Unread post by [DC-1] » 2017-03-07, 17:29

I don't wanna waste resources, e.g. file descriptors, memory, hdd. I'm building a very low resources machine, every megabyte worth.
I'm using my own compiled version for months, it's just a question if there is a chance to save time for me with not patching before every compiling.
Deleting libcanberra.so.0 is not an option, because i use sw when it has a useful function. (claws-mail)

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

Re: [feature request] --no-libcanberra

Unread post by Moonchild » 2017-03-07, 18:19

:lol: Um.. the lib is, what.. 10KB, if that? I doubt you're going to save much by not loading it...
"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
stevenpusser
Project Contributor
Project Contributor
Posts: 903
Joined: 2015-08-01, 18:33

Re: [feature request] --no-libcanberra

Unread post by stevenpusser » 2017-03-08, 02:39

If you're compiling Pale Moon for yourself, what's to keep you from commenting out or deleting the offending code and testing the build?

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

Re: [feature request] --no-libcanberra

Unread post by Moonchild » 2017-03-08, 02:44

stevepusser wrote:If you're compiling Pale Moon for yourself, what's to keep you from commenting out or deleting the offending code and testing the build?
it's just a question if there is a chance to save time for me with not patching before every compiling
"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

[DC-1]

Re: [feature request] --no-libcanberra

Unread post by [DC-1] » 2017-03-13, 04:41

Moonchild wrote::lol: Um.. the lib is, what.. 10KB, if that? I doubt you're going to save much by not loading it...
70k + ~200k with vorbis libraries.

Code: Select all

$ lddtree  /usr/lib/i386-linux-gnu/libcanberra.so
/usr/lib/i386-linux-gnu/libcanberra.so (75,796) (interpreter => none)
    libvorbisfile.so.3 => /usr/lib/i386-linux-gnu/libvorbisfile.so.3 (38,492)
        libvorbis.so.0 => /usr/lib/i386-linux-gnu/libvorbis.so.0 (173,800)
By the way --disable-xinerama option exists, which library is really 10kb. (9,668)
Ok, forget it, i can live with patching.

Walter Dnes
Astronaut
Astronaut
Posts: 650
Joined: 2015-07-30, 20:29
Location: Vaughan, ON, Canada

Re: [feature request] --no-libcanberra

Unread post by Walter Dnes » 2017-03-13, 11:05

[DC-1] wrote:By the way --disable-xinerama option exists, which library is really 10kb. (9,668)
Ok, forget it, i can live with patching.
Speaking of options, you can do 2 levels of searching for them. First are the documented options. On my system "pmsrc" is the source directory. This script cycles through all the "configure" files, and executes each one with the "--help" option. Look for "Optional Features:" sections for the "goodies"...

Code: Select all

#!/bin/bash
rm -rf pmoptions.txt
for configfile in `find pmsrc -name configure`
do
   echo "=====================================" >> pmoptions.txt
   echo "From file ${configfile}" >> pmoptions.txt
   echo >> pmoptions.txt
   ${configfile} --help >> pmoptions.txt
done
To get a listing of every last possible option (Look Ma, no documentation!) I run...

Code: Select all

grep -rn -- "--enable\|--disable\|--with" pmsrc/ > options.txt
which generates a lot of output. I disable the following items on the personal builds I run at home. Some of these items are probably redundant. I wish there was a master listing somewhere of the defaults

Code: Select all

ac_add_options --disable-accessibility
ac_add_options --disable-b2g
ac_add_options --disable-dbus
ac_add_options --disable-debug
ac_add_options --disable-gamepad
ac_add_options --disable-gconf
ac_add_options --disable-gio
ac_add_options --disable-gstreamer
ac_add_options --disable-harfbuzz
ac_add_options --disable-installer
ac_add_options --disable-necko-wifi
ac_add_options --disable-official-branding
ac_add_options --disable-omx-plugin
ac_add_options --disable-parental-controls
ac_add_options --disable-profiling
ac_add_options --disable-pulseaudio
ac_add_options --disable-safe-browsing
ac_add_options --disable-telemetry
ac_add_options --disable-updater
ac_add_options --disable-url-classifier
ac_add_options --disable-webspeech
And stuff that I explicitly enable...

Code: Select all

ac_add_options --enable-alsa
ac_add_options --enable-application=browser
ac_add_options --enable-boehm
ac_add_options --enable-eme
ac_add_options --enable-ffmpeg
ac_add_options --enable-fmp4
ac_add_options --enable-freetype
ac_add_options --enable-gnu-ld
ac_add_options --enable-gold
ac_add_options --enable-install-strip
ac_add_options --enable-jemalloc
ac_add_options --enable-jemalloc-lib
ac_add_options --enable-libjpeg-turbo
ac_add_options --enable-multithread
ac_add_options --enable-ogg
ac_add_options --enable-optimize
ac_add_options --enable-opus
ac_add_options --enable-png
ac_add_options --enable-pthreads
ac_add_options --enable-raw
ac_add_options --enable-stdcxx-compat
ac_add_options --enable-strip
ac_add_options --enable-svg
ac_add_options --enable-threads
ac_add_options --enable-threadsafe
ac_add_options --enable-wave
ac_add_options --enable-webgl
ac_add_options --enable-webm
ac_add_options --enable-x86-optimizations
ac_add_options --enable-xlib
ac_add_options --x-libraries=/usr/lib
There's a right way
There's a wrong way
And then there's my way

Locked