Hallo,
i get following errors on try to compile vdr-plugin-iptv-2.2.1
<snipp> ... i686-pc-linux-gnu-g++ -march=athlon-xp -O2 -pipe -fomit-frame-pointer -std=c++11 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include -DUSE_PLUGINMISSING -DUSE_MAINMENUHOOKS -DUSE_MENUSELECTION -c -DPLUGIN_NAME_I18N='"iptv"' -o common.o common.c In file included from common.c:9:0: common.c: In function ‘int select_single_desc(int, int, bool)’: common.h:39:34: error: unable to find string literal operator ‘operator""errstr’ with ‘const char [14]’, ‘unsigned int’ arguments esyslog("[%s,%d]: "errstr": %s", __FILE__, __LINE__, \ ^ common.h:47:40: note: in expansion of macro ‘ERROR_IF_FUNC’ #define ERROR_IF_RET(exp, errstr, ret) ERROR_IF_FUNC(exp, errstr, ,ret); ^ common.c:61:3: note: in expansion of macro ‘ERROR_IF_RET’ ERROR_IF_RET(retval < 0, "select()", return retval); ^ Makefile:90: recipe for target 'common.o' failed make: *** [common.o] Error 1 make: *** Waiting for unfinished jobs.... * ERROR: media-plugins/vdr-iptv-2.2.1::gentoo failed (compile phase): * emake failed </snapp>
gcc is 5.3.0 also tested with gcc-4.9.3, same problem
Is there a compile fix around?
Cheers
/bin/joerg
On Mon, May 16, 2016 at 02:35:28PM +0200, Joerg Bornkessel wrote:
Hallo,
i get following errors on try to compile vdr-plugin-iptv-2.2.1
<snipp> common.c: In function ‘int select_single_desc(int, int, bool)’: common.h:39:34: error: unable to find string literal operator ‘operator""errstr’ with ‘const char [14]’, ‘unsigned int’ arguments esyslog("[%s,%d]: "errstr": %s", __FILE__, __LINE__, \
It looks like the macro is trying to catenate the strings in the format:
common.c:61:3: note: in expansion of macro ‘ERROR_IF_RET’ ERROR_IF_RET(retval < 0, "select()", return retval);
to get the following:
esyslog("[%s,%d: select(): %s", __FILE__, __LINE__, ...);
Why it does not work, I am not sure. Maybe cpp (the C preprocessor) has been changed in a way that requires the insertion of some white space. Did you try to add spaces around the errstr parameter, like this:
esyslog("[%s,%d]: " errstr ": %s", __FILE__, __LINE__, \
Best regards,
Marko Mäkelä
Am 16.05.2016 um 15:02 schrieb Marko Mäkelä:
On Mon, May 16, 2016 at 02:35:28PM +0200, Joerg Bornkessel wrote:
Hallo,
i get following errors on try to compile vdr-plugin-iptv-2.2.1
Did you try to add spaces around the errstr parameter, like this:
esyslog("[%s,%d]: " errstr ": %s", __FILE__, __LINE__, \
done, this brings me a step forward, but it fails then with
<snipp> ... i686-pc-linux-gnu-g++ -march=athlon-xp -O2 -pipe -fomit-frame-pointer -std=c++11 -fPIC -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -I/usr/include -DUSE_PLUGINMISSING -DUSE_MAINMENUHOOKS -DUSE_MENUSELECTION -c -DPLUGIN_NAME_I18N='"iptv"' -o pidscanner.o pidscanner.c In file included from config.h:12:0, from device.c:8: device.c: In destructor ‘virtual cIptvDevice::~cIptvDevice()’: common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:62:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pIptvSectionM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:62:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pIptvSectionM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:62:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pIptvSectionM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:63:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pSidScannerM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:63:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pSidScannerM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:63:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pSidScannerM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:64:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pPidScannerM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:64:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pPidScannerM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:64:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pPidScannerM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:65:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pIptvStreamerM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:65:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pIptvStreamerM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:65:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pIptvStreamerM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:66:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pExtProtocolM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:66:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pExtProtocolM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:66:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pExtProtocolM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:67:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pFileProtocolM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:67:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pFileProtocolM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:67:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pFileProtocolM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:68:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pHttpProtocolM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:68:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pHttpProtocolM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:68:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pHttpProtocolM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:69:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pCurlProtocolM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:69:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pCurlProtocolM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:69:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pCurlProtocolM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:70:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pUdpProtocolM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:70:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pUdpProtocolM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:70:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pUdpProtocolM); ^ common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:71:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(tsBufferM); ^ common.h:54:23: error: ‘tmp’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:71:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(tsBufferM); ^ common.h:56:19: error: type ‘<type error>’ argument given to ‘delete’, expected pointer delete(tmp); \ ^ device.c:71:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(tsBufferM); ^ Makefile:90: recipe for target 'device.o' failed make: *** [device.o] Error 1 make: *** Waiting for unfinished jobs.... * ERROR: media-plugins/vdr-iptv-2.2.1::gentoo failed (compile phase): </snapp>
i think this comes from the, up from gcc-4.9, -std=gnu11 as default C standard.
__________________________________
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
On Mon, May 16, 2016 at 04:13:36PM +0200, Joerg Bornkessel wrote:
device.c: In destructor ‘virtual cIptvDevice::~cIptvDevice()’: common.h:54:20: error: ‘typeof’ was not declared in this scope typeof(*ptr) *tmp = ptr; \ ^ device.c:62:3: note: in expansion of macro ‘DELETE_POINTER’ DELETE_POINTER(pIptvSectionM);
It looks like the definition of the macro DELETE_POINTER is not expanding to valid C++. Since C++11 (ISO/IEC 14882:2011), similar functionality is available in the standard, but the keyword is decltype, not typeof. The typeof keyword was a non-standard GNU extension.
According to the answers in http://stackoverflow.com/questions/14130774/difference-between-decltype-and-... the "typeof" keyword cannot be directly replaced with "decltype", in case the expression is a reference. It would seem to me that the macro should be redefined by using the "auto" keyword, something like this:
auto tmp = ptr;
It looks like all the errors that you posted are due to the same macro definition.
i think this comes from the, up from gcc-4.9, -std=gnu11 as default C standard.
Right. Instead of patching the source, you could also try to work around the issues by specifying -std=gnu++03 or -std=gnu++98.
Marko Mäkelä