Project

General

Profile

Bug #4279

Compiling error on MacOS Sierra

Added by Markus Griesslehner over 7 years ago. Updated almost 7 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
General
Target version:
-
Start date:
2017-03-10
Due date:
% Done:

0%

Estimated time:
Found in version:
d08a8b9
Affected Versions:

Description

I get the following four errors while compiling on MacOS Sierra 10.12.3:

src/wrappers.c:195:2: error: "Implement renice for your platform!" [-Werror,-W#warnings]
#warning "Implement renice for your platform!"
^
src/wrappers.c:229:7: error: implicit declaration of function 'pthread_condattr_setclock' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
r = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC);
^
src/wrappers.c:229:7: note: did you mean 'pthread_condattr_destroy'?
/usr/include/pthread.h:312:5: note: 'pthread_condattr_destroy' declared here
int pthread_condattr_destroy(pthread_condattr_t *);
^
src/wrappers.c:303:7: error: implicit declaration of function 'clock_nanosleep' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
r = clock_nanosleep(CLOCK_MONOTONIC, 0, &ts, &ts);
^
src/wrappers.c:320:40: error: use of undeclared identifier 'TIMER_ABSTIME'
r = clock_nanosleep(CLOCK_MONOTONIC, TIMER_ABSTIME, &ts, &ts);
^
4 errors generated.

Thanks.

History

#1

Updated by Jaroslav Kysela over 7 years ago

I cannot help you for these. You need to consult this with a developer which works with MacOS.

#2

Updated by Markus Griesslehner over 7 years ago

Hi Jaroslav,

I was able to fix the problems reported with this ticket (and most of the following ones), but now i hang on.
The following error occurs while compiling and i hope you have an idea how i can solve this?

Building src/tvh_locale_inc.c
CC              src/tvh_locale.o
CC              src/bonjour.o
CC              src/libav.o
CC              src/muxer/muxer_libav.o
CC              src/plumbing/transcoding.o
CC              src/descrambler/tvhcsa.o
CC              src/descrambler/cwc.o
CC              src/descrambler/emm_reass.o
CC              src/descrambler/capmt.o
CC              src/descrambler/constcw.o
CC              src/descrambler/ffdecsa/ffdecsa_interface.o
CC              src/descrambler/ffdecsa/ffdecsa_int.o
CC              src/descrambler/ffdecsa/ffdecsa_mmx.o
CC              src/descrambler/ffdecsa/ffdecsa_sse2.o
CC              src/descrambler/libaesdec/libaesdec.o
CC              src/docs.o
CC              build.o
date: illegal option -- I
usage: date [-jnRu] [-d dst] [-r seconds] [-t west] [-v[+|-]val[ymwdHMS]] ... 
            [-f fmt date | [[[mm]dd]HH]MM[[cc]yy][.ss]] [+format]
CC              timestamp.o
CC              tvheadend
ld: unknown option: -z
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/tvh/Downloads/tvheadend-master/build.darwin/tvheadend] Error 1

Thanks and best regards
Markus

#3

Updated by Markus Griesslehner over 7 years ago

On my system i have the command gdate which has the required option, but i can't find the file to change the command. For the ld command on the other hand i don't have the GNU-Version and no option -z ...

Thanks for your help.

#4

Updated by Jaroslav Kysela over 7 years ago

Markus Griesslehner wrote:

I was able to fix the problems reported with this ticket (and most of the following ones), but now i hang on.

If you share your changes (ideally do a pull-request on github), I can review them and apply to the master tvh branch.

On my system i have the command gdate which has the required option, but i can't find the file to change the command. For the ld command on the other hand i don't have the GNU-Version and no option -z ...

$ grep date Makefile
    @echo 'const char* build_timestamp = "'`date -Iseconds`'";' >> $@
#5

Updated by Scuba Sound almost 7 years ago

BSD systems cannot use the GNU form:
date -Iseconds

I would be better to use the more universal equivalent:
date +%FT%T%z

diff Makefile.bak Makefile
672c672
<     @echo 'const char* build_timestamp = "'`date -Iseconds`'";' >> $@
---
>     @echo 'const char* build_timestamp = "'`date +%FT%T%z`'";' >> $@
#6

Updated by Jaroslav Kysela almost 7 years ago

  • Status changed from New to Fixed

This issue was already resolved. This date format is used now:

%Y-%m-%dT%H:%M:%S%z

Also available in: Atom PDF