# 9.0-Release buildworld:  "sha2.h: no such file or directory"



## johnsalomon (Aug 14, 2012)

Hi there,

I'm going nuts for about a week now trying to *make buildworld*.

I've cvsupped the source for 9.0-RELEASE    My supfile:

```
*default host=cvsup.de.freebsd.org
*default base=/var/db
*default prefix=/usr
*default release=cvs tag=RELENG_9 (I have a separate supfile with tag=. for ports)
*default delete use-rel-suffix
*default compress
src-all
```
All my ports are up to date; *portupgrade -a* worked fine.  

Every time I try to *make buildworld*, I get the error 
	
	



```
sha2.h: no such file or directory
```
 In the latest instance, it broke while making libarchive.

I have found a few problem reports about this for 9.0 but they all seem to concern builds done with -DWITHOUT_OPENSSL or -DWITHOUT_CRYPT.

I have not specified this anywhere - it's not in /etc/make.conf or /etc/src.conf. I can't find anything on WITH_OPENSSL or WITH_CRYPT; do I need to specify this somewhere?

Please help, this is driving me insane.


----------



## kpa (Aug 14, 2012)

Change that to 
	
	



```
*default release=cvs tag=RELENG_9_0
```
 RELENG_9 is 9-STABLE and not 9.0-RELEASE.

Clean the /usr/obj directory completely with `# rm -rf /usr/obj/*` and start over with `# make buildworld`.


----------



## johnsalomon (Aug 14, 2012)

OK trying that now.  Thank you very much.


----------



## johnsalomon (Aug 15, 2012)

OK, tried that - *cvsup* RELENG_9_0, *rm -rf /usr/obj/**, *make buildworld*.  Fails again.

```
/usr/src/lib/libarchive/archive_hash.h:122:20: error: sha2.h: No such file or directory
/usr/src/lib/libarchive/archive_hash.h:152:20: error: sha2.h: No such file or directory
mkdep: compile failed
*** Error code 1

Stop in /usr/src/lib/libarchive.
```
There are 4 sha2.h in my source tree, among them /usr/src/sys/crypto/sha2/sha2.h

Any other ideas?

Like I wrote, the only references to this I've seen come from trying to build with -DWITHOUT_OPENSSL.  This does not appear to be the default.  I have no idea where I would have set this (I didn't).  How can I unset it if it is set?  

I've double- and triple-checked my /etc/make.conf and /etc/src.conf for anything related to crypto, openssl, or the likes.  No joy.  

It can't be this tough to do a *make buildworld*!


----------



## disi (Aug 15, 2012)

To really start over with the compilation, I would clean /usr/src as well:
25.7.14.6. What do I do if something goes wrong? nearly at the bottom of the page.

```
# chflags -R noschg /usr/obj/usr
# rm -rf /usr/obj/usr
# cd /usr/src
# make cleandir
# make cleandir
```

Oh and then run csup again and get a fresh copy, then try again.


----------



## johnsalomon (Aug 15, 2012)

Hi, tried that, tried rm -rf /usr/src /usr/obj, no good.

What finally worked was when I just overwrote my /etc/make.conf with the default one.  I have no idea - there was no reference to any of the stuff that normally causes the sha2.h issue in my version.  

Thanks for the help, all.


----------



## kpa (Aug 16, 2012)

Do you have ports-mgmt/portconf installed? If you do check if you have file /usr/local/etc/ports.conf and what's in there.


----------

