Skip to content

Fix compilation issue on macOS #1085

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

wvallet-ledger
Copy link

Description

I had issues to compile on application on macOS with the SDK. Due to specific needs, I require last SDK modification with specific API level that may not available on the docker image.

Here is the error I got during application compilation:

Prepare directories
[GLYPH] Compiling...
[CC]   build/flex/obj/app/src/apdu/dispatcher.o
In file included from <built-in>:402:
<command line>:22:9: error: macro name must be an identifier
   22 | #define 0 1
      |         ^
APP_PATH/src/apdu/dispatcher.c:21:10: fatal error: 'buffer.h' file not found
   21 | #include "buffer.h"
      |          ^~~~~~~~~~
2 errors generated.
[CC]   build/flex/obj/app/src/app_io_event.o
make: *** [build/flex/obj/app/src/apdu/dispatcher.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from <built-in>:402:
<command line>:22:9: error: macro name must be an identifier
   22 | #define 0 1
      |         ^
APP_PATH/src/app_io_event.c:20:10: fatal error: 'os.h' file not found
   20 | #include "os.h"
      |          ^~~~~~
2 errors generated.
make: *** [build/flex/obj/app/src/app_io_event.o] Error 1
make: *** wait: No child processes.  Stop.

I fixed the issue by correcting the uniq command that is not well interpreted by my environment and ensure that the WebUSB URL size is correctly generated. This fix has been tested on 3 macOS laptop, but it needs to be validated on Linux environment.

Changes include

  • Bugfix (non-breaking change that solves an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (change that is not backwards-compatible and/or changes current functionality)
  • Tests
  • Documentation
  • Other (for changes that might not fit in any category)

Breaking changes

Please complete this section if any breaking changes have been made, otherwise delete it.

Additional comments

  • To be tested on Linux environment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant