node-report fails compilation for smartos #50
Comments
@rnchamberlain moved over to right repo |
I think |
I can't remember exactly what it is being used for, but |
The features.h include is in a slightly odd block (if not windows, then if not apple or aix - it should probably be I tried that on citgm and unsurprisingly it still didn't compile, that was due to an issue with one of the ulimit constants in node_report.cc. The more general problem is that node_report.cc uses a lot of OS specific function to gather it's information. Just correcting the #ifdef's isn't enough, we'd need to add proper support for ulimits, stack walking, reading the command line and so on. For example at the moment the loaded libraries section will be empty on smartos as there's no #ifdef case in there for it. It's probably not too difficult to add that function but it would require access to a smartos box to do it. Without that work node-report would probably be rather light on content on smartos. |
I took a quick look, and I have some preliminary porting advice:
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <link.h>
#include <limits.h>
#include <sys/mman.h>
#include <err.h>
int
main(int argc, char *argv[])
{
Link_map *p;
if (dlinfo(RTLD_SELF, RTLD_DI_LINKMAP, &p) == -1) {
errx(1, "dlinfo failure: %s\n", dlerror());
}
for (Link_map *l = p; l != NULL; l = l->l_next) {
fprintf(stderr, " %s\n", l->l_name);
}
} Seems to do roughly what you might expect:
|
The AIX similarities makes sense, on the tangled Unix family tree SmartOS is probably on a closer branch to AIX than Linux. (Assuming I've got my origins right, I might not!) Obviously not everything is the same. If it's not too much of an abuse of the CI hardware the development could probably be done batch mode by submitting branches https://ci.nodejs.org/view/post-mortem/job/nodereport-continuous-integration/ (I think the builds can be restricted down to one machine type). I'm not sure if that's against the CI etiquette though. Otherwise it's a question of getting login access to a SmartOS box. |
We do have a process were we can get you access to one of the smartos boxes https://github.com/nodejs/build/blob/master/doc/process/special_access_to_build_resources.md. I think it depends on how many iterations you think it might take in the CI. The job runs quite quickly for node-report so running it a 50-100 times (or more) is probably less of an impact than taking the machine off-line while you investigated once you had access. I agree that in general just the CI to develop is not a good way to go, but if we think we'll be able to figure it out in a reasonable number of iterations it may be the right way in this case. |
We've got a couple of refactoring PR's outstanding, the rename to node-report and switching to use C++ streams to support getReport. Once those are merged I'll take a look at getting node-report (as it will be) compiling on SmartOS machines. (Edit: I forgot about the linter PR - that'll add a lot of changes too!) I doubt it'll require too many iterations really but there's no sense doing it right before that and having to make more changes afterwards. (Hopefully that means doing it around the start of next week.) |
PR #62 landed, CI tests now passing on smartos: |
Running in CI node-report seems to fail compilation on smartos
https://ci.nodejs.org/view/post-mortem/job/nodereport-continuous-integration/39/MACHINE=smartos15-64/console
The text was updated successfully, but these errors were encountered: