# Unabled to Build Ruby After Update to 8.1



## Sephiroth (Aug 3, 2010)

I just managed to update to FreeBSD 8.1 via a combination of freebsd-update and build/installworld. On my core machine, everything is great. However, it hosts a number of jails, configured as per the handbook (http://www.freebsd.org/doc/handbook/jails-application.html), and updating them has been... well, not good. I ran every step in the handbook's upgrade process, no real problems. Then, on the core machine, I did a portsnap fetch update on the Ports directory that is shared for the jails (after portupgrade failed... I fought and won that battle). Each of the jails was totally, totally broken after the update- I had to install the misc/compat7x port to get any work done at all- even portupgrade would not run.

So, now I'm trying to get through a portupgrade -af to get everything up to par with the new system, and portupgrade basically broke itself. It updated something, and now it won't run, failing with this error: 
	
	



```
/libexec/ld-elf.so.1: /usr/local/lib/compat/pkg/libcrypt.so.4: unsupported file layout
```

I've been trying to figure out what is up with that, so I've been trying to build all the prereqs for portupgrade, first of which is lang/ruby18: it will not make at all, failing with this:

```
/bin/mv /s/portbuild/usr/ports/lang/ruby18/work/ruby-1.8.7-p248/ext/tk /s/portbuild/usr/ports/lang/ruby18/work/
===>   ruby-1.8.7.248_2,1 depends on file: /usr/local/bin/automake-1.10 - found
===>   ruby-1.8.7.248_2,1 depends on file: /usr/local/bin/autoconf-2.62 - found
===>  Configuring for ruby-1.8.7.248_2,1
/usr/bin/touch /s/portbuild/usr/ports/lang/ruby18/work/ruby-1.8.7-p248/configure
env: /usr/local/bin/aclocal-1.10: No such file or directory
*** Error code 127

Stop in /usr/ports/lang/ruby18.
*** Error code 1

Stop in /usr/ports/lang/ruby18.
```

I don't really know where to go from here. aclocal-1.10 exists; something inside that script is not working. I already reinstalled autoconf and automake, can't remember why but poking seems to suggest that might work... no luck. Any suggestions on what to do next?


----------



## Sephiroth (Aug 3, 2010)

So, what I ended up doing here is building the package on my host machine, and moving the tarball into the jail's ports directory, and installing from there. That makes portupgrade work again. Still having some major issues with this upgrade... turned into a 3 day ordeal and still going.


----------



## SirDice (Aug 3, 2010)

Sephiroth said:
			
		

> So, what I ended up doing here is building the package on my host machine, and moving the tarball into the jail's ports directory, and installing from there.


No need to move anything 

`# mount -t nullfs /usr/ports/packages /jails/j1/usr/ports/packages`

No need to have multiple copies of the ports tree either..

`# mount -t nullfs /usr/ports/ /jails/j1/usr/ports/`
`# mount -t nullfs /usr/ports/ /jails/j2/usr/ports/`
etc. etc.

You can also get that done automatically when a jail starts if you add for example:

```
jail_somename_mount_enable="YES"
```
Then create a /etc/fstab.somename with:

```
/usr/ports/      /jails/j1/usr/ports/    nullfs    ro   0  0
```

Then that filesystem will get mounted when the jail starts and unmounted when you stop it.


----------



## Sephiroth (Aug 4, 2010)

I thought that it was kind of odd to have a seperate copy of the ports tree just for the jails, but that's how the handbook said to do it. I was thinking of doing just what you said; using a nullfs mount of the main ports tree for the jails, but I thought there must be a reason that it wasn't done originally. Thanks for the insight. I think my now 4-day struggle with getting this server updated is nearing the end; I'm getting pretty good and rooting out broken ports!


----------

