Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 713086 - media-video/vdr-2.4.1-r3 : tools.h: error: missing binary operator before token (
Summary: media-video/vdr-2.4.1-r3 : tools.h: error: missing binary operator before tok...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo musl team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-17 22:51 UTC by Toralf Förster
Modified: 2021-02-16 18:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,15.91 KB, text/plain)
2020-03-17 22:51 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,48.03 KB, text/plain)
2020-03-17 22:51 UTC, Toralf Förster
Details
environment (environment,72.93 KB, text/plain)
2020-03-17 22:51 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,11.30 KB, application/x-bzip)
2020-03-17 22:51 UTC, Toralf Förster
Details
media-video:vdr-2.4.1-r3:20200317-224709.log (media-video:vdr-2.4.1-r3:20200317-224709.log,23.67 KB, text/plain)
2020-03-17 22:51 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,20.85 KB, application/x-bzip)
2020-03-17 22:51 UTC, Toralf Förster
Details
test patch for musl fix (vdr-2.4.1-r4.ebuild,5.99 KB, patch)
2020-03-23 17:39 UTC, Joerg Bornkessel
Details | Diff
FILESDIR, test patch for musl fix (vdr-2.4.1_musl-fix.patch,652 bytes, patch)
2020-03-23 17:40 UTC, Joerg Bornkessel
Details | Diff
ebuild with apllyed musl patch (vdr-2.4.1-r4.ebuild,5.99 KB, text/plain)
2020-03-23 17:42 UTC, Joerg Bornkessel
Details
updated musl/glibc detect patch (vdr-2.4.1_musl-fix.patch,1.44 KB, patch)
2020-03-27 21:08 UTC, Joerg Bornkessel
Details | Diff
compatibility patch (musl-compat.patch,4.07 KB, patch)
2020-03-27 21:24 UTC, Jory A. Pratt
Details | Diff
missing headers (include-missing-limits.patch,488 bytes, patch)
2020-03-27 21:25 UTC, Jory A. Pratt
Details | Diff
vdr-2.4.6-r2.ebuild with musl patch eapply (vdr-2.4.6-r2.ebuild,5.97 KB, patch)
2021-02-16 18:40 UTC, Joerg Bornkessel
Details | Diff
next try, musl compile fix for vdr-2.4.6 (vdr-2.4.6_musl_fix.patch,4.81 KB, patch)
2021-02-16 18:45 UTC, Joerg Bornkessel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2020-03-17 22:51:37 UTC
In file included from args.h:15,
                 from args.c:12:
tools.h:409:20: error: missing binary operator before token (
  409 | #if !__GLIBC_PREREQ(2, 24) // readdir_r() is deprecated as of GLIBC 2.24
      |                    ^
In file included from audio.h:14,

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200316-165821

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.3.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *

repository:
==> /var/db/repos/gentoo/metadata/timestamp.chk <==
Tue, 17 Mar 2020 21:38:32 +0000
emerge -qpvO media-video/vdr
[ebuild  N    ] media-video/vdr-2.4.1-r3  USE="-bidi -debug -demoplugins -html -keyboard -mainmenuhooks -menuorg -naludump -permashift -pinplugin (-systemd) -ttxtsubs -verbose"
Comment 1 Toralf Förster gentoo-dev 2020-03-17 22:51:40 UTC
Created attachment 621106 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-17 22:51:43 UTC
Created attachment 621108 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-03-17 22:51:45 UTC
Created attachment 621110 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-03-17 22:51:48 UTC
Created attachment 621112 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-03-17 22:51:51 UTC
Created attachment 621114 [details]
media-video:vdr-2.4.1-r3:20200317-224709.log
Comment 6 Toralf Förster gentoo-dev 2020-03-17 22:51:54 UTC
Created attachment 621116 [details]
temp.tbz2
Comment 7 Joerg Bornkessel gentoo-dev 2020-03-23 17:39:48 UTC
Created attachment 624740 [details, diff]
test patch for musl fix
Comment 8 Joerg Bornkessel gentoo-dev 2020-03-23 17:40:45 UTC
Created attachment 624742 [details, diff]
FILESDIR, test patch for musl fix
Comment 9 Joerg Bornkessel gentoo-dev 2020-03-23 17:42:09 UTC
Created attachment 624744 [details]
ebuild with apllyed musl patch
Comment 10 Joerg Bornkessel gentoo-dev 2020-03-27 21:08:48 UTC
Created attachment 626462 [details, diff]
updated musl/glibc detect patch

the updated patch fix the detection if glibc is installed/used 

anyway, after this i will still fails with a lot of errors

<snipp>
In file included from args.h:15,
                 from args.c:12:
tools.h:433:60: error: ‘DEFFILEMODE’ was not declared in this scope
  433 |   bool Open(const char *FileName, int Flags, mode_t Mode = DEFFILEMODE);
      |                                                            ^~~~~~~~~~~
tools.h:475:59: error: ‘DEFFILEMODE’ was not declared in this scope
  475 |   int Open(const char *FileName, int Flags, mode_t Mode = DEFFILEMODE);
      |                                                           ^~~~~~~~~~~
tools.h:481:81: error: ‘DEFFILEMODE’ was not declared in this scope
  481 |   static cUnbufferedFile *Create(const char *FileName, int Flags, mode_t Mode = DEFFILEMODE);
      |                                                                                 ^~~~~~~~~~~
tools.h:776:13: error: ‘__compar_fn_t’ has not been declared
  776 |   void Sort(__compar_fn_t Compare)
      |             ^~~~~~~~~~~~~
tools.h: In member function ‘void cStringList::Sort(bool)’:
tools.h:811:30: error: invalid conversion from ‘int (*)(const void*, const void*)’ to ‘int’ [-fpermissive]
  811 |        cVector<char *>::Sort(CompareStringsIgnoreCase);
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~
      |                              |
      |                              int (*)(const void*, const void*)
tools.h:776:27: note:   initializing argument 1 of ‘void cVector<T>::Sort(int) [with T = char*]’
  776 |   void Sort(__compar_fn_t Compare)
      |             ~~~~~~~~~~~~~~^~~~~~~
tools.h:813:30: error: invalid conversion from ‘int (*)(const void*, const void*)’ to ‘int’ [-fpermissive]
  813 |        cVector<char *>::Sort(CompareStrings);
      |                              ^~~~~~~~~~~~~~
      |                              |
      |                              int (*)(const void*, const void*)
tools.h:776:27: note:   initializing argument 1 of ‘void cVector<T>::Sort(int) [with T = char*]’
  776 |   void Sort(__compar_fn_t Compare)
      |             ~~~~~~~~~~~~~~^~~~~~~
tools.h: In member function ‘void cStringList::SortNumerically()’:
tools.h:817:27: error: invalid conversion from ‘int (*)(const void*, const void*)’ to ‘int’ [-fpermissive]
  817 |     cVector<char *>::Sort(CompareStringsNumerically);
      |                           ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                           |
      |                           int (*)(const void*, const void*)
tools.h:776:27: note:   initializing argument 1 of ‘void cVector<T>::Sort(int) [with T = char*]’
  776 |   void Sort(__compar_fn_t Compare)
...
<snapp>
Comment 11 Jory A. Pratt gentoo-dev 2020-03-27 21:24:53 UTC
Created attachment 626464 [details, diff]
compatibility patch

Here is main musl fix, it needs types.h added as well will attach that patch in a minute.
Comment 12 Jory A. Pratt gentoo-dev 2020-03-27 21:25:17 UTC
Created attachment 626466 [details, diff]
missing headers
Comment 13 Joerg Bornkessel gentoo-dev 2021-02-16 18:40:27 UTC
Created attachment 686991 [details, diff]
vdr-2.4.6-r2.ebuild with musl patch eapply
Comment 14 Joerg Bornkessel gentoo-dev 2021-02-16 18:45:36 UTC
Created attachment 686994 [details, diff]
next try, musl compile fix for vdr-2.4.6

@musl team
thanks for your previus patches, sorry for the long delay

Iam played around with your patches in vdr-2.4.6, but i have still problems to fix this

with attched patch, based on your 2 commits it still fails

<snipp>
CC thread.o
thread.c:14:10: fatal error: execinfo.h: No such file or directory
   14 | #include <execinfo.h>
      |          ^~~~~~~~~~~~
compilation terminated.
</snapp>

Iam commented //#include <execinfo.h> in thread.c

<snipp>
thread.c: In static member function ‘static void cBackTrace::BackTrace(cStringList&, int, bool)’:
10 thread.c:524:11: error: ‘backtrace’ was not declared in this scope; did you mean ‘BackTrace’?
11   524 |   int n = backtrace(b, BT_BUF_SIZE);
12	 |           ^~~~~~~~~
13	 |           BackTrace
14 thread.c:525:18: error: ‘backtrace_symbols’ was not declared in this scope
15   525 |   if (char **s = backtrace_symbols(b, n)) {
16	 |                  ^~~~~~~~~~~~~~~~~
17 thread.c: In static member function ‘static cString cBackTrace::GetCaller(int, bool)’:
18 thread.c:549:11: error: ‘backtrace’ was not declared in this scope; did you mean ‘BackTrace’?
19   549 |   int n = backtrace(b, BT_BUF_SIZE);
20	 |           ^~~~~~~~~
21	 |           BackTrace
22 thread.c:550:18: error: ‘backtrace_symbols’ was not declared in this scope
23   550 |   if (char **s = backtrace_symbols(b, n)) {
24	 |                  ^~~~~~~~~~~~~~~~~
25 thread.c: In member function ‘bool cPipe::Open(const char*, const char*)’:
26 thread.c:987:55: warning: missing sentinel in function call [-Wformat=]
27   987 |         if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) {
28	 |                                                       ^
29 thread.c: In function ‘int SystemExec(const char*, bool)’:
30 thread.c:1070:52: warning: missing sentinel in function call [-Wformat=]
 1070 |	if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) {
 |                                                    ^
make: *** [Makefile:144: thread.o] Error 1
Comment 15 Joerg Bornkessel gentoo-dev 2021-02-16 18:47:30 UTC
(In reply to Joerg Bornkessel from comment #14)
> Created attachment 686994 [details, diff] [details, diff]
> next try, musl compile fix for vdr-2.4.6
> 
> @musl team
> thanks for your previus patches, sorry for the long delay
> 
> Iam played around with your patches in vdr-2.4.6, but i have still problems
> to fix this
> 
> with attched patch, based on your 2 commits it still fails
> 
> <snipp>
> CC thread.o
> thread.c:14:10: fatal error: execinfo.h: No such file or directory
>    14 | #include <execinfo.h>
>       |          ^~~~~~~~~~~~
> compilation terminated.
> </snapp>
> 
> Iam commented //#include <execinfo.h> in thread.c
> 
> <snipp>
> thread.c: In static member function ‘static void
> cBackTrace::BackTrace(cStringList&, int, bool)’:
> 10 thread.c:524:11: error: ‘backtrace’ was not declared in this scope; did
> you mean ‘BackTrace’?
> 11   524 |   int n = backtrace(b, BT_BUF_SIZE);
> 12	 |           ^~~~~~~~~
> 13	 |           BackTrace
> 14 thread.c:525:18: error: ‘backtrace_symbols’ was not declared in this scope
> 15   525 |   if (char **s = backtrace_symbols(b, n)) {
> 16	 |                  ^~~~~~~~~~~~~~~~~
> 17 thread.c: In static member function ‘static cString
> cBackTrace::GetCaller(int, bool)’:
> 18 thread.c:549:11: error: ‘backtrace’ was not declared in this scope; did
> you mean ‘BackTrace’?
> 19   549 |   int n = backtrace(b, BT_BUF_SIZE);
> 20	 |           ^~~~~~~~~
> 21	 |           BackTrace
> 22 thread.c:550:18: error: ‘backtrace_symbols’ was not declared in this scope
> 23   550 |   if (char **s = backtrace_symbols(b, n)) {
> 24	 |                  ^~~~~~~~~~~~~~~~~
> 25 thread.c: In member function ‘bool cPipe::Open(const char*, const char*)’:
> 26 thread.c:987:55: warning: missing sentinel in function call [-Wformat=]
> 27   987 |         if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) {
> 28	 |                                                       ^
> 29 thread.c: In function ‘int SystemExec(const char*, bool)’:
> 30 thread.c:1070:52: warning: missing sentinel in function call [-Wformat=]
>  1070 |	if (execl("/bin/sh", "sh", "-c", Command, NULL) == -1) {
>  |                                                    ^
> make: *** [Makefile:144: thread.o] Error 1

i am did comment here complett this part
37 /*
38 void cBackTrace::BackTrace(cStringList &StringList, int Level, bool Mangled)
39 ...
40 */
41 // --- cStateLockLog -----
42
43 it compiles, but then it fails in the linker part
44
45 LD vdr
46 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: i18n.o: in function `I18nInitialize(char const*)':
47 i18n.c:(.text+0x7a3): undefined reference to `_nl_msg_cat_cntr'
48 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: i18n.c:(.text+0xa74): undefined reference to `_nl_msg_cat_cntr'
49 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: i18n.o: in function `I18nSetLocale(char const*)':
50 i18n.c:(.text+0x1244): undefined reference to `_nl_msg_cat_cntr'
51 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: thread.o: in function `cStateLock::SetSyncStateKey(cStateKey&)':
52 thread.c:(.text+0xe71): undefined reference to `cBackTrace::BackTrace(_IO_FILE*, int, bool)'
53 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: thread.o: in function `cStateLock::SetExplicitModify()':
54 thread.c:(.text+0xf3d): undefined reference to `cBackTrace::BackTrace(_IO_FILE*, int, bool)'
55 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: thread.o: in function `cStateLock::SetModified()':
56 thread.c:(.text+0xfe6): undefined reference to `cBackTrace::BackTrace(_IO_FILE*, int, bool)'
57 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: thread.o: in function `cStateKey::~cStateKey()':
58 thread.c:(.text+0x104e): undefined reference to `cBackTrace::BackTrace(_IO_FILE*, int, bool)'
59 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: thread.o: in function `cStateKey::StateChanged()':
60 thread.c:(.text+0x1116): undefined reference to `cBackTrace::BackTrace(_IO_FILE*, int, bool)'
61 /usr/lib/gcc/x86_64-gentoo-linux-musl/9.2.0/../../../../x86_64-gentoo-linux-musl/bin/ld: thread.o:thread.c:(.text+0x1f9a): more undefined references to `cBackTrac>
62 collect2: error: ld returned 1 exit status


Any Ideas?, help is always welcome!

Thx