# How I fixed libxcb-aux.so.0 missing problem



## piggy (Jan 23, 2012)

Dumb and boring package management? Dirty trick! I fixed the xcb-util missing libxcb-aux.so.0 simply getting this file from another FreeBSD (clean install, upgrade old Unix way) machine and copy it to /usr/local/lib. FIXED! Nautilus and other packages requiring it works just fine. Now, when I have some spare time, I will try to hack the Dolphin problem too and I will forget to "upgrade" FreeBSD until 2013 come. I want my life back 

Refer to this post for details:


```
http://forums.freebsd.org/showthread.php?t=29072
```


----------



## jalla (Jan 23, 2012)

Or you could have made a few symlinks to keep things running while waiting for a proper upgrade to finish.
I used something like this.

```
lrwxr-xr-x  1 root  wheel      14 Jan 19 15:21 /usr/local/lib/libxcb-atom.so.1@ -> libxcb-util.so
lrwxr-xr-x  1 root  wheel      14 Jan 19 15:21 /usr/local/lib/libxcb-aux.so.0@ -> libxcb-util.so
lrwxr-xr-x  1 root  wheel      14 Jan 19 15:21 /usr/local/lib/libxcb-event.so.1@ -> libxcb-util.so
```


----------



## piggy (Jan 23, 2012)

jalla said:
			
		

> Or you could have made a few symlinks to keep things running while waiting for a proper upgrade to finish.
> I used something like this.
> 
> ```
> ...


Thanks Jalla! do you maybe have any idea about the Dolphin problem and the shutdown KDE problem I reported in the post linked in this thread too? Thanks in advance!

A quick dirty fix is enough! Then for now I'm out of ideas


----------



## SirDice (Jan 23, 2012)

Why don't you fix it properly by reinstalling x11/xcb-util?


----------



## piggy (Jan 23, 2012)

SirDice said:
			
		

> Why don't you fix it properly by reinstalling x11/xcb-util?


Becouse it is painful and it doesn't need 10 minutes and it works ok like I did.

PS: any idea about the KDE/Dolphin problems?


----------



## SirDice (Jan 23, 2012)

It might work now but you're going to get a whole lot more problems if you keep it this way.


----------



## piggy (Jan 23, 2012)

SirDice said:
			
		

> It might work now but you're going to get a whole lot more problems if you keep it this way.


Except for the base system and security holes, I wont "update" that box anymore in one year. If it works, just don't fix it. That is the first rule for me, especially - or better, only - with FreeBSD.

Now I need to just fix those two KDE problems and I'm done, also if obviously now the box is 99,50 per cent works like I want.


----------



## SirDice (Jan 23, 2012)

Next time you need to update something you're going to forget you did this. Then you're going to run into problems _again_.


----------



## jotawski (Jan 25, 2012)

SirDice said:
			
		

> Why don't you fix it properly by reinstalling x11/xcb-util?



that would not solve my problem neither, even on the day of /usr/ports/UPDATING for x11/xcb-util had been added.


----------



## SirDice (Jan 25, 2012)

You need to rebuild _all_ ports that depend on xcb-util.


----------



## piggy (Jan 25, 2012)

SirDice said:
			
		

> You need to rebuild _all_ ports that depend on xcb-util.


It means: from two days to one week depending on the number of packages installed on his system. No thankx.


----------



## jotawski (Jan 25, 2012)

SirDice said:
			
		

> You need to rebuild _all_ ports that depend on xcb-util.



yes, I did as suggested by /usr/ports/UPDATING but that did not solve the problem which is very strange indeed.


----------



## SirDice (Jan 25, 2012)

Which application or port is still causing problems?


----------



## jotawski (Jan 25, 2012)

SirDice said:
			
		

> Which application or port is still causing problems?



Many thanks for follow up, but I could not remember the name exactly.  It was one of either x11-wm/xfce4-wm or x11-wm/xfce4-utils

I used to suggest to do the manual [CMD=""]ln -s[/CMD] over http://forums.freebsd.org/showthread.php?t=28937


----------



## SirDice (Jan 25, 2012)

Those symlinks are probably causing problems. It's quite possible the ports that depend on it didn't rebuild correctly because of it.

Remove those symlinks and try to rebuild the port(s) that are causing problems.

I know symlinking libraries is sometimes suggested as a fix but it's really very bad advise and shouldn't be used.


----------



## jotawski (Jan 25, 2012)

SirDice said:
			
		

> Those symlinks are probably causing problems. It's quite possible the ports that depend on it didn't rebuild correctly because of it.
> 
> Remove those symlinks and try to rebuild the port(s) that are causing problems.
> 
> I know symlinking libraries is sometimes suggested as a fix but it's really very bad advise and shouldn't be used.



yes, that was a temporary fix.  Many thanks indeed for your times.


----------



## conrads (Jan 26, 2012)

*A proper fix for the missing libxcb-aux.so.0 problem*

After doing some research on the web, here's what I found to be a good solution to the problem of the missing libxcb-{atom,aux,event} files.

Basically, the problem is that these libraries no longer exist in xcb-util.  They've all been merged into the file libxcb-util.so.0 (part of the xcb-util package).

The first step in fixing this is to correct all of the *.la (libtool) files under /usr/local/lib which refer to any of these three libraries.  The following command will take care of this:


```
cd /usr/local/lib
for f in *.la
do
   sed -i '' -E -e 's/libxcb-(atom|aux|event)\.la/libxcb-util.la/g' $f
done
```
The next step is to determine which ports actually refer to these missing files.  The ports-mgmt/bsdadminscripts port contains a program called pkg_libchk which can do this.  Install the bsdadminscripts port if you haven't already, then run:

`pkg_libchk | tee pkg_libchk.out`

(the tee command will save the output to a file yet still allow you to see it as it's running)

When this is done, pkg_libchk.out will contain a listing of all of your installed ports which reference missing libraries.  We can clean up this output like so:


```
sed -i '' -e 's/:.*$//' pkg_libchk.out
sort -u -o pkg_libchk.out pkg_libchk.out
```
(the sed command deletes everything except the actual package names; the sort command will eliminate multiple references to the same package)

pkg_libchk.out should now contain a list of packages that depend on missing libraries.

Now, all that's left is to do a forced reinstall of the packages listed here.

[cmd=]portmaster `cat pkg_libchk.out`[/cmd]

You may run into some other packages along the way that cause these builds to fail.  If so, rebuild the problem packages first, then run the above command again.

This should leave you with no more packages depending on the missing libxcb-* libraries.

Happy port-fixing!  

Conrad Sabatier


----------



## jotawski (Jan 27, 2012)

Oh, that is very helpful.  At the time I did my portupgrade for those not in synchronization with ports tree, I had only hints form /usr/ports/UPDATING and a few complains about the same situation of mine.

And here are screen shot on Dec. 18 2011

```
[dell] ~> cat /root/xcb-util-error.scr 
xfce-utils-4.8.3/icons'
gmake[3]: Nothing to be done for `all-am'.
gmake[3]: Leaving directory `/kaitag/MANEE/usr/ports/sysutils/xfce4-utils/work/x
fce-utils-4.8.3/icons'
gmake[2]: Leaving directory `/kaitag/MANEE/usr/ports/sysutils/xfce4-utils/work/x
fce-utils-4.8.3/icons'
Making all in xfrun
gmake[2]: Entering directory `/kaitag/MANEE/usr/ports/sysutils/xfce4-utils/work/
xfce-utils-4.8.3/xfrun'
  CC     xfrun4-xfrun-dialog.o
  CC     xfrun4-xfrun-dbus.o
  CCLD   xfrun4
libtool: link: cannot find the library `/usr/local/lib/libxcb-aux.la' or unhandl
ed argument `/usr/local/lib/libxcb-aux.la'
gmake[2]: *** [xfrun4] Error 1
gmake[2]: Leaving directory `/kaitag/MANEE/usr/ports/sysutils/xfce4-utils/work/x
fce-utils-4.8.3/xfrun'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/kaitag/MANEE/usr/ports/sysutils/xfce4-utils/work/x
fce-utils-4.8.3'
gmake: *** [all] Error 2
*** Error code 1
 
Stop in /usr/ports/sysutils/xfce4-utils.
*** Error code 1
[dell] ~>
```

that was the result of [CMD=""]# portupgrade -x gcc -x chromium -pwerR xfce4-utils[/CMD] and I got it by scrolled up the screen to see the error and captured with[CMD=""]# vidcontrol -P < /dev/ttyv7 > ~/xcb-util-error.scr[/CMD]

Once again many thanks indeed for your times.


----------



## emha (Jan 30, 2012)

First of all: Thanks to conrads.

Based on your post I 'wrote' a little script to do all the steps or just put out some lists with missing libraries and the 'libless' ports.

emha


----------



## achix (Jan 30, 2012)

jotawski said:
			
		

> yes, I did as suggested by /usr/ports/UPDATING but that did not solve the problem which is very strange indeed.



Same here. Did the symlink and forgot about it. Until the next upgrade, new problems will show up anyway


----------



## wblock@ (Jan 30, 2012)

Like putting tape over an oil warning light, it will get your attention later.


----------



## achix (Jan 31, 2012)

wblock@ said:
			
		

> Like putting tape over an oil warning light, it will get your attention later.



Oil warning light would be the equivalent of lets say losing /dev/ad0. Death has come, he just hasn't knocked the door yet, and it's a matter of minutes before he does.

Now the libxcb-aux.so problem would be the equivalent of erasing a P420 fault caused by bad fuel (and bad fuel in the FreeBSD world is the absolute norm, in fact every user makes his own fuel, to the point that correct function is a matter of coincidence).

P.S. This libxcb-aux problem was simply too much for many people who use FreeBSD as a tool. Many of us could find/do/write many of the hacks in this page. Unfortunately when we have families to feed we cannot spend days until we figure out that it's not our fault that ports do not build, or that the /usr/ports/UPDATING advice fails miserably to solve the problem.


----------



## wblock@ (Jan 31, 2012)

It's okay to make an emergency repair.  The important thing is to not mistake a temporary emergency repair for a permanent repair.  Fix it for real as soon as possible.  When a temporary fix starts causing mysterious problems months later, after all memory of doing it is gone, that's when it starts taking serious amounts of time.


----------



## achix (Jan 31, 2012)

wblock@ said:
			
		

> It's okay to make an emergency repair.  The important thing is to not mistake a temporary emergency repair for a permanent repair.  Fix it for real as soon as possible.  When a temporary fix starts causing mysterious problems months later, after all memory of doing it is gone, that's when it starts taking serious amounts of time.



Experience says that this is the fastest way to go, because months later, most probably similar failures will arise (I haven't got one single problem-free upgrade of FreeBSD ports since 1997, I am talking workstation here not server). Sure, leaving garbage in the system definitely sucks, but spending our life just to get one single port compiled sucks even more.
If you think about it, those symlinks are harmless, and will be eventually irrelevant, unless someone decides to bring them back, in which case they will be overridden.


----------



## piggy (Jan 31, 2012)

achix said:
			
		

> Experience says that this is the fastest way to go, because months later, most probably similar failures will arise (I haven't got one single problem-free upgrade of FreeBSD ports since 1997, I am talking workstation here not server). Sure, leaving garbage in the system definitely sucks, but spending our life just to get one single port compiled sucks even more.
> If you think about it, those symlinks are harmless, and will be eventually irrelevant, unless someone decides to bring them back, in which case they will be overridden.


This is exactly the point! It happened the same for me too: even with a totally clean system (no packages installed, just a list of ports to build) Portmaster fails miserably to do things properly without human intervention to solve problems. This is just inacceptable and this is the reason becouse I say FreeBSD is still a the same 1994 level.

If they (FreeBSD Foundation) don't understand it, it is sure they loose very many customers. I personally been on and off from the project for years, and I still am. Also if I do appreciate FreeBSD base OS a lot for the reasons I explained in other posts.

It is evidently in this forum very many people just have nothing better to do than compile and recompile and to fix stupid package code. No pun intended, obviously, it is just the impression when you read some replys.


----------



## wblock@ (Jan 31, 2012)

achix said:
			
		

> Experience says that this is the fastest way to go, because months later, most probably similar failures will arise (I haven't got one single problem-free upgrade of FreeBSD ports since 1997, I am talking workstation here not server).



My experience over a similar time frame is that quick hacks to get things working mostly become permanent huge time wasters later.  Problems happen, but not routinely.  Maybe the time savers are working against you?



> If you think about it, those symlinks are harmless, and will be eventually irrelevant, unless someone decides to bring them back, in which case they will be overridden.



We've had examples here, even recently, that leftover fake library symlinks caused problems building new stuff.  If they were always harmless, they could be ignored.

To be specific about procedures, I'd run this to help detect fake libraries: http://www.wonkity.com/~wblock/fakelib/fastfakelib
After removing one of those fake libraries, then I'd run [pman=]pkg_libchk[/pman] from sysutils/bsdadminscripts to see which programs need that library, check /usr/ports/UPDATING for special instructions, and rebuild them.


----------



## achix (Feb 1, 2012)

cool, i'll have that in mind.


----------



## binyo66 (Mar 31, 2012)

I thought I have fixed this libxcb problems couple weeks back. Everything runs OK until I tried to install multimedia/cheese. The installation was fine, however when I run cheese in the terminal I got a message 

```
/libexec/ld-elf.so.1: Shared object "libxcb-aux.so.0" not found, required by "libgnome-desktop-2.so.17"
```
Does anyone know what I need to do with this problem (my last upgrade port was on March 13, 2012)?


----------



## SirDice (Apr 2, 2012)

It's an oldy but it might apply. The previous update probably didn't work correctly.

```
20120116:
  AFFECTS: users of x11/xcb-util
  AUTHOR: garga@FreeBSD.org

  x11/xcb-util was updated to 0.3.8 and was split in new modules.
  Dependencies were adjusted but main port symbols were moved to a single
  library, xcb-util.so.  For this reason, all dependent ports must be
  recompiled.If you use portmaster, run:

  # portmaster -R -r xcb-util-0

  Or for portupgrade:

  # portupgrade -r xcb-util-0\*
```
From /usr/ports/UPDATING.


----------



## binyo66 (Apr 2, 2012)

I did try that one. And that the one I used to fix my freebsd FreeBSD 8.2 release at home, and 9.0 release at office from libxcb problems. And it took three days. As far as I know, we can use that technique if we had installed the application before? And this application cheese was a fresh one in my 8.2. I was thinking more than updating the port again? However, I might try that one again in the week-end (and upgrading port again). If it still doesn't work, probably symbolic link


----------



## wblock@ (Apr 2, 2012)

See http://forums.freebsd.org/showpost.php?p=163415&postcount=17.


----------



## binyo66 (Apr 8, 2012)

I did try both what been suggested by wblock suggest and SirDice couple weeks back, and I decided to upgrade ports and reinstall all gnome. So the command I used [CMD=]portmaster -D -v gnome[/CMD] fixed the problem :e


----------



## jotawski (Apr 8, 2012)

Hi,

I have just solved this misery, libxcb-atom.so.1, libxcb-aux.so.0, libxcb-event.so.1 "not found", by installing misc/compat8x.

I use pkg_libchk just to see which packages use that one.  From the output on the screen, my instinct tell me to have a look at /usr/local/lib/compt/pkg and there they are, all sitting there.

Since I am using 9.0-release, simply installing misc/compat8x is enough.

Just for your information.


----------

