# Apps won't run after 8.2 upgrade



## SeaHag (Jul 16, 2011)

Well here we go again. Same thing like every upgrade and yes I followed /usr/ports/UPGRADING and yes I read the handbook. Now when I try to run programs I get:


```
/libexec/ld-elf.so.1: Shared object "libpng.so.5" not found, required by <insert your favorite program here>
```

About the only thing that runs is firefox and xterm. I did:


```
freebsd-update upgrade -r 8.2-RELEASE

freebsd-update install

shutdown -r now

freebsd-update install

portupgrade -a

freebsd-update install

shutdown -r now
```

I've done pkgdb -Ff and portupgrade many times and tried installing ports individually but nothing succeeds. Whenever I try to install a port it fails for one reason or another like:


```
/ports/devel/kdesdk4
make install clean

probe-hiddev.c: In function 'main':
probe-hiddev.c:81: error: 'USB_GET_REPORT_ID' undeclared (first use in
this function)
probe-hiddev.c:81: error: (Each undeclared identifier is reported only
once
probe-hiddev.c:81: error: for each function it appears in.)
gmake[5]: *** [probe-hiddev.o] Error 1
gmake[5]: Leaving directory
`/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebsd/probing'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory
`/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebsd'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory


/usr/ports/sysutils/hal
make install clean

probe-hiddev.c: In function 'main':
probe-hiddev.c:81: error: 'USB_GET_REPORT_ID' undeclared (first use in
this function)
probe-hiddev.c:81: error: (Each undeclared identifier is reported only
once
probe-hiddev.c:81: error: for each function it appears in.)
gmake[5]: *** [probe-hiddev.o] Error 1
gmake[5]: Leaving directory
`/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebsd/probing'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory
`/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebsd'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory
`/usr/ports/sysutils/hal/work/hal-0.5.14/hald'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory
```

I've been struggling with this system for four days. How can I recover from this mess?


----------



## jb_fvwm2 (Jul 16, 2011)

Those specific errors are unusual. Ignoring them specifically...maybe the following would be a little helpful.

You probably need to rebuild /usr/ports/graphics/png for starters. Intermediate-number of dependencies (hal) may need a build or run dependency updated.  the kdesdk4 is a qt4 port, more problematic. Sometimes one can do hacking as... 
	
	



```
cp -iv /usr/local/lib/libpng.so.6 /usr/local/lib/compat/libpng.so.5
```
 and programs would work again, but break later; one should shortly after rebuilds remove the duplicate "fake" file. I should not write more for several reasons:
1... I hesitate to use freebsd-update due to legacy customization/scripts throughout the ports tree 
2... I deinstalled qt4 ports due to enough downtime already with gnome upgrades
3... favorite method of upgrade is currently:

```
portmaster -d -B -i /var/db/pkg/port- /var/db/pkg/port-  && yell
```
, often at the
end of a pipe enclosed in xargs, sometimes monitored in another tty by /ttyload/ if /yell/ is 
not working or convenient. 
Sorry to not really answer the questions directly. BTW I postpone each major UPDATING upgrade until
I figure out a way that does no wholesale upgrades unless just a few ports are affected, (more 
local paperwork involved, but gaining experience in scripting.)


----------



## SeaHag (Jul 16, 2011)

"You probably need to rebuild /usr/ports/graphics/png for starters. "

Yes, I reran portupgrade -fr graphics/png according to /usr/ports/UPDATING 20100328. That didn't help anything so I rebooted, now X won't start with this error:


```
/libexec/ld-elf.so.1: Shared object "libhal.so.1" not found, required by "X" giving up.
```

I ran portupgrade -rf /sysutils/hal but it failed with errors like above. Nothing will install without error.

BTW Iv'e been told not to mix portupgrade with portmaster, so since I've used portupgrade, portmaster is a tool I can never use because I don't want even more problems.


When I try to install or upgrade sysutils/hal it fails:


```
.
.
gmake[5]: Entering directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebsd/probing'
cc -DHAVE_CONFIG_H -I. -I../../..  -DPACKAGE_SYSCONF_DIR=\""/usr/local/etc"\" -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -DPACKAGE_BIN_DIR=\""/usr/local/bin"\" -DPACKAGE_LOCALE_DIR=\""/usr/local/share/locale"\" -DPACKAGE_LOCALSTATEDIR=\""/var"\" -I../../.. -I/usr/local/include/dbus-1.0 -I/usr/local/include/dbus-1.0/include   -I/usr/local/include  -O2 -pipe -fno-strict-aliasing -Wall -Wchar-subscripts -Wmissing-declarations -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -MT probe-hiddev.o -MD -MP -MF .deps/probe-hiddev.Tpo -c -o probe-hiddev.o probe-hiddev.c
gmake[5]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebsd/probing'
gmake[4]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald/freebsd'
gmake[3]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'
gmake[2]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14/hald'
gmake[1]: Leaving directory `/usr/ports/sysutils/hal/work/hal-0.5.14'
*** Error code 1

Stop in /usr/ports/sysutils/hal.
*** Error code 1

Stop in /usr/ports/sysutils/hal.
*** Error code 1

Stop in /usr/ports/x11/kdelibs4.
*** Error code 1

Stop in /usr/ports/x11/kdebase4.
```

pkg_info | grep libusb    shows nothing. How can I get sysutils/hal to install?


----------



## wblock@ (Jul 16, 2011)

What version did you have before the upgrade?  Upgrading from FreeBSD 7 to 8 requires rebuilding all ports.  Although it's usually quicker to delete all ports and build them than upgrade them in place.

portupgrade works, portmaster also works, and I've had no problems mixing them.  Mostly now I use portmaster.  There's a procedure at the end of the portmaster man page for rebuilding all ports.


----------



## SeaHag (Jul 16, 2011)

I upgraded from 7.2 to 8.2. And I did rebuild all ports, isn't that what portupgrade -a does? You're told to upgrade all ports but not told how. 

So now I ran portmaster /usr/ports/sysutils/hal and it says it depends on /usr/ports/devel/libusb so I portmaster /usr/ports/devel/libusb and it says The port is marked IGNORE has been already include into the base system.

Now what? I'm not getting anywhere?


----------



## wblock@ (Jul 16, 2011)

SeaHag said:
			
		

> I upgraded from 7.2 to 8.2. And I did rebuild all ports, isn't that what portupgrade -a does?



Nope.  -a means "upgrade any port that isn't at the latest version".  -af will try to force-rebuild all ports.



> You're told to upgrade all ports but not told how.



That procedure I mentioned earlier at the end of the portmaster man page shows how.

Also, the first search result for "FreeBSD rebuild all ports" is a link to the Handbook ports section.  Search for "rebuild all ports" in there and it shows how with portmaster (which is the same as with portupgrade).


----------



## SeaHag (Jul 16, 2011)

So upgrading a port means rebuilding a port? The terminology is so confusing, update, upgrade, rebuild, does any of this mean install? Or do these just put the latest makefiles into the ports tree directories? then do I have to "install" all the ports?

From handbook:

```
All the installed ports can be upgraded using this simple command:

# portmaster -a
```

then:

```
If you encounter errors during the upgrade process, you can use the -f option to upgrade/rebuild all ports:

# portmaster -af
```

Upgrade/rebuild all ports? It doesn't say all "installed" ports like the previous sentence. Does this mean it's going to install every application in the ports tree to my system? I don't think so. And what does upgrade/rebuild mean? Does that mean it will upgrade and then rebuild the port or does "upgrade/rebuild" mean that "upgrade" and "rebuild" are synonymous and mean the same thing? See the handbook isn't always clear. That's why we ask in this forum, so you can discuss with someone. You can't discuss with the handbook and ask it what it means?


----------



## wblock@ (Jul 16, 2011)

SeaHag said:
			
		

> So upgrading a port means rebuilding a port?



Install: compile, install (versions are unimportant, there isn't one installed yet)

Rebuild: compile, deinstall existing version, install new

An upgrade is the same process as a rebuild, but where the version in the port directory is newer than what is installed.  For example, where firefox-4 is installed but the port directory has been updated to firefox-5.

The confusion stems from calling two things "ports":

1. The ports tree (/usr/ports/ directory) with all the Makefiles and attendant information  ("The Firefox port is at /usr/ports/www/firefox.")

2. The applications installed from the ports tree.  ("My installed ports are really outdated.")



> Upgrade/rebuild all ports? It doesn't say all "installed" ports like the previous sentence. Does this mean it's going to install every application in the ports tree to my system?



No, it's using "ports" as in #2 above.


----------



## SeaHag (Jul 17, 2011)

*Looking better*

I ran portmaster -af and it got pretty far but go an error on java so I ran 

```
portmaster /usr/ports/java/eclipse
```

because that was one of the apps that was failing for me before and I knew it depended on java so I thought I'd give it a try and it did install java and itself and now runs without error. I think everythings ok now. I'm going to install the rest of my "apps" now through ports.  Thanks a lot for the help.


----------

