Page 1 of 1

[feature request] --no-libcanberra

Posted: 2017-03-07, 12:35
by [DC-1]
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.

Re: [feature request] --no-libcanberra

Posted: 2017-03-07, 13:40
by Moonchild
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?

Re: [feature request] --no-libcanberra

Posted: 2017-03-07, 17:29
by [DC-1]
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)

Re: [feature request] --no-libcanberra

Posted: 2017-03-07, 18:19
by Moonchild
:lol: Um.. the lib is, what.. 10KB, if that? I doubt you're going to save much by not loading it...

Re: [feature request] --no-libcanberra

Posted: 2017-03-08, 02:39
by stevenpusser
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?

Re: [feature request] --no-libcanberra

Posted: 2017-03-08, 02:44
by Moonchild
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

Re: [feature request] --no-libcanberra

Posted: 2017-03-13, 04:41
by [DC-1]
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.

Re: [feature request] --no-libcanberra

Posted: 2017-03-13, 11:05
by Walter Dnes
[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