Skip to content

sock_async: fix compile-time errors#12624

Merged
benpicco merged 1 commit intoRIOT-OS:masterfrom
miri64:sock_async/fix/compile-time-errors
Oct 31, 2019
Merged

sock_async: fix compile-time errors#12624
benpicco merged 1 commit intoRIOT-OS:masterfrom
miri64:sock_async/fix/compile-time-errors

Conversation

@miri64
Copy link
Member

@miri64 miri64 commented Oct 31, 2019

Contribution description

When trying to implement the backend for sock_async in GNRC, I found a bunch of compile-time issues in the header. I guess that's what happens if you just provide a header ^^"

Testing procedure

Still nothing to compile it with. I tried various versions using -include, but as you can see

there are some problems when trying to do that
[mlenders@sarajevo RIOT]<3 CFLAGS="-include ${PWD}/sys/include/net/sock/async.h" RIOT_CI_BUILD=1 make -C examples/hello-world/
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'
Building application "hello-world" for "native" with MCU "native".

   text	   data	    bss	    dec	    hex	filename
  23027	    568	  47716	  71311	  1168f	/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/bin/native/hello-world.elf
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'
[mlenders@sarajevo RIOT]<3 CFLAGS="-include ${PWD}/sys/include/net/sock/async.h -DSOCK_HAS_ASYNC" RIOT_CI_BUILD=1 make -C examples/hello-world/
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'
Building application "hello-world" for "native" with MCU "native".

/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h: Assembler messages:
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:55: Error: no such instruction: `typedef enum {'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:56: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:57: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:58: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:59: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:60: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:61: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:62: Error: junk at end of line, first unrecognized character is `}'
make[2]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:110: /home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/bin/native/cpu/tramp.o] Error 1
make[1]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:20: ALL--/home/mlenders/Repositories/RIOT-OS/RIOT/cpu/native] Error 2
make: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/../../Makefile.include:522: /home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/bin/native/application_hello-world.a] Error 2
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'
[mlenders@sarajevo RIOT]<3 CFLAGS="-include ${PWD}/sys/include/net/sock/async.h -DSOCK_HAS_ASYNC" RIOT_CI_BUILD=1 USEMODULE=gnrc_udp make -C examples/hello-world/
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'
Building application "hello-world" for "native" with MCU "native".

/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h: Assembler messages:
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:55: Error: no such instruction: `typedef enum {'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:56: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:57: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:58: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:59: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:60: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:61: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:62: Error: junk at end of line, first unrecognized character is `}'
make[2]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:110: /home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/bin/native/cpu/tramp.o] Error 1
make[1]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:20: ALL--/home/mlenders/Repositories/RIOT-OS/RIOT/cpu/native] Error 2
make: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/../../Makefile.include:522: /home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/bin/native/application_hello-world.a] Error 2
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'
[mlenders@sarajevo RIOT]<3 CFLAGS="-include ${PWD}/sys/include/net/sock/async.h -DSOCK_HAS_ASYNC" RIOT_CI_BUILD=1 USEMODULE=gnrc_ip make -C examples/hello-world/
make: Entering directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'
Building application "hello-world" for "native" with MCU "native".

/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h: Assembler messages:
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:55: Error: no such instruction: `typedef enum {'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:56: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:57: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:58: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:59: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:60: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:61: Error: junk at end of line, first unrecognized character is `,'
/home/mlenders/Repositories/RIOT-OS/RIOT/sys/include/net/sock/async.h:62: Error: junk at end of line, first unrecognized character is `}'
make[2]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:110: /home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/bin/native/cpu/tramp.o] Error 1
make[1]: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/Makefile.base:20: ALL--/home/mlenders/Repositories/RIOT-OS/RIOT/cpu/native] Error 2
make: *** [/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/../../Makefile.include:522: /home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world/bin/native/application_hello-world.a] Error 2
make: Leaving directory '/home/mlenders/Repositories/RIOT-OS/RIOT/examples/hello-world'

Edit after opening #12625: alternatively you can just try to compile #12625 with and without this change.

Issues/PRs references

Follow-up on #11723.

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 31, 2019
@miri64 miri64 requested a review from kaspar030 October 31, 2019 15:08
Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should have been like that in the first place.
Only touches unused code.

@benpicco benpicco merged commit 3a87e2d into RIOT-OS:master Oct 31, 2019
@miri64 miri64 deleted the sock_async/fix/compile-time-errors branch October 31, 2019 21:13
@fjmolinas fjmolinas added this to the Release 2020.01 milestone Dec 13, 2019
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 Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants