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

Build LINUX board on Mac Os X Intel #2483

Open
MaBecker opened this issue Apr 11, 2024 · 5 comments
Open

Build LINUX board on Mac Os X Intel #2483

MaBecker opened this issue Apr 11, 2024 · 5 comments

Comments

@MaBecker
Copy link
Contributor

Hi, wanted to know if this is Mac gcc specific or if there is someting broken when building a Espruino on Mac as Linux board.

#/usr/bin/gcc -v
# Apple clang version 15.0.0 (clang-1500.3.9.4)
# Target: x86_64-apple-darwin23.4.0

targets/linux/jshardware.c:361:48: error: incompatible function pointer types passing 'void (*)()' to parameter of type 'void * _Nullable (* _Nonnull)(void * _Nullable)' [-Wincompatible-function-pointer-types]
  int err = pthread_create(&inputThread, NULL, &jshInputThread, NULL);
                                               ^~~~~~~~~~~~~~~
@MaBecker
Copy link
Contributor Author

The last time I tried to build a Linux board was release 2v18.6.

@gfwilliams
Copy link
Member

Pretty sure this is Mac specific - works fine on Linux

@opichals
Copy link
Contributor

opichals commented Apr 12, 2024

@MaBecker Seeing the same error here on an M1 Mac.

% gcc -v
Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: arm64-apple-darwin23.4.0
targets/linux/jshardware.c:361:48: error: incompatible function pointer types passing 'void (*)()' to parameter of type 'void * _Nullable (* _Nonnull)(void * _Nullable)' [-Wincompatible-function-pointer-types]
  int err = pthread_create(&inputThread, NULL, &jshInputThread, NULL);
                                               ^~~~~~~~~~~~~~~

@MaBecker
Copy link
Contributor Author

MaBecker commented Apr 12, 2024

Found this, adding it is building but causing a lot linker warnings like this:

53 warnings generated.
LD bin/espruino
ld: warning: disabling chained fixups because of unaligned pointers
ld: warning: pointer not aligned at _jswSymbols_Pin_proto+0x4 from  /github/Espruino/Espruino/obj/gen/jswrapper.o
.....
looks like for all _jswSysmbols_*
.....

I will keep this localy until someone comes up with a propper solution for this on Mac's.

@MaBecker
Copy link
Contributor Author

Pretty sure this is Mac specific - works fine on Linux

Well, I guess it's more a gcc version thing ;-)

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

No branches or pull requests

3 participants