# Compiling boblight - portaudio.h not found



## mix_room (Nov 24, 2011)

I am trying to compile boblight (http://blogger.xs4all.nl/loosen/ and http://code.google.com/p/boblight/)

The configure-script fails when it attempts to find portaudio.h 

I am sure that portaudio.h is present:

```
locate portaudio.h
/usr/local/include/portaudio.h
```

I think that it is GNU autoconf that is being run, but unfortunately I do not really know how it works. I have been trying to somehow get /usr/local/include/ to be included in the search path, but it doesn't seems to be working. 


```
checking portaudio.h usability... no
checking portaudio.h presence... no
checking for portaudio.h... no
configure: error: Missing a required header, please install it or disable portaudio support by passing --without-portaudio to configure
```

One of the other errors in the config-script points to portaudio-v19, so I installed audio/portaudio2 aswell. 

Is there anyone who has a possible solution to this?


----------



## SirDice (Nov 24, 2011)

Have a look in the Porter's Handbook: http://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/building.html#USING-CONFIGURE


----------



## mix_room (Nov 24, 2011)

SirDice, thanks for the link, but it didn't help. 

I got it to find the file by using [cmd=""]setenv CPP_FLAGS -I/usr/local/include/[/cmd] and then running ./configure again. 

Now it throws another error: 


```
checking portaudio.h usability... yes
checking portaudio.h presence... yes
checking for portaudio.h... yes
checking for PaStreamCallbackTimeInfo... yes
checking for main in -lportaudio... no
configure: error: Missing a required library, please install it or disable it by passing --without-portaudio to configure
```


----------



## SirDice (Nov 24, 2011)

If you create a basic port skeleton most if this will be done automagically.


----------



## mix_room (Nov 24, 2011)

SirDice said:
			
		

> If you create a basic port skeleton most if this will be done automagically.





```
# $FreeBSD: ports/multimedia/boblight/Makefile,v 1.209 2011/08/21 08:11:55 crees Exp $
#

COMMENT=        boblight-http://code.google.com/p/boblight/wiki/Compiling
CATEGORIES=     misc

MASTER_SITES=   ${MASTER_SITE_LOCAL}
PORTNAME=boblight
DISTNAME=${PORTNAME}
PKGNAME=boblight-0.1b

SUB_FILES=      pkg-message

#CONFFILES=     boblight.conf

GNU_CONFIGURE=yes

WRKSRC = ${WRKDIR}

.include <bsd.port.mk>
```

in /usr/ports/misc/boblight and I still get the error concerning main not being found.


----------



## SirDice (Nov 24, 2011)

You may need to tell it where the portaudio libraries are. Try running [cmd=]./configure --help[/cmd] That usually shows the options you can set, perhaps there's a README too? 
You can set those options by adding a CONFIGURE_ARGS to the Makefile.


----------



## mix_room (Nov 24, 2011)

SirDice said:
			
		

> You may need to tell it where the portaudio libraries are. Try running [cmd=]./configure --help[/cmd] That usually shows the options you can set, perhaps there's a README too?



The README file is empty.

I did not express myself clearly in my previous post. The libraries are now being found, but they are not being detected properly. I don't think this is a problem with FreeBSD anymore. The automagic worked.

I submitted a help-request to the google-code page aswell, perhaps the authors of the program know more. I marked it [SOLVED] as it doesn't seem to be a FreeBSD problem anymore, will report back if I make any progress.


----------



## mix_room (Nov 24, 2011)

For completeness sake, here is the output of gmake when it fails. 
It is now being run with --without-portaudio and --without-ffmpeg


```
HOST #gmake 
/bin/sh ../libtool  --tag=CXX   --mode=compile c++ -DHAVE_CONFIG_H -I. -I..     -O2 -pipe -fno-strict-aliasing -MT libboblight_la-boblight-client.lo -MD -M
ght-client.Tpo -c -o libboblight_la-boblight-client.lo `test -f 'lib/boblight-client.cpp' || echo './'`lib/boblight-client.cpp
mv -f .deps/libboblight_la-boblight-client.Tpo .deps/libboblight_la-boblight-client.Plo
mv: rename .deps/libboblight_la-boblight-client.Tpo to .deps/libboblight_la-boblight-client.Plo: No such file or directory
gmake: *** [libboblight_la-boblight-client.lo] Error 1
```

While I understand what the error message says, it doesn't really seem to make much sense.
I don't see why they are moving the .Tpo file to .Plo. 

Does the BSD libtool erase the input file?


----------



## mix_room (Nov 24, 2011)

The error was with libtool. 

I added the following to the Makefile, and now it passes the missing .Tpo file error. 


```
USE_AUTOTOOLS+= libtool
```


----------



## mix_room (Dec 1, 2011)

I completed the initial port now. 
I uploaded a tar-archive to http://code.google.com/p/boblight/issues/detail?id=22

I am not sure that it is working correctly as I have not been able to fully test it yet.


----------

