# lighttpd-1.4.35 does not emerge on raspberry (solved)

## lindegur

On my full blown PC  lighttpd-1.4.35 emerges well. On my minimalistic raspberry pi, lighttpd-1.4.35 failed after a recent system update with

```
configure: error: bzip2-headers and/or libs where not found, install them or build with --without-bzip2

!!! Please attach the following file when seeking support:

!!! /var/tmp/portage/www-servers/lighttpd-1.4.35/work/lighttpd-1.4.35/config.log

 * ERROR: www-servers/lighttpd-1.4.35::gentoo failed (configure phase):

 *   econf failed

 * 

 * Call stack:

 *          ebuild.sh, line   93:  Called src_configure

 *        environment, line 3905:  Called econf '--libdir=/usr/lib/lighttpd' '--enable-lfs' '--enable-ipv6' '--disable-mmap' '--with-bzip2' '--without-fam' '--with-gdbm' '--without-kerberos5' '--without-ldap' '--without-libev' '--without-lua' '--without-memcache' '--without-mysql' '--with-pcre' '--with-openssl' '--without-webdav-props' '--without-webdav-locks' '--without-attr' '--with-zlib'

 *   phase-helpers.sh, line  584:  Called die

 * The specific snippet of code:

 *            die "econf failed"

 * 

 * If you need support, post the output of `emerge --info '=www-servers/lighttpd-1.4.35::gentoo'`,

 * the complete build log and the output of `emerge -pqv '=www-servers/lighttpd-1.4.35::gentoo'`.

 * The complete build log is located at '/var/tmp/portage/www-servers/lighttpd-1.4.35/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/www-servers/lighttpd-1.4.35/temp/environment'.

 * Working directory: '/var/tmp/portage/www-servers/lighttpd-1.4.35/work/lighttpd-1.4.35'

 * S: '/var/tmp/portage/www-servers/lighttpd-1.4.35/work/lighttpd-1.4.35'

```

Since it points toward bzip2 I tried 

```
USE="-bzip2" emerge -1 lighttpd

```

 and it emerged well and it also runs well. 

I do not know if I need bzip2 support in lighttpd but since this useflag is set by default it would be nice if the default settings would emerge.

Any ideas  :Question: Last edited by lindegur on Wed May 14, 2014 8:48 pm; edited 1 time in total

----------

## limn

The lightppd package maintainer expects you to have bzip2 on the Pi. How did you create your mimimalistic environment?

Browsers can inform servers what compression the brower supports so that the server can send the requested data in compressed form that the browser can uncompress.

Lightppd on your Pi will now support gzip because of '--with-zlib' but not bzip2. Bzip2 can make smaller files, but can take longer than gzip. E.g.

```
$ ls -l tcl8.6.1-src.tar

-rw-r--r-- 1 limn limn 42280960 Feb 25 17:29 tcl8.6.1-src.tar

$ time bzip2 tcl8.6.1-src.tar

real    0m58.868s

user    0m31.944s

sys     0m0.440s

$ ls -l tcl8.6.1-src.tar.bz2 

-rw-r--r-- 1 limn limn 6756861 Feb 25 17:29 tcl8.6.1-src.tar.bz2

$ time gzip tcl8.6.1-src.tar

real    0m8.022s

user    0m4.076s

sys     0m0.196s

bruno$ ls -l tcl8.6.1-src.tar.gz 

-rw-r--r-- 1 limn limn 8846208 Feb 25 17:29 tcl8.6.1-src.tar.gz

```

On the Pi you may be better off without bzip2 support.

----------

## lindegur

I followed http://wiki.gentoo.org/wiki/Raspberry_Pi_Quick_Install_Guide and the official Gentoo handbook for the rest. 

Basically just the bootloader and kernel are different and obviously also the arm architecture. 

All went surprisingly easy, just compilation takes days.

I do not see anything wrong with the installation.

I actually do not like when lighttpd would do some compression, since speed is an issue for my application that uses fcgi.

So disabling bzip2 solves two things:

lighttpd emerges fine on arm

I do not get bzip2

However a small issue remains. Why does lighttpd not emerge with the default useflag settings on the raspberry PI?

Maybe I should just ignore that and mark this post as solved   :Rolling Eyes: 

----------

## limn

According to stage3-armv6j_hardfp-20140113.tar.bz2.CONTENTS you should have got the header and lib files.

/usr/include/bzlib.h

/usr/lib/libbz2.so

/lib/libbz2.so.1 -> libbz2.so.1.0.6

/lib/libbz2.so.1.0 -> libbz2.so.1.0.6

/lib/libbz2.so.1.0.6

It would appear that lightppd's configure could not find them. That would be a bug.

The dev marked arm stable in bug 504330 for this version but may have been using a cross-compiler and the problem may not occur then.

----------

## lindegur

I have /usr/include/bzlib.h

I don't have /usr/lib/libbz2.so

I have /lib/libbz2.so.1 -> libbz2.so.1.0.6

I have /lib/libbz2.so.1.0 -> libbz2.so.1.0.6

I have /lib/libbz2.so.1.0.6

```
qfile   /usr/lib/libbz2.so
```

 tells me it is coming from app-arch/bzip2

```
emerge -s bzip2
```

 tells me that I got it  :Rolling Eyes: 

```
cat /var/db/pkg/app-arch/bzip2-1.0.6-r6/CONTENTS | grep libbz2 
```

 tells me that the file got installed  :Rolling Eyes: 

But it is no more there  and I do not remember having done anything strange, maybe a power up/down in the middle of a emerge -u world might have happened  :Rolling Eyes: 

```
emerge -1 bzip2
```

  :Confused: 

brought the file back and

```
emerge -1 lighttpd
```

 emerged fine  :Laughing: 

So there is nothing wrong with the lighttpd ebuild  :Wink: 

----------

## limn

Good.

However it might mean something wrong with the card. You might want to run a badblocks read/write non-destructive test on it.

Of course, that will not tell if any other files are missing. For that you can use qcheck.

----------

