-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
MBED: Missing cstddef #212
Comments
I'm getting the same(cstddef) error when I run |
I also tested gcc-arm-none-eabi / gcc-arm-none-eabi-49 and other brew/port sources, none of them worked, I'm guessing it's a mbed issue, rather than a tmk firmware issue directly, however it's preventing my usage of this firmware, it would be great if we could find a solution |
I just created a digitalocean ubuntu 14.04 64 droplet and it built fine on that. So I think you're right about it not being a tmk firmware issue directly. But I would also like to be able to build it on osx. |
LOL, why didn't I think of that! I should also use a virtual machine to take care of the compilation and use an actual machine to deploy the firmware, thanks a lot for the idea But like you mentioned, it's a lot less practical then using a normal machine I will probably give this a direct shot before going the virtual root: https://launchpad.net/gcc-arm-embedded |
Tested almost all launchpad binaries manually, the brew formulas also just integrate them, it's as simple as downloading them and adding them to path, they are pre-compiled, all of them have the same cstddef issue on osx |
I also had similar problem with GCC4.8 on Ubuntu 14.04. https://github.com/tmk/tmk_keyboard/wiki/mbed-cortex-porting |
@tmk
|
So what exactly in terry.guo's PPA is different than the PX4 one? Incredibly frustrating that there is no way to build firmwares on a Mac atm. |
On Mac GCC 4.9 and any versions are not solution. After some google searches I got my next random guess :) Do you have libc++ somewhere on your Mac? What if it is uninstalled? I don't have certain knowledge of GCC and C++, this may be completely wrong. https://gcc.gnu.org/libstdc++/ |
I think I've traced this down to the combination of C and C++ sources, which is basically what you said on Aug 21st. I'm working inside keyboard/infinity for reference here. This is the full error when I run
But, looking at matrix.c, I see that we want to be including Simply removing or renaming |
On case insensitive filesytems, Timer.h is found instead of timer.h. That causes problems if you don't have a full C++ toolchain: ``` In file included from ../../tmk_core/tool/mbed/mbed-sdk/libraries/mbed/api/timer.h:19:0, from matrix.c:4: ../../tmk_core/tool/mbed/mbed-sdk/libraries/mbed/api/platform.h:25:19: fatal error: cstddef: No such file or directory #include <cstddef> ^ compilation terminated. make: *** [build/matrix.o] Error 1 ``` This works around the issue by renaming the header to clearly indicate that it is a C++ include See tmk/tmk_keyboard#212 for some details on this.
I've missed or passed over last post of @uxp, this makes sense totally. Thanks. Root of the problem is clunky TMK build system but I was quite surprised at OSX filesystem case-insensitiveness, insane! you can curse it :D I think one of workaround is to fix order of directories in diff --git a/keyboard/infinity/Makefile b/keyboard/infinity/Makefile
index e740b6a..3e552f2 100644
--- a/keyboard/infinity/Makefile
+++ b/keyboard/infinity/Makefile
@@ -33,9 +33,9 @@ INCLUDE_PATHS = -I.
#MOUSEKEY_ENABLE = yes
+include $(TMK_DIR)/tool/mbed/common.mk
include mbed-infinity.mk
include $(TMK_DIR)/tool/mbed/mbed.mk
-include $(TMK_DIR)/tool/mbed/common.mk
include $(TMK_DIR)/tool/mbed/gcc.mk
program: $(OBJDIR)/$(PROJECT).bin This is another workaround but I prefer fix above. |
../../tmk_core/tool/mbed/mbed-sdk/libraries/mbed/api/platform.h:25:19: fatal error: cstddef: No such file or directory
I've tested at least 5 various arm/gcc sources, brew/port, couldn't move past this issue on a mac
On the other hand, the kiibohd/controller is able to build with most arm libraries
Generally, the build/readme's concentrate on AVR, it would be great to have some ARM instructions too
The text was updated successfully, but these errors were encountered: