alex-sever-h / boblight

Automatically exported from code.google.com/p/boblight
GNU General Public License v3.0
0 stars 0 forks source link

Build Error on FreeBSD 8.2 #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
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

Original issue reported on code.google.com by 2kelN...@gmail.com on 24 Nov 2011 at 2:02

GoogleCodeExporter commented 8 years ago
I have fount that the error seems to originate from 'make 
libboblight_la-boblight-client.lo' 

Original comment by 2kelN...@gmail.com on 24 Nov 2011 at 2:15

GoogleCodeExporter commented 8 years ago
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. 

Original comment by 2kelN...@gmail.com on 24 Nov 2011 at 7:03

GoogleCodeExporter commented 8 years ago
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

Original comment by 2kelN...@gmail.com on 24 Nov 2011 at 7:07

GoogleCodeExporter commented 8 years ago
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)

Original comment by bob.loo...@gmail.com on 24 Nov 2011 at 11:05

GoogleCodeExporter commented 8 years ago
Thanks for the new revision. It passes that error now. 

I'll have a look where KEEPALIVE is defined. 

Original comment by 2kelN...@gmail.com on 25 Nov 2011 at 9:10

GoogleCodeExporter commented 8 years ago
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

Original comment by 2kelN...@gmail.com on 25 Nov 2011 at 9:10

GoogleCodeExporter commented 8 years ago
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?

Original comment by 2kelN...@gmail.com on 25 Nov 2011 at 9:14

GoogleCodeExporter commented 8 years ago
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.

Original comment by 2kelN...@gmail.com on 25 Nov 2011 at 9:18

Attachments:

GoogleCodeExporter commented 8 years ago
diff -r work/src/util/tcpsocket.cpp 
/home/$USER/BUILD/boblight-read-only/src/util/tcpsocket.cpp
28,29d27
< #include <netinet/tcp_var.h>
<
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.

Original comment by 2kelN...@gmail.com on 25 Nov 2011 at 9:44

GoogleCodeExporter commented 8 years ago
The patch above contains an error. 
There needs to be an '#include <netinet/tcp_timer.h>' line aswell. 

Original comment by 2kelN...@gmail.com on 25 Nov 2011 at 12:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
All patches in a single file:

Original comment by 2kelN...@gmail.com on 25 Nov 2011 at 5:00

Attachments:

GoogleCodeExporter commented 8 years ago
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. 

Original comment by 2kelN...@gmail.com on 1 Dec 2011 at 11:32

Attachments:

GoogleCodeExporter commented 8 years ago
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? 

Original comment by 2kelN...@gmail.com on 1 Dec 2011 at 11:36

GoogleCodeExporter commented 8 years ago
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?

Original comment by bob.loo...@gmail.com on 31 Dec 2011 at 12:54

GoogleCodeExporter commented 8 years ago
I'm assuming this is ok now.

Original comment by bob.loo...@gmail.com on 2 Jul 2012 at 12:10