# Can't build Virtualbox-ose



## blazingice (Jul 11, 2013)

Today, I tried to install emulators/virtualbox-ose but I get this error:

```
...
=> SHA256 Checksum mismatch for libgcrypt-1.5.2.tar.bz2.
===>  Giving up on fetching files: libgcrypt-1.5.2.tar.bz2
Make sure the Makefile and distinfo file (/usr/ports/security/libgcrypt/distinfo)
are up to date.  If you are absolutely sure you want to override this
check, type "make NO_CHECKSUM=yes [other args]".
*** [checksum] Error code 1

Stop in /usr/ports/security/libgcrypt.
*** [checksum] Error code 1

Stop in /usr/ports/security/libgcrypt.
*** [lib-depends] Error code 1

Stop in /usr/ports/textproc/libxslt.
*** [install] Error code 1

Stop in /usr/ports/textproc/libxslt.
*** [build-depends] Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
*** [install] Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
```

Obviously I have updated the ports. `portsnap fetch update`

I tried to build a package with ports-mgmt/poudriere but I get a different error:

```
====>> Failed ports: security/libgpg-error:checksum

====>> Skipped ports: emulators/virtualbox-ose security/libgcrypt textproc/libxslt
```

Any suggestions how to fix this?

Thanks


----------



## wblock@ (Jul 11, 2013)

`# make -C /usr/ports/security/libgcrypt distclean fetch`

and try again.


----------



## SirDice (Jul 12, 2013)

Looks like it fetched a corrupt libgcrypt-1.5.2.tar.bz2 file. The trick @wblock@ showed will remove the file from /usr/ports/distfiles so it will be downloaded again.


----------



## blazingice (Jul 12, 2013)

Exactly the same error, even after doing what you suggested:

`# make -C /usr/ports/security/libgcrypt distclean fetch`

```
===>  Cleaning for libgcrypt-1.5.2
===>  Deleting distfiles for libgcrypt-1.5.2
===>  License GPLv2 LGPL21 accepted by the user
===>   libgcrypt-1.5.2 depends on file: /usr/local/sbin/pkg - found
=> libgcrypt-1.5.2.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://gnupg.org.favoritelinks.net/libgcrypt/libgcrypt-1.5.2.tar.bz2
fetch: http://gnupg.org.favoritelinks.net/libgcrypt/libgcrypt-1.5.2.tar.bz2: size unknown
fetch: http://gnupg.org.favoritelinks.net/libgcrypt/libgcrypt-1.5.2.tar.bz2: size of remote file is not known
libgcrypt-1.5.2.tar.bz2                               1082  B   13 MBps
===> Fetching all distfiles required by libgcrypt-1.5.2 for building
```


----------



## kpa (Jul 12, 2013)

Check what the file it downloaded actually contains. Chances are it contains an HTML error page from a misbehaving proxy.


----------



## wblock@ (Jul 12, 2013)

1082 bytes is definitely wrong.


----------



## adripillo (Jul 12, 2013)

Maybe you can download it from here http://mirrors.dotsrc.org/gcrypt/libgcrypt/ and put it /usr/ports/distfiles*.* But I do not know if the install will take it from there instead of the place that is actually doing.


----------



## blazingice (Jul 12, 2013)

Thanks to @kpa. The file was an HTML error page.

Thanks to @adripillo. I downloaded libgcrypt and it didn't complain. I also had to download libgpg-error. 

Now, I get a different error:


```
...
rm: libtoolT: No such file or directory
===>  Building for libxslt-1.1.28_1
env: gmake: No such file or directory
*** [do-build] Error code 1

Stop in /usr/ports/textproc/libxslt.
*** [install] Error code 1

Stop in /usr/ports/textproc/libxslt.
*** [build-depends] Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
*** [install] Error code 1
```


----------



## adripillo (Jul 12, 2013)

blazingice said:
			
		

> Thanks to kpa. The file was an HTML error page.
> 
> Thanks to adripillo. I downloaded libgcrypt and it didn't complain. I also had to download libgpg-error.
> 
> ...



Can you put more code from a little more back before the errors start please.


----------



## blazingice (Jul 12, 2013)

I did a fresh build after doing `make clean`, because I had tried many things and could have done something silly. The fresh build did not give the recent error that I just mentioned:


```
...
rm: libtoolT: No such file or directory
===>  Building for libxslt-1.1.28_1
env: gmake: No such file or directory
...
```

However, now I get another error:


```
...
kBuild: Pass - Staging
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/samples/tstVBoxAPILinux.cpp
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/samples/Makefile
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/cbinding/samples/tstXPCOMCGlue.c
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/cbinding/samples/tstXPCOMCCall.c
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/cbinding/samples/Makefile
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/cbinding/VBoxXPCOMCGlue.c
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/VBoxCAPI_v2_2.h
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/VBoxCAPI_v3_0.h
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/VBoxCAPI_v3_1.h
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/VBoxCAPI_v3_2.h
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/VBoxCAPI_v4_0.h
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/xpcom/include/VBoxCAPI_v4_1.h
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/VirtualBox.xidl
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/installer/vboxapi/__init__.py
install: warning: Not hard linking, mode differs: 0755, desires 0644
install: src path '/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/src/VBox/Main/glue/vboxapi.py'
install: dst path '/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/installer/vboxapi/__init__.py'
kBuild: xsltproc Python constants - /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/src/VBox/Main/glue/constants-python.xsl
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/installer/vboxapi/VirtualBox_constants.py
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/glue/java/TestVBox.java
kBuild: Installing /usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/bin/sdk/bindings/glue/java/Makefile
kmk: *** No rule to make target `/usr/src/sys/kern/bus_if.m', needed by `/usr/ports/emulators/virtualbox-ose/work/VirtualBox-4.2.16/out/freebsd.amd64/release/obj/FreeBSDGeneratedKernelHeaders/bus_if.h'.  Stop.
*** [do-build] Error code 2

Stop in /usr/ports/emulators/virtualbox-ose.
*** [install] Error code 1

Stop in /usr/ports/emulators/virtualbox-ose.
root@elohim:/usr/ports/emulators/virtualbox-ose #
```


----------



## wblock@ (Jul 13, 2013)

It needs the FreeBSD source installed in /usr/src.  Odd that it did not complain about the source being missing, unless you have a different version of the source installed than the system is running.


----------



## blazingice (Jul 13, 2013)

Thanks everyone. It's all fixed now. 

I also noticed that today's poudriere build did not give any errors, so it seems that libgcrypt and libgpg-error are fixed in the ports.


----------

