News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

Compile vompserver fails

Started by TEDDYXXL, November 25, 2011, 19:22:24

Previous topic - Next topic

TEDDYXXL

Hi !

After installling openSUSE 12.1 compile of vompserver-plugin fails:

Plugin vompserver:
make[1]: Entering directory `/backup/privat/tv/dvb/vdr-1.7.21/PLUGINS/src/vompserver-0.3.1-3-Yaris'
( if [ -f .standalone ] ; then ( rm -f .standalone; make clean ; make objects ) ; else exit 0 ;fi )
g++ -g -O3 -Wall -Woverloaded-virtual -Wno-parentheses -fPIC -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vompserver"' -DVOMPSERVER -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I../../../include -I/include -o mediafile.o mediafile.c
mediafile.c: In member function 'virtual MediaList* MediaFile::getMediaList(const MediaURI*)':
mediafile.c:126:21: error: expected primary-expression before 'struct'
mediafile.c:126:36: error: 'd_name' was not declared in this scope
mediafile.c:126:42: error: 'offsetof' was not declared in this scope
mediafile.c:126:58: error: array bound is not an integer constant before ']' token
make[1]: *** [mediafile.o] Error 1
make[1]: Leaving directory `/backup/privat/tv/dvb/vdr-1.7.21/PLUGINS/src/vompserver-0.3.1-3-Yaris'

Any ideas ?

Dirk

odin4242

Hi Teddyxxl,

i ran into the same problem. Just commented out all code and return null instead. Compiles now like a charm, but it would be great if someone can realy fix this

Odin4242
M3N78-VM | 64GB SSD + 2TB WD Green | NetCeiver 2xDVB-S2-Dual 1xDVB-S Dual | SoftHDDevice
LG 37" Full-HD per HDMI
MediaMVPs | WinVDRStreamer | SMT 7020s | Raspberry Pi
easyVDR 1.0

4ndreas

Hi,
are there any news on this topic?

I commented out the faulty line (thanx odin4242) and it compiles but I think there was some intended use for this line :-)

Regards,
Andreas

davep

The vompserver plugin compiles fine for me (GCC 4 4 3) and I can't see any changes in later versions which could cause it to fail.

Do you mean that you just commented out the line:
    char b[offsetof(struct dirent, d_name) + NAME_MAX + 1];

That section of code was copied from the GNU C Library Reference Manual (2007) and is intended to make sure that the memory allocated to a dirent structure is always guaranteed to be large enough. I'm no expert but I don't think there is a problem on Linux, and even if there were, it would only be an issue if you had very large filenames (close to 255 characters).

Dave

4ndreas

Hi Dave,
yes, that's the line we commented out. I don't know anything about programming, so I can't comment your explanation. Do you mean we don't really need this line if filenames are less than 255 characters? I can live with that...
The gcc on my system (openSuSE 12.1) is 4.6.2.

Regards,
Andreas

riban

This still fails to compile with gcc V4.6.3, i.e. on Ubuntu 12.04. Commenting out the error allows the server to compile but we should figure out whether that line is needed and whether simply commenting out may cause undesired effects.
My vdr host blew up this morning and so I have been building a new one and this is one of the many issues I am having to resolve, having moved to the current version of vdr (1.7,22) running on the current LTS of Ubuntu (12.04).

MartenR

Please add
#include <stdio.h>
#include <stddef.h>

as includes.

riban

I confirm that adding:

#include <stddef.h>

to mediafile.c fixes this issue.

Note: <stdio.h> is not required to fix this issue.