Category Archives: Gentoo

avahi-daemon chroot failed

Another annoying journal error:

avahi-daemon[301]: chroot.c: open() failed: No such file or directory
avahi-daemon[285]: Failed to open /etc/resolv.conf: Invalid argument

Copy avahi-daemon.service from /lib/systemd/system to /etc/systemd/system. Edit /etc/systemd/system/avahi-daemon.service and add the “After=systemd-resolved.service” line like below and restart. This should result in no error:

avahi-daemon[364]: Successfully called chroot().
avahi-daemon[364]: Successfully dropped remaining capabilities.


# This file is part of avahi.
#
# avahi is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# avahi is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with avahi; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA.

[Unit]
Description=Avahi mDNS/DNS-SD Stack
After=systemd-resolved.service
Requires=avahi-daemon.socket

[Service]
Type=dbus
BusName=org.freedesktop.Avahi
ExecStart=/usr/sbin/avahi-daemon -s
ExecReload=/usr/sbin/avahi-daemon -r
NotifyAccess=main

[Install]
WantedBy=multi-user.target
Also=avahi-daemon.socket
Alias=dbus-org.freedesktop.Avahi.service

gjs spamming the journal with stack traces

Another long time annoyance is the endless number of stack traces gjs inserts to the journal. As best as I can figure, based on reading, someone thought this was a good idea to find legacy js scripts or some such stuff. This is and example of the log entries that keep being inserted:

gnome-shell[1981]: Object St.BoxLayout (0x5603b05ffc50), has been already finalized. Impossible to get any property from it.
org.gnome.Shell.desktop[1981]: == Stack trace for context 0x5603ab329170 ==
org.gnome.Shell.desktop[1981]: #0 0x7ffd99df2850 b resource:///org/gnome/shell/ui/tweener.js:73 (0x7f0d5c1ddef0 @ 9)
org.gnome.Shell.desktop[1981]: #1 0x7ffd99df28f0 b resource:///org/gnome/shell/ui/tweener.js:105 (0x7f0d5c1df230 @ 36)
org.gnome.Shell.desktop[1981]: #2 0x7ffd99df2990 b resource:///org/gnome/shell/ui/tweener.js:92 (0x7f0d5c1df098 @ 52)
org.gnome.Shell.desktop[1981]: #3 0x7ffd99df3560 I resource:///org/gnome/gjs/modules/tweener/tweener.js:203 (0x7f0d5c1e9cd0 @ 54)
org.gnome.Shell.desktop[1981]: #4 0x7ffd99df36b0 b resource:///org/gnome/gjs/modules/tweener/tweener.js:332 (0x7f0d5c1e9d58 @ 1626)
org.gnome.Shell.desktop[1981]: #5 0x7ffd99df3760 b resource:///org/gnome/gjs/modules/tweener/tweener.js:345 (0x7f0d5c1e9de0 @ 100)
org.gnome.Shell.desktop[1981]: #6 0x7ffd99df37f0 b resource:///org/gnome/gjs/modules/tweener/tweener.js:360 (0x7f0d5c1e9e68 @ 10)
org.gnome.Shell.desktop[1981]: #7 0x7ffd99df3870 I resource:///org/gnome/gjs/modules/signals.js:126 (0x7f0d5c1e2b38 @ 386)
org.gnome.Shell.desktop[1981]: #8 0x7ffd99df3920 b resource:///org/gnome/shell/ui/tweener.js:208 (0x7f0d5c1df808 @ 159)
org.gnome.Shell.desktop[1981]: #9 0x7ffd99df3980 I resource:///org/gnome/gjs/modules/_legacy.js:82 (0x7f0d5c1c2bc0 @ 71)
org.gnome.Shell.desktop[1981]: #10 0x7ffd99df3980 I resource:///org/gnome/shell/ui/tweener.js:183 (0x7f0d5c1df780 @ 20)
org.gnome.Shell.desktop[1981]: #11 0x7ffd99df3a10 I self-hosted:917 (0x7f0d5c1ee5e8 @ 394)
org.gnome.Shell.desktop[1981]: == Stack trace for context 0x5603ab329170 ==
org.gnome.Shell.desktop[1981]: #0 0x7ffd99df2850 b resource:///org/gnome/shell/ui/tweener.js:80 (0x7f0d5c1ddef0 @ 82)
org.gnome.Shell.desktop[1981]: #1 0x7ffd99df28f0 b resource:///org/gnome/shell/ui/tweener.js:105 (0x7f0d5c1df230 @ 36)
org.gnome.Shell.desktop[1981]: #2 0x7ffd99df2990 b resource:///org/gnome/shell/ui/tweener.js:92 (0x7f0d5c1df098 @ 52)
org.gnome.Shell.desktop[1981]: #3 0x7ffd99df3560 I resource:///org/gnome/gjs/modules/tweener/tweener.js:203 (0x7f0d5c1e9cd0 @ 54)
org.gnome.Shell.desktop[1981]: #4 0x7ffd99df36b0 b resource:///org/gnome/gjs/modules/tweener/tweener.js:332 (0x7f0d5c1e9d58 @ 1626)
org.gnome.Shell.desktop[1981]: #5 0x7ffd99df3760 b resource:///org/gnome/gjs/modules/tweener/tweener.js:345 (0x7f0d5c1e9de0 @ 100)
org.gnome.Shell.desktop[1981]: #6 0x7ffd99df37f0 b resource:///org/gnome/gjs/modules/tweener/tweener.js:360 (0x7f0d5c1e9e68 @ 10)
org.gnome.Shell.desktop[1981]: #7 0x7ffd99df3870 I resource:///org/gnome/gjs/modules/signals.js:126 (0x7f0d5c1e2b38 @ 386)

I found a Redhat patch to address this mess: https://bugzilla.redhat.com/attachment.cgi?id=1433199

Personally, I just want a clean log. I just comment out g_critical( … up to and including gjs_dumpstack(); and six in all for the 1.50.4 version.

So:
1. ebuild gjs-1.50.4.ebuild configure
2. Comment out the blocks of code.
3. ebuild gjs-1.50.4.ebuild compile — look for errors
4. ebuild gjs-1.50.4.ebuild install
5. ebuild gjs-1.50.4.ebuild qmerge

I do save the tree under image to a safe spot so I do not have to go through this again. If you need to see the errors just do a regular emerge of gjs. After you are done copy back the lib files to quiet everything down again.

*** As a note, when I do “emerge @changed-deps”, portage wants to replace gjs. I do “emerge -v –exclude gjs @changed-deps” to keep this from happening ***

Virtual Box 5.0 in Portage!

I guess just in time for Windows 10???

vb5

emerge –unmerge -p virtualbox

Same old catch if you want the BIOS compiled then Open Watcom is needed.  To be specific, I have had to use Open Watcom 1.9.  The emerge output if OW is not found:

>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/virtualbox-5.0.0/work/VirtualBox-5.0.0 …
Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for gcc: found version 4.8.4, OK.
Checking for Open Watcom:
** Open Watcom was not found!
Checking for iasl: found version 20130117, OK.
Checking for xslt: found, OK.

After installing Open Watcom and “export WATCOM=/usr//bin/watcom19”, running emerge should result in:

>>> Source prepared.
>>> Configuring source in /var/tmp/portage/app-emulation/virtualbox-5.0.0/work/VirtualBox-5.0.0 …
Checking for environment: Determined build machine: linux.amd64, target machine: linux.amd64, OK.
Checking for kBuild: found, OK.
Checking for gcc: found version 4.8.4, OK.
Checking for Open Watcom: found version 1.9, OK.
Checking for iasl: found version 20130117, OK.
Checking for xslt: found, OK.

Also had to “emerge -v virtualbox-extpack-oracle app-emulation/virtualbox-additions” separately.

 

Gnome 3.16

Classes are finally out for summer and it is time for catch up.  Still, I had time to cause undue stress in my life.  I decided to do what I had promised myself I would not do again, install a new version of Gnome before it was stable in portage.  Anyway, the upgrade to Gnome 3.16 was not without pains along the way, but it is done.

gnome3_16

The Dreaded Gentoo emerge -e @world

Not something I take lightly, nor is it something I look forward to doing.  In Gentoo the emerge “-e” means rebuild all packages installed on the system that portage has recorded.  A quick ‘equery -l “*”‘ will list all packages installed.

So why do I do this every year or so?  Just to make sure I have not messed something up over time.  It is not something I look forward to because the time from start to finish is measured not in hours, but days.  For example, it took my i7 laptop (1,400+) packages with SSDs and plenty of ram 24+ hours to finish.  However, in the end I was confident the system was in good shape.

So here are my tips at making this painful experience a little less painful.

1.  I start by getting the system in the best shape possible:

emerge -v –update –deep –newuse –with-bdeps=y –autounmask-write @world

If needed:

emerge @preserved-rebuild

then:

emerge –depclean

If you are paranoid careful then do:

python-updater

perl-cleaner –all

2. Next:  cd /var/log/portage/elog

You should find the file summary.log.  Rename it or delete it, whatever suites you.  Once the big emerge starts, all the messages will be logged to a new summary.log file.

2. Execute:   emerge -pve –keep-going @world

Note the “p” for pretend.  If everything is good then it should tell you that the Oracle Java packages need to be downloaded.  This is a good time to download them (I have Jre and jdk packages installed), move them to portage/distfiles, and do not forget:

chown portage:portage <file> 

to the files.  Make a mental note of the total number of packages to build.

3. Start by executing:  emerge -ve –keep-going @world

Why the keep-going? Because if everything is good after step 1 then any issues should be minor and this keeps from having to start the process from the beginning.

Now all there is to do is wait and hope for the best which usually does not help.  As the emerge progresses with each new package the typical package number X of Y (total) being processed.  So if you start with a total of 1,400 packages and later notice emerge outputting 20 of 800 then there has been a problem which has been skipped (note:  the –keep-going option).  Go check the summary.log file to find what the problem might have been.  The best part is that you should be able to fix it while the emerge -e keeps churning along.

Enjoy!

 

Gnome OCR and Other Stuff

I was looking for an OCR app to use with Gnome/Gentoo and decided to give OCRFeeder a try.  It is available in the an overlay which makes it easier to keep up with for updates.  It is found in the anyc overlay.

layman -a anyc  then  emerge ocrfeeder (have to unmask)

WTF!!! A lot of rebuilds and new packages … that means probable trouble.  Yep, mplayer2 will not compile.  One of the updates was for ffmpeg and that had me worried that I had run into my first libav–ffmpeg blowup because I use ffmpeg rather than the mandated libav.

So, I unmask mplayer2-2.0_p20131009-r1 and still get the error:

libmpdemux/aviheader.c: In function ‘read_avi_header’:
libmpdemux/aviheader.c:600:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&magic, 6, 1, fp);
^
libmpdemux/aviheader.c:605:8: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(&priv->idx_size, sizeof(priv->idx_size), 1, fp);
^
libmpdemux/aviheader.c:616:10: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]
fread(idx, sizeof(AVIINDEXENTRY), 1, fp);
^
libmpdemux/demuxer.c:48:2: error: #error MP_INPUT_BUFFER_PADDING_SIZE is too small!
#error MP_INPUT_BUFFER_PADDING_SIZE is too small!
^
Makefile:536: recipe for target ‘libmpdemux/demuxer.o’ failed

Well, I try emerge @preserve-rebuild without mplayer2 and now I get this for /vlc-2.1.2:

checking for AVCODEC… yes
configure: error: libavcodec versions 56 and later are not supported yet.

Yep, vlc is giving me issues.  Now I am on the slippery slide of getting off the Gentoo path, so I up the stakes, I unmask media-video/vlc-2.1.5-r1 and try again.  You might ask why jump up to 2.15-r1 and I would reply that if I am going to blow things up badly then I might as well go big.

Great, now k3b errors on compile!  Unmask k3b-2.0.3-r1 and emerge without problems.  Okay, so where am I now?  Yep, back to this mplayer2 issue:

libmpdemux/demuxer.c:48:2: error: #error MP_INPUT_BUFFER_PADDING_SIZE is too small!
#error MP_INPUT_BUFFER_PADDING_SIZE is too small!

I don’t feel like going to battle for mplayer because I only use vlc or others, so a quick:

equery d mplayer2

results in:

  * These packages depend on mplayer2:
media-video/smplayer-14.9.0-r1 (media-video/mplayer2[libass,png,X])

So:

emerge –unmerge mplayer2 smplayer 

Now what was I doing?  Yep, OCRFeeder install.  Well, that went okay finally, but OCR engines have to be installed.  I installed gocr, ocrad, cuneiform, and tesseract.  OCRFeeder lets the user select the engine.

Another day in Gentoo world ….

 

Tracker Thrashing at Gnome Boot

Use Gnome?  What is Tracker?  Well, here is the official description:

Tracker is a search engine, search tool and metadata storage system.

It allows you to find the proverbial needle in your computer’s haystack as well as providing a one stop solution to the organisation, storage and categorisation of your data.

Source:  Tracker Wiki

I would add that Tracker kills my system at boot.  Maybe not kill, but brings it to a crawl.  I have thought about disabling it, but sometimes I like the Gnome desktop search.  My fix for the boot issue:

/etc/xdg/autostart
 
littleturd autostart # ls -l tracker*
-rw-r--r-- 1 root root 524 Dec 30 21:33 tracker-extract.desktop
-rw-r--r-- 1 root root 532 Dec 30 21:43 tracker-miner-fs.desktop
-rw-r--r-- 1 root root 597 Dec 30 21:44 tracker-store.desktop

Now change the following in each of the above files:

X-GNOME-Autostart-enabled=false

Of course, resetting things helped too.

/etc/xdg/autostart
tracker-control -r   :Kill all Tracker processes and remove all databases
tracker-control -s   :Starts miners (which indirectly starts tracker-store too)

Last, don’t be dumb like me who mounts his NAS in his home directory, know what directories tracker is set to scan!