Export to GitHub

boblight - issue #22

Build Error on FreeBSD 8.2


Posted on Nov 24, 2011 by Happy Panda

I am attempting to build boblight svn revision 398 on FreeBSD 8.2 amd64.

I have installed audio/portaudio2 port - the header file is found, but not recognized.

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 ===> Script "configure" failed unexpectedly.

In order to get configure-script to run, I need to disable both portaudio and ffmpeg. It still does not build. Running gmake (make is bsd-make on FreeBSD) gives the following errors:

configure: WARNING: --without-portaudio passed, boblightd will not have support for sound devices configure: WARNING: --without-ffmpeg passed, boblight-v4l will not be built ===> Building for boblight- gmake all-recursive gmake[1]: Entering directory /usr/ports/misc/boblight/work' Making all in src gmake[2]: Entering directory/usr/ports/misc/boblight/work/src' /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 -MP -MF .deps/libboblight_la-boblight-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[2]: * [libboblight_la-boblight-client.lo] Error 1 gmake[2]: Leaving directory /usr/ports/misc/boblight/work/src' gmake[1]: *** [all-recursive] Error 1 gmake[1]: Leaving directory/usr/ports/misc/boblight/work' gmake: * [all] Error 2 * Error code 1

Stop in /usr/ports/misc/boblight. * Error code 1

Stop in /usr/ports/misc/boblight.

I don't understand why the file that the process tries to move is not available to the process. Perhaps someone could give me a hint in which direction I need to look further.

Best regards. Emil

Comment #1

Posted on Nov 24, 2011 by Happy Panda

I have fount that the error seems to originate from 'make libboblight_la-boblight-client.lo'

Comment #2

Posted on Nov 24, 2011 by Happy Panda

The error has to do with the way FreeBSD builds things.

I needed to add [USE_AUTOTOOLS+= libtool] to the ports makefile for it to pass that error.

Comment #3

Posted on Nov 24, 2011 by Happy Panda

The compilation now stops during building of util/tcpsocket.cpp with the following error

util/tcpsocket.cpp: In member function 'int CTcpSocket::SetSockOptions()': util/tcpsocket.cpp:146: error: 'SOL_TCP' was not declared in this scope util/tcpsocket.cpp:146: error: 'TCP_KEEPCNT' was not declared in this scope util/tcpsocket.cpp:154: error: 'SOL_TCP' was not declared in this scope util/tcpsocket.cpp:154: error: 'TCP_KEEPIDLE' was not declared in this scope util/tcpsocket.cpp:162: error: 'SOL_TCP' was not declared in this scope util/tcpsocket.cpp:162: error: 'TCP_KEEPINTVL' was not declared in this scope util/tcpsocket.cpp:170: error: 'SOL_TCP' was not declared in this scope

Comment #4

Posted on Nov 24, 2011 by Quick Cat

Compile is fixed in r399

This does however disable tcp keepalive when TCP_KEEPCNT etc aren't defined, I'm not sure which flags or header files to use for that on bsd.

You really want tcp keepalive enabled, if a boblightd client dies without closing the socket the lights will never be released to a different client, unless you restart boblightd.

Maybe you can grep for KEEPALIVE in the directory where all system include files live? (/usr/include on linux)

Comment #5

Posted on Nov 25, 2011 by Happy Panda

Thanks for the new revision. It passes that error now.

I'll have a look where KEEPALIVE is defined.

Comment #6

Posted on Nov 25, 2011 by Happy Panda

There is another error compiling now, might be something similar to before

util/serialport.cpp: In member function 'bool CSerialPort::Open(std::string, int, int, int, int)': util/serialport.cpp:224: error: 'XCASE' was not declared in this scope util/serialport.cpp:235: error: 'IUCLC' was not declared in this scope gmake[2]: * [serialport.o] Error 1

Comment #7

Posted on Nov 25, 2011 by Happy Panda

in /usr/include/sys/socket.h

"#define SO_DEBUG 0x0001 /* turn on debugging info recording */

define SO_ACCEPTCONN 0x0002 /* socket has had listen() */

define SO_REUSEADDR 0x0004 /* allow local address reuse */

define SO_KEEPALIVE 0x0008 /* keep connections alive */

define SO_DONTROUTE 0x0010 /* just use interface addresses */

define SO_BROADCAST 0x0020 /* permit sending of broadcast msgs */

"

Is this what you were looking for when you mean KEEPALIVE?

Comment #8

Posted on Nov 25, 2011 by Happy Panda

TCPTV_KEEPCNT is defined in /usr/include/netinet/tcp_timer.h I have attached the file so that you can have a look if it is what you need.

Attachments

Comment #9

Posted on Nov 25, 2011 by Happy Panda

diff -r work/src/util/tcpsocket.cpp /home/$USER/BUILD/boblight-read-only/src/util/tcpsocket.cpp 28,29d27 < #include < 33,34d30 < < using namespace std; 36,38c32 < #define TCP_KEEPIDLE TCPCTL_KEEPIDLE < #define TCP_KEEPCNT TCPTV_KEEPCNT

< #define TCP_KEEPINTVL TCPCTL_KEEPINTVL

using namespace std;

This patch removes the warnings. I'm not sure if it does the right thing though.

Comment #10

Posted on Nov 25, 2011 by Happy Panda

The patch above contains an error. There needs to be an '#include ' line aswell.

Comment #11

Posted on Nov 25, 2011 by Happy Panda

Comment deleted

Comment #12

Posted on Nov 25, 2011 by Happy Panda

Comment deleted

Attachments

Comment #13

Posted on Nov 25, 2011 by Happy Panda

All patches in a single file:

Attachments

Comment #14

Posted on Dec 1, 2011 by Happy Panda

I managed to get it to compile. Without too many errors. There are still a number of warnings about multiply defined __STDC_CONSTANT_MACROS and __STDC_LIMIT_MACROS which I haven't patched away yet. I patched a few files to resolve this problem.

The entire FBSD port is attached in the .tar.gz archive. The patches are under files/patch-src-{FILENAME}

In order to get rid of the errors with XCASE and IUCLC, which as far as I can understand are legacy factors, I defined them to be zero when they are not defined.

Attachments

Comment #15

Posted on Dec 1, 2011 by Happy Panda

When trying to run boblight-constant FF00FF I get the following error: Connecting to boblightd ERROR: TCP_KEEPIDLE Protocol not available Waiting 10 seconds before trying again

What is the significance of this error message? Is it due to the changed I made in comment 9, or is there some other meaning?

Comment #16

Posted on Dec 31, 2011 by Quick Cat

I fixed the compile with missing XCASE and IUCLC in r403. I'll let the keepalive be for what it is right now, I don't use freebsd so I can't really confirm if it works or maintain it, and boblight will work fine without it, the only problem is that you need to restart the daemon if a boblight client ever dies without closing its tcp connection.

Can you confirm if boblight compiles out of the box on freebsd now?

Comment #17

Posted on Jul 2, 2012 by Quick Cat

I'm assuming this is ok now.

Status: Fixed

Labels:
Type-Defect Priority-Medium