# apr1 is broken



## scewing (Sep 23, 2011)

I've posted this problem before and I thought I had solved it, but it has not been solved. I've repeated this process several times on several different machines with exactly the same results. If I install a fresh copy of FreeBSD 8.2, update all ports and then the very first thing I do is try to either apache22 or apr1, it errors out as follows:



```
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for apr-devrandom-mysql55-1.4.5.1.3.12_1
===>  Extracting for apr-1.4.5.1.3.12_1
=> SHA256 Checksum OK for apr-1.4.5.tar.gz.
=> SHA256 Checksum OK for apr-util-1.3.12.tar.gz.
===>   apr-1.4.5.1.3.12_1 depends on file: /usr/local/bin/perl5.12.4 - found
===>  Patching for apr-1.4.5.1.3.12_1
===>   apr-1.4.5.1.3.12_1 depends on file: /usr/local/bin/perl5.12.4 - found
===>  Applying FreeBSD patches for apr-1.4.5.1.3.12_1
File to patch:
No file found--skip this patch? [n] y
1 out of 1 hunks ignored--saving rejects to apr-1.4.2/buildconf.rej
Can't create apr-1.4.2/buildconf.rej, output is in /tmp//patchrW2b72o: No such file or directory
=> Patch patch-apr_buildconf failed to apply cleanly.
*** Error code 1

Stop in /usr/ports/devel/apr1.
*** Error code 1

Stop in /usr/ports/devel/apr1.
```

I was working around this by not updating the ports right away and doing the install and THEN updating and that worked fine. But now that process tells me I can't install that version and to update my ports first.

I've even done a make config on apr1 and unchecked all options. Sometimes it's a different file that it's looking to patch but each time it stops because it can't find said file.

I've seen other issues with this duo (apache22/apr) in the forums here and elsewhere, but they all address it when doing an UPDATE. This is a fresh install and it does not work. Even if I don't get help with this, someone needs to know this is a problem. I can't believe I'm the only one who's experiencing this. I'm really at my wits end with this thing. I'd love it if someone could help me with this.

Thanks


----------



## wblock@ (Sep 23, 2011)

```
% ls /usr/ports/devel/apr1/files
patch-apr_hints.m4	patch-apr_ldap_rebind.c
% ls /usr/ports/devel/apr2/files
patch-build__apr_hints.m4	patch-buildconf
patch-build__iconv.m4
```

patch-buildconf is from devel/apr2, but you were trying to build devel/apr1.

So at least that patch file is in the wrong place.  A complete portsnap(8) fetch extract should overwrite whatever happened to the ports tree and make it current.


----------



## scewing (Sep 23, 2011)

Awesome! Worked like a charm. I dunno how it got like that every time. Anyway...

You saved the day, and probably the rest of the month and whats left of the hair on my head.

Thanks so much!


----------



## scewing (Sep 23, 2011)

I don't suppose this is related to the last little problem. But after apr1 installed successfully i tried to install apache22 and got:


```
checking whether to enable mod_auth_digest... checking dependencies
You need APR random support to use mod_auth_digest.
Look at APR configure options --with-egd and --with-devrandom.
checking whether to enable mod_auth_digest... configure: error: mod_auth_digest has been requested but can not be built due to prerequisite failures
===>  Script "configure" failed unexpectedly.
Please report the problem to apache@FreeBSD.org [maintainer] and attach the
"/usr/ports/www/apache22/work/httpd-2.2.21/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. an `ls
/var/db/pkg`).
```

I did a search but all I cold find was that this was a port issue once a few years back.


----------



## wblock@ (Sep 24, 2011)

DEVRANDOM is an option for devel/apr1.  Probably best to build it with default options, or add any you need but don't turn default ones off.
`# cd /usr/ports/devel/apr1`
`# make deinstall clean`
`# make rmconfig`
`# make config`

Then build and install it and www/apache22.


----------

