So I’m new to all this and my coding experience is still pretty low. I’m trying to follow the watchface tutorial with CloudPebble, and after I have completed the section with weather data, I get a build error and I’m unable to solve it. Here’s the complete line from build log:
/root/.pebble-sdk/SDKs/4.9.169/toolchain/arm-none-eabi/bin/../lib/gcc/arm-none-eabi/14.2.1/../../../../arm-none-eabi/bin/ld: warning: /tmp/tmpn0julj32/build/emery/pebble-app.elf has a LOAD segment with RWX permissions
It repeats on every device build, so I unchecked all the other devices from settings to only build on Emery to save time.
I’ve painstakingly gone through all the code and compared it to the original source on github and I can’t find anything. And with the CloudPebble I don’t see any way to view or edit any other files like the error message suggests. Any ideas?
Hi! Good news: this isn’t actually breaking your build. That line starts with ld: warning: rather than error:, which means the linker is just flagging something it wants you to know about, not refusing to produce output. If you scroll a bit further down in the build log, you should see the build complete successfully and produce a .pbw you can install.
What’s happening: we recently bumped the toolchain to a newer GCC (14.2.1), and newer ld versions are stricter about flagging executables that have a memory segment marked readable, writable, and executable at the same time. On a desktop OS that combo is a security concern, but on Pebble it’s just how apps have always been laid out! Nothing in your code is causing it, and every Pebble app builds with this warning now. The older toolchain didn’t print the message, but the underlying situation is unchanged. It’s safe to ignore, and we’ll quiet it down on our end in a future SDK update.
And you were right that there’s nothing to fix in your code! You can re-enable the other device targets and your watchface should install and run fine!
Thank you for a quick reply. The problem is, the build fails and won’t install on the emulator (I don’t yet have the actual device). Maybe the problem is something else, but that line I pasted is the only one that caught my eye on the build log. Should I paste the whole log?
By looking at the build log, there was a line about a index.js missing, so I tried adding an empty JS file and now it works. I have no idea why it needs that empty file to exist in the first place.