Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

List of compiling issues on OS X #6473

Closed
7 tasks done
kYc0o opened this issue Jan 25, 2017 · 6 comments
Closed
7 tasks done

List of compiling issues on OS X #6473

kYc0o opened this issue Jan 25, 2017 · 6 comments
Assignees
Labels
OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@kYc0o
Copy link
Contributor

kYc0o commented Jan 25, 2017

I just ran

for i in $(ls); do if [[ -d "$i" ]]; then echo $i;  make -C $i; fi;  done;

on the RIOT tests folder to know which things are free of error on OS X, and that gave results which can be useful

/Users/facosta/git/RIOT-OS/RIOT/sys/can/conn/isotp.c:67:18: error: comparison of integers of different signs: 'int' and 'unsigned int'
      [-Werror,-Wsign-compare]
/Users/facosta/git/RIOT-OS/RIOT/sys/shell/commands/sc_can.c:41:23: error: comparison of integers of different signs: 'int' and
      'unsigned int' [-Werror,-Wsign-compare]
    for (int i = 0; i < CAN_DLL_NUMOF; i++) {
                    ~ ^ ~~~~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/sys/shell/commands/sc_can.c:64:15: error: comparison of integers of different signs: 'int' and
      'unsigned int' [-Werror,-Wsign-compare]
    if (ifnum >= CAN_DLL_NUMOF) {
        ~~~~~ ^  ~~~~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/sys/shell/commands/sc_can.c:94:15: error: comparison of integers of different signs: 'int' and
      'unsigned int' [-Werror,-Wsign-compare]
    assert(ifnum < CAN_DLL_NUMOF);
           ~~~~~ ^ ~~~~~~~~~~~~~
    if (ifnum >= CAN_DLL_NUMOF) {
        ~~~~~ ^  ~~~~~~~~~~~~~
/Users/facosta/git/RIOT-OS/RIOT/core/include/assert.h:105:11: note: expanded from macro 'assert'
    if (!(cond)) { \
          ^~~~
1 error generated.
3 errors generated.
  • driver_hd44780 Errors due to the spefici setting for Arduino. I propose to white list the boards which support Arduino pin mapping.
  • gnrc_ipv6_nib Found a pontential corner case @miri64 :
/Users/facosta/git/RIOT-OS/RIOT/sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c:269:20: error: unused function '_get_l2addr_from_ipv6'
      [-Werror,-Wunused-function]
static inline void _get_l2addr_from_ipv6(uint8_t *l2addr,
                   ^
1 error generated.
  • gnrc_ipv6_nib_6ln Unused function error (another potential corner case):
/Users/facosta/git/RIOT-OS/RIOT/sys/net/gnrc/network_layer/ipv6/nib/nib.c:543:20: error: unused function '_is_reachable'
      [-Werror,-Wunused-function]
static inline bool _is_reachable(_nib_onl_entry_t *entry)
                   ^
1 error generated.
/Users/facosta/git/RIOT-OS/RIOT/tests/ssp/main.c:33:5: error: '__builtin___memset_chk' will always overflow destination buffer
      [-Werror,-Wbuiltin-memcpy-chk-size]
    memset(buf, 0, 32);
    ^~~~~~~~~~~~~~~~~~
/usr/include/secure/_string.h:77:3: note: expanded from macro 'memset'
  __builtin___memset_chk (dest, val, len, __darwin_obsz0 (dest))
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
  • unittests Works! Fixed for release 2017.10
  • saul Why it works? Does native provide support for SAUL? It works according to comment
@OlegHahm OlegHahm added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system labels Jan 25, 2017
@basilfx
Copy link
Member

basilfx commented Jan 29, 2017

pkg_u8g2 Why it works? Is it possible to use it in native?

There are four output backends, of which the first redirects to stdout, the second to SDL, the third to SPI and the fourth to I2C.

First two can run on native without problems.

@kYc0o
Copy link
Contributor Author

kYc0o commented Jan 29, 2017

There are four output backends, of which the first redirects to stdout, the second to SDL, the third to SPI and the fourth to I2C.

First two can run on native without problems.

Super, I'll mark it as done.

@smlng
Copy link
Member

smlng commented Jun 6, 2017

@kYc0o please not that with #6444 and #6599 the default board for certain boards changed. Which means, that even without supplying a specific board via BOARD=<something> some tests will use e.g. BOARD=samr21-xpro instead of native. Specifically this holds for most periph tests, that require SPI or I2C <- not available for native (yet).

That said: as I use macOS myself and do also care about those (nasty) compile errors or warnings: could you please update your list. Many issues are resolved in the mean time anyway, so could also be reasonable to close this one (for now).

x3ro added a commit to x3ro/RIOT that referenced this issue Oct 20, 2017
On macOS using Apple LLVM version 9.0.0 this test would
not compile due to clang detecting the buffer overflow.
Since this test is all about having a buffer overflow, I
tricked clang into not detecting this anymore.

This loosely relates to RIOT-OS#6473.
x3ro added a commit to x3ro/RIOT that referenced this issue Oct 20, 2017
Since most people™ seem to be developing on linux machines, they
commonly have gnu sed installed. In my experience with cross-platform
projects, it makes sense to require installation of gnu-sed on macOS
since dealing with the incompatibilites of sed is non-trivial.

This commit introduces such a check for the relic package.

For reference, the imcompatible sed call is located in
pkg/relic/fix-util_print_wo_args.sh (e.g. in 775e207)

This loosely relates to RIOT-OS#6473.
x3ro added a commit to x3ro/RIOT that referenced this issue Oct 20, 2017
Since most people™ seem to be developing on linux machines, they
commonly have gnu sed installed. In my experience with cross-platform
projects, it makes sense to require installation of gnu-sed on macOS
since dealing with the incompatibilites of sed is non-trivial.

This commit introduces such a check for the relic package.

For reference, the imcompatible sed call is located in
pkg/relic/fix-util_print_wo_args.sh (e.g. in 775e207)

This loosely relates to RIOT-OS#6473.
@kYc0o
Copy link
Contributor Author

kYc0o commented Oct 25, 2017

I removed non-related OS X errors from the list according to @smlng comment.

However I still found errors and proposed a fix for one of them. @miri64 can you check the ipv6 related ones?

I'll open another issue for board related errors found by clang.

@miri64 miri64 self-assigned this Oct 25, 2017
@miri64
Copy link
Member

miri64 commented Oct 25, 2017

However I still found errors and proposed a fix for one of them. @miri64 can you check the ipv6 related ones?

Will do after the release.

x3ro added a commit to x3ro/RIOT that referenced this issue Oct 30, 2017
On macOS using Apple LLVM version 9.0.0 this test would
not compile due to clang detecting the buffer overflow.
Since this test is all about having a buffer overflow, I
tricked clang into not detecting this anymore.

This loosely relates to RIOT-OS#6473.
x3ro added a commit to x3ro/RIOT that referenced this issue Oct 30, 2017
In the case that GNRC_IPV6_NIB_CONF_ARSM is set but
GNRC_IPV6_NIB_CONF_6LN is not, clang complains about
the function _get_l2addr_from_ipv6 never being used.
I couldn't easily figure out why this passes in Murdock,
but I'm guessing that clang is simply being smarter than
GCC. Can someone comment on whether there is a better fix
for this?

Relates to RIOT-OS#6473
x3ro added a commit to x3ro/RIOT that referenced this issue Nov 7, 2017
In the case that GNRC_IPV6_NIB_CONF_ARSM is set but
GNRC_IPV6_NIB_CONF_6LN is not, clang complains about
the function _get_l2addr_from_ipv6 never being used.
I couldn't easily figure out why this passes in Murdock,
but I'm guessing that clang is simply being smarter than
GCC. Can someone comment on whether there is a better fix
for this?

Relates to RIOT-OS#6473
bergzand pushed a commit to bergzand/RIOT that referenced this issue Nov 17, 2017
In the case that GNRC_IPV6_NIB_CONF_ARSM is set but
GNRC_IPV6_NIB_CONF_6LN is not, clang complains about
the function _get_l2addr_from_ipv6 never being used.
I couldn't easily figure out why this passes in Murdock,
but I'm guessing that clang is simply being smarter than
GCC. Can someone comment on whether there is a better fix
for this?

Relates to RIOT-OS#6473
bergzand pushed a commit to bergzand/RIOT that referenced this issue Nov 19, 2017
In the case that GNRC_IPV6_NIB_CONF_ARSM is set but
GNRC_IPV6_NIB_CONF_6LN is not, clang complains about
the function _get_l2addr_from_ipv6 never being used.
I couldn't easily figure out why this passes in Murdock,
but I'm guessing that clang is simply being smarter than
GCC. Can someone comment on whether there is a better fix
for this?

Relates to RIOT-OS#6473
@kYc0o
Copy link
Contributor Author

kYc0o commented Jan 16, 2018

AFAIK all these issues were addressed, there are new ones but I'll open another issue with them. Closing.

@kYc0o kYc0o closed this as completed Jan 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

5 participants