-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Node-{arduino-firmata,cylon,hid,serialport}: allow compilation with CONFIG_AUTOREMOVE
#7652
Conversation
@thess, you've helped me with some difficult ones, tell me what you think of this one. |
Working on a few minor tweaks -- you have got the right idea. The post install cleanup in node-serialport is referencing node-hid path. I'm also not sure why the node-hid and node-serialport packages are so much larger than the other node-xxx packages? |
I disagree with you assessment of AUTOREMOVE. Build fails (here at least) because it can't find the node sources passed on as the The way these node packages work is not really ideal for the openwrt build system. They download their dependencies using the current version, and build them as needed. There is a provision in their build files to lock the versions, but irrc, it has to be done at every level. If you really want to dig deep into this, you can take a look at the huge node-mozila-iot-gateway. At one point, as I started adding openssl compatibility, it built 1741 dependent packages. I needed to patch one of those dependent packages. See #6088, if you wish. Thankfully, they updated it and dropped crypto support, so the need for patches went away. However, it exposes the unpredictable nature of the way they are built. I'm writing this from memory, BTW. To really fix this, we would need to add these 1741 packages, or at least add them to a list, like many packages do with modules, so that they can be built predictably. How often do you think a version bump will occur? About the node-hid references by node-serialport (this is wrong, see next message) |
On a second thought, this was my bad copying and pasting stuff from one package to the other in 93d6d1b 🤦♂️. I will add a commit to fix this right away. node-arduino-firmata is the one removing the node-serialport it builds:
|
IIRC - the serialport path ends with something like Also, the PREFIX var needs to be removed and use the |
I’ll add a commit, probably on Tuesday. |
I've added a commit changing |
2417d15
to
f004287
Compare
@thess |
Given the age of the PR, I would guess all you need to do is rebase from master to pick up the SDK file version change in the CCI script. The new script will not fall victim to this particular issue going forward. |
It breaks buildbot compilation, as the node build dir is cleared before node-cylon gets built. Use files installed in staging_dir instead. Signed-off-by: Eneas U de Queiroz <[email protected]>
It breaks buildbot compilation, as the node build dir is cleared before node-hid gets built. Use files installed in staging_dir instead. Signed-off-by: Eneas U de Queiroz <[email protected]>
It breaks buildbot compilation, as the node build dir is cleared before node-serialport gets built. Use files installed in staging_dir instead. Signed-off-by: Eneas U de Queiroz <[email protected]>
It breaks buildbot compilation, as the node build dir is cleared before node-arduino-firmata gets built. Use files installed in staging_dir instead. Signed-off-by: Eneas U de Queiroz <[email protected]>
This is a fixup for a copy & paste done in 93d6d1b. Signed-off-by: Eneas U de Queiroz <[email protected]>
Signed-off-by: Eneas U de Queiroz <[email protected]>
Signed-off-by: Eneas U de Queiroz <[email protected]>
Signed-off-by: Eneas U de Queiroz <[email protected]>
Signed-off-by: Eneas U de Queiroz <[email protected]>
lang/node-serialport/Makefile
Outdated
@@ -56,6 +56,7 @@ define Build/Compile | |||
npm install --build-from-source --target_arch=$(CPU) -g \ | |||
--prefix="$(PKG_INSTALL_DIR)/usr/" \ | |||
`npm pack $(PKG_BUILD_DIR) | tail -n 1` | |||
if test -d ~/npm-global; then ls -alR ~/npm-global/; false; else true; fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we all would prefer it if one does not put "debug" code in their submissions for us to review - and waste time.
You should be able to test in your own environment by either building with the SDK or setting up your own CircleCI account and use a test branch if you want to debug with our CI scripts and setup.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that. I've never used the CircleCI before, and don't know how to mimic the buildbots exactly, and that's why I sometimes struggle to fix some build failures. Can you give me a pointer to get started?
For example, I don't get any files in ~/npm-global, so I don't know what is getting copied.
f3b40f8
to
c6b49af
Compare
@nxhack is taking over these, and he has a different way of building them that will avoid this altogether, so I'm closing this. |
Maintainer: @blogic
Compile tested: ramips, mipsel_74kc, openwrt master
Run tested: none
Description:
node-arduino-firmata, node-cylon, node-hid, and node-serialport all set
npm_config_nodedir
to node's build dir. When the buildbots, or buildpr build the packages, they do a clean-build, clearing up node's build dir. Normally using node's build dir is the best way to do it, but it is not the only way. It can be set toSTAGING_DIR/usr
, and it will pickup the include files installed there.I can't properly run-test this. I've compile-tested the packages, and compared the resulting files. These packages install some (all?) of their build files, so the files don't match exactly. More specifically, files like this:
There's no
build_dir/target-mipsel_74kc_musl/node-v8.12.0/include/node
, but there isstaging_dir/target-mipsel_74kc_musl/usr/include/node
where node installs its headers.More important, the resulting binaries are all the same.
I have concerns about the
deps
directories, and even copied them under staging_dir/usr/deps, but they did not make any difference in the final binaries. What tipped me into not wanting to copy them was the presence of openssl headers there. They are from version 1.0.2, but the packages all compile with openwrt/openwrt#965 (choosing version 1.1.1), and there's indication that openwrt 19.01 should use openssl 1.1.1. Packages should not work if you mix 1.0.2 headers with 1.1.1 libraries, given the overwhelming changes in API.Another alternatives are:
Signed-off-by: Eneas U de Queiroz [email protected]