# /devel/apr0 fails to patch on FreeBSD-8.1-amd64



## jewsofeast (Feb 18, 2011)

Hi, I can't install devel/apr0, which is needed by subversion. It demands a patch and the ones available in /usr/ports/devel/apr0/files/ do not work. I've not been in this situation before and my question may appear stupid, please help if you can.


```
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Extracting for apache-2.0.64
=> SHA256 Checksum OK for apache2/httpd-2.0.64.tar.bz2.
=> SHA256 Checksum OK for apache2/powerlogo.gif.
===>   apache-2.0.64 depends on file: /usr/local/bin/perl5.10.1 - found
===>  Patching for apache-2.0.64
===>   apache-2.0.64 depends on file: /usr/local/bin/perl5.10.1 - found
===>  Applying FreeBSD patches for apache-2.0.64
===>   apache-2.0.64 depends on file: /usr/local/bin/perl5.10.1 - found
===>   apache-2.0.64 depends on file: /usr/local/bin/autoconf-2.68 - found
===>   apache-2.0.64 depends on package: libtool>=2.2 - found
===>   apache-2.0.64 depends on shared library: expat.6 - found
===>   apache-2.0.64 depends on shared library: pcre.0 - found
===>   apache-2.0.64 depends on shared library: apr-0 - not found
===>    Verifying install for apr-0 in /usr/ports/devel/apr0
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE
===>  Found saved configuration for apr-0.9.19.0.9.19
===>  Extracting for apr-0.9.19.0.9.19
=> SHA256 Checksum OK for apr-0.9.19.tar.gz.
=> SHA256 Checksum OK for apr-util-0.9.19.tar.gz.
===>   apr-0.9.19.0.9.19 depends on file: /usr/local/bin/perl5.10.1 - found
===>  Patching for apr-0.9.19.0.9.19
===>   apr-0.9.19.0.9.19 depends on file: /usr/local/bin/perl5.10.1 - found
===>  Applying FreeBSD patches for apr-0.9.19.0.9.19
File to patch:
```


----------



## SirDice (Feb 18, 2011)

What comes after this? What you posted looks good, no errors there.


----------



## jewsofeast (Feb 18, 2011)

Hi,

I tried patching with the files from /usr/ports/devel/apr0/files/ but they won't go in. It keeps demanding something that isn't there. At the end I put 'y' and the build breaks. I may be doing something stupid, not sure. 

Best,

Dave


----------



## SirDice (Feb 18, 2011)

jewsofeast said:
			
		

> I tried patching with the files from '/usr/ports/devel/apr0/files' but they wont go in.


Why are you doing this manually? Those patches will be applied automatically when you build the port.


----------



## jewsofeast (Feb 18, 2011)

Hi,

They won't, most patches were applied automatically by make but in here I guess few patches are missing and make can't find those.

Best,

Dave


----------



## SirDice (Feb 18, 2011)

What patches are you talking about?


----------



## jewsofeast (Feb 18, 2011)

Hi,

Patches for apr-devrandom-db42-ldap24-mysql51-1.4.2.1.3.10

This is what I got in /usr/ports/devel/apr0/files -


```
freebsd-81# ls
patch-apr-0.9.18__build__buildcheck.sh		patch-apr-0.9.19__buildconf			        patch-apr-util-0.9.17__config.layout
patch-apr-0.9.18__config.layout			patch-apr-0.9.19__config.layout			patch-apr-util-0.9.19__config.layout
patch-apr-0.9.18__configure.in			patch-apr-0.9.19__configure.in			patch-apr_buildconf
patch-apr-0.9.18__threadproc__unix__procsup.c	patch-apr-0.9.19__threadproc__unix__procsup.c
patch-apr-0.9.19__build__buildcheck.sh		patch-apr-util-0.9.17__build__dbm.m4
```

When I try manually -


```
1 out of 1 hunks failed--saving rejects to /usr/ports/devel/apr0/files/patch-apr-0.9.19__threadproc__unix__procsup.c.rej
=> Patch patch-apr-0.9.18__build__buildcheck.sh failed to apply cleanly.
*** Error code 1

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

Stop in /usr/ports/devel/apr0.
freebsd-81#
```

This is an example but same thing happens with other patches too. I am at loss here.


----------



## SirDice (Feb 18, 2011)

This is getting confusing fast... Can you post the output of:

`# cd /usr/ports/devel/apr0 && make clean patch`

Edit: scratch that. Remove all the files in files. Then update your ports tree. Apr is at 0.9.19.0.9.19 and you have a mix of 0.9.18 and 0.9.19 patches.


----------



## jewsofeast (Feb 18, 2011)

SirDice,

It now patched but I get this error -


```
checking for library containing strerror... none required
checking whether system uses EBCDIC... no
performing libtool configuration...
./configure: 9386: Syntax error: word unexpected (expecting ")")
*** Error code 2

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

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


----------



## SirDice (Feb 18, 2011)

Do a "make clean" to clean out the old stuff.


----------



## jewsofeast (Feb 18, 2011)

Hi,

I have already run 
[CMD=]"portsclean -CDD"[/CMD]

I managed to install apr1, how do I change apr0 to apr1 in devel/subversion?


----------



## jewsofeast (Feb 18, 2011)

Well, I now installed apache-2.2 and apr1, I can now build subversion but there is no install.in file. How do I get the install.in file

Best,

dave


----------



## jewsofeast (Feb 18, 2011)

Hi,

I copied the files from pc-bsd and installed subversion.

Thanks,

dave


----------



## wblock@ (Feb 18, 2011)

Why not just install devel/subversion-freebsd?


----------



## jewsofeast (Feb 19, 2011)

wblock:

Well I should have tried that instead. I am at loss with ..include in Makefile, don't know how and what to edit in order to install Meta-pkgs as per my convenience or by replacing dependencies. Please let me know what file to edit while compiling kde4 or gnome2 and substitute the ports/dependencies.

best,

dave


----------



## wblock@ (Feb 19, 2011)

What are you trying to achieve?  If a port doesn't install the dependencies it needs, something is wrong.  In general, you should not need to modify port files.


----------



## jewsofeast (Feb 19, 2011)

Ok, here is an example. The kde4 build needs apr but with its configuration it goes for apr0 and that port is bad. If you install apr1 you can build kde4 still. I wonder what needs to be done under these circumstances in NetBSD I managed to pick alternates since it had provisions for include in its Makefile.


----------



## wblock@ (Feb 19, 2011)

jewsofeast said:
			
		

> Ok, here is an example. The kde4 build needs apr but with its configuration it goes for apr0 and that port is bad.



More specifically, portaudit keeps it from being installed due to a security problem.  It cites the problem, and you can look and decide whether to override portaudit if the security problem doesn't apply in your situation.



> If you install apr1 you can build kde4 still. I wonder what needs to be done under these circumstances in NetBSD I managed to pick alternates since it had provisions for include in its Makefile.



That can quickly get into non-trivial territory.  Building is not the same as running, and apr1 might not be a drop-in replacement for apr0.  Or it might be, and all that is necessary is to install apr1 first.  It depends on what KDE wants and how it is set up.  The port maintainer might be able to suggest a better solution.


----------



## jewsofeast (Feb 19, 2011)

wblock:

I didn't get portaudit error during apr0 make. It just didn't build. I came across this on amd64, i386 went smooth. 

Thanks,

dave


----------



## wblock@ (Feb 19, 2011)

"Didn't build" is not specific enough.  This is what I see on i386:


```
% cd /usr/ports/devel/apr0
% make
===>  apr-0.9.19.0.9.19 has known vulnerabilities:
=> apr -- multiple vulnerabilities.
   Reference: http://portaudit.FreeBSD.org/eb9212f7-526b-11de-bbf2-001b77d09812.html
=> Please update your ports tree and try again.
*** Error code 1

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

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

That vulnerability warning is from ports-mgmt/portaudit.


----------



## jewsofeast (Feb 19, 2011)

wblock:

Is this a recent development, just 2 weeks back I built and installed it on i386. I didn't get that error anyway on amd64, it was config error. I am aware of vulnerability error as portaudit looks for it. However, when I run [cmd=]portaudit -Fda[/cmd] I get a hint of it on i386 but no mention of apr1 in amd64. 



Best,

Dave


----------



## wblock@ (Feb 19, 2011)

No build or portaudit problem here on 8-stable i386 or 9-current amd64 with apr1.  Other than that, I just don't know.  The config error could have been a version problem, or missing something in /usr/ports/UPDATING, or a consequence of manually patching ports or installing software from raw source.


----------



## jewsofeast (Feb 20, 2011)

wblock said:
			
		

> No build or portaudit problem here on 8-stable i386 or 9-current amd64 with apr1.  Other than that, I just don't know.  The config error could have been a version problem, or missing something in /usr/ports/UPDATING, or a consequence of manually patching ports or installing software from raw source.



You will have build problem with apr0 on amd64. But apr1 works on all arch.


----------



## wblock@ (Feb 20, 2011)

It seems to build okay on 9-current amd64 as of Feb 5; I didn't install it, though.  But it doesn't matter, since apr1 is what the ports had as a dependency.  It's one of those "it hurts when I do this" kind of things.


----------



## jewsofeast (Feb 20, 2011)

Right said.


----------

