Skip to content

native: fix missing includes and declarations for OS X#3290

Closed
thomaseichinger wants to merge 2 commits intoRIOT-OS:masterfrom
thomaseichinger:pr/fix_osx_includes
Closed

native: fix missing includes and declarations for OS X#3290
thomaseichinger wants to merge 2 commits intoRIOT-OS:masterfrom
thomaseichinger:pr/fix_osx_includes

Conversation

@thomaseichinger
Copy link
Copy Markdown
Member

Fixes #3175 and #3198

@thomaseichinger thomaseichinger added Platform: native Platform: This PR/issue effects the native platform Area: network Area: Networking OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system labels Jul 1, 2015
@emmanuelsearch
Copy link
Copy Markdown
Member

Seems to work for vtimer_msg, but I still get quite some warnings:

make -B clean all
...
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/hwtimer_cpu.c:280:5: warning: 
      implicit declaration of function 'host_get_clock_service' is invalid in
      C99 [-Wimplicit-function-declaration]
    host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock);
    ^
1 warning generated.
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/irq_cpu.c:324:5: warning: 
      'makecontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    makecontext(&native_isr_context, native_irq_handler, 0);
    ^
/usr/include/ucontext.h:38:6: note: 'makecontext' has been explicitly marked
      deprecated here
void makecontext(ucontext_t *, void (*)(), int, ...) __OSX_AVAILABLE_BUT...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/irq_cpu.c:486:9: warning: 
      'getcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    if (getcontext(&native_isr_context) == -1) {
        ^
/usr/include/ucontext.h:37:6: note: 'getcontext' has been explicitly marked
      deprecated here
int  getcontext(ucontext_t *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/irq_cpu.c:504:5: warning: 
      'makecontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    makecontext(&native_isr_context, native_irq_handler, 0);
    ^
/usr/include/ucontext.h:38:6: note: 'makecontext' has been explicitly marked
      deprecated here
void makecontext(ucontext_t *, void (*)(), int, ...) __OSX_AVAILABLE_BUT...
     ^
3 warnings generated.
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:118:9: warning: 
      'getcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    if (getcontext(p) == -1) {
        ^
/usr/include/ucontext.h:37:6: note: 'getcontext' has been explicitly marked
      deprecated here
int  getcontext(ucontext_t *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:131:5: warning: 
      'makecontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    makecontext(p, (void (*)(void)) task_func, 1, arg);
    ^
/usr/include/ucontext.h:38:6: note: 'makecontext' has been explicitly marked
      deprecated here
void makecontext(ucontext_t *, void (*)(), int, ...) __OSX_AVAILABLE_BUT...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:153:9: warning: 
      'setcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    if (setcontext(ctx) == -1) {
        ^
/usr/include/ucontext.h:39:6: note: 'setcontext' has been explicitly marked
      deprecated here
int  setcontext(const ucontext_t *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:174:9: warning: 
      'makecontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
        makecontext(&native_isr_context, isr_cpu_switch_context_exit, 0);
        ^
/usr/include/ucontext.h:38:6: note: 'makecontext' has been explicitly marked
      deprecated here
void makecontext(ucontext_t *, void (*)(), int, ...) __OSX_AVAILABLE_BUT...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:175:13: warning: 
      'setcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
        if (setcontext(&native_isr_context) == -1) {
            ^
/usr/include/ucontext.h:39:6: note: 'setcontext' has been explicitly marked
      deprecated here
int  setcontext(const ucontext_t *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:196:9: warning: 
      'setcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    if (setcontext(ctx) == -1) {
        ^
/usr/include/ucontext.h:39:6: note: 'setcontext' has been explicitly marked
      deprecated here
int  setcontext(const ucontext_t *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:210:9: warning: 
      'makecontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
        makecontext(&native_isr_context, isr_thread_yield, 0);
        ^
/usr/include/ucontext.h:38:6: note: 'makecontext' has been explicitly marked
      deprecated here
void makecontext(ucontext_t *, void (*)(), int, ...) __OSX_AVAILABLE_BUT...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:211:13: warning: 
      'swapcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
        if (swapcontext(ctx, &native_isr_context) == -1) {
            ^
/usr/include/ucontext.h:40:6: note: 'swapcontext' has been explicitly marked
      deprecated here
int  swapcontext(ucontext_t * __restrict, const ucontext_t * __restrict...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:223:9: warning: 
      'getcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    if (getcontext(&end_context) == -1) {
        ^
/usr/include/ucontext.h:37:6: note: 'getcontext' has been explicitly marked
      deprecated here
int  getcontext(ucontext_t *) __OSX_AVAILABLE_BUT_DEPRECATED(__MAC_10_5...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/native_cpu.c:230:5: warning: 
      'makecontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
    makecontext(&end_context, sched_task_exit, 0);
    ^
/usr/include/ucontext.h:38:6: note: 'makecontext' has been explicitly marked
      deprecated here
void makecontext(ucontext_t *, void (*)(), int, ...) __OSX_AVAILABLE_BUT...
     ^
10 warnings generated.
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/syscalls.c:128:9: warning: 
      'makecontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
        makecontext(&native_isr_context, native_irq_handler, 0);
        ^
/usr/include/ucontext.h:38:6: note: 'makecontext' has been explicitly marked
      deprecated here
void makecontext(ucontext_t *, void (*)(), int, ...) __OSX_AVAILABLE_BUT...
     ^
/Users/emmanuelB/Documents/work/CODING/RIOT/RIOT/cpu/native/syscalls.c:129:13: warning: 
      'swapcontext' is deprecated: first deprecated in OS X 10.6
      [-Wdeprecated-declarations]
        if (swapcontext(_native_cur_ctx, &native_isr_context) == -1) {
            ^
/usr/include/ucontext.h:40:6: note: 'swapcontext' has been explicitly marked
      deprecated here
int  swapcontext(ucontext_t * __restrict, const ucontext_t * __restrict...
     ^
2 warnings generated.
...
__TEXT  __DATA  __OBJC  others  dec hex
36864   1544192 0   20480   1601536 187000

@emmanuelsearch
Copy link
Copy Markdown
Member

concerning testing at runtime, I ran into #3320
Any clues?

@emmanuelsearch
Copy link
Copy Markdown
Member

When I follow the how-to (https://github.com/RIOT-OS/RIOT/wiki/Testing-6LoWPAN-on-Ethernet-based-devices) setting the environment variables as specified etc.
I get the following error:

clang: error: no such file or directory: '/RIOT/examples/ng_networking/bin/native/ng_zep.a'
make: *** [all] Error 1

@thomaseichinger
Copy link
Copy Markdown
Member Author

Updated in respect of #3282

@thomaseichinger
Copy link
Copy Markdown
Member Author

I get the following error:

clang: error: no such file or directory: '/RIOT/examples/ng_networking/bin/native/ng_zep.a'
make: *** [all] Error 1

Can't reproduce this right now. Could you try again with recent changes?

@jnohlgard
Copy link
Copy Markdown
Member

@emmanuelsearch did you do a make clean before building?

@thomaseichinger thomaseichinger added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 15, 2015
@thomaseichinger
Copy link
Copy Markdown
Member Author

@emmanuelsearch ping.

@thomaseichinger
Copy link
Copy Markdown
Member Author

Closing this in favour of #3393.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system Platform: native Platform: This PR/issue effects the native platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants