* [lttng-dev] Change to CPU number detection breaks QNX compilation
@ 2022-08-13 23:10 Elad Lahav via lttng-dev
2022-08-15 13:53 ` Michael Jeanson via lttng-dev
0 siblings, 1 reply; 7+ messages in thread
From: Elad Lahav via lttng-dev @ 2022-08-13 23:10 UTC (permalink / raw)
To: lttng-dev
Hello,
I have just downloaded and built the library for QNX/aarch64 and
noticed that the code in compat-smp.h breaks the build. This file
appears to be a (very) recent addition, from this commit:
---
commit 5cfe81b7ddff9543d451746de9965cac58c67182
Author: Michael Jeanson <mjeanson@efficios.com>
Date: Wed Jul 27 10:44:00 2022 -0400
fix: sysconf(_SC_NPROCESSORS_CONF) can be less than max cpu id
---
I started working around it, but it got a bit ugly. Is the change not
a Linuxism? Does it make sense on other systems? If QNX is the
exception then I can try to come up with a patch, but if not perhaps
the entire code should be wrapped by #ifdef __linux__?
--Elad
_______________________________________________
lttng-dev mailing list
lttng-dev@lists.lttng.org
https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [lttng-dev] Change to CPU number detection breaks QNX compilation 2022-08-13 23:10 [lttng-dev] Change to CPU number detection breaks QNX compilation Elad Lahav via lttng-dev @ 2022-08-15 13:53 ` Michael Jeanson via lttng-dev [not found] ` <CAJbg=FWjjBT1RbGxvCcx1+6qgJfhqtF3h3WpLB11cGSb1Efzqw@mail.gmail.com> 0 siblings, 1 reply; 7+ messages in thread From: Michael Jeanson via lttng-dev @ 2022-08-15 13:53 UTC (permalink / raw) To: lttng-dev On 2022-08-13 19 h 10, Elad Lahav via lttng-dev wrote: > Hello, > > I have just downloaded and built the library for QNX/aarch64 and > noticed that the code in compat-smp.h breaks the build. This file > appears to be a (very) recent addition, from this commit: > > --- > commit 5cfe81b7ddff9543d451746de9965cac58c67182 > Author: Michael Jeanson <mjeanson@efficios.com> > Date: Wed Jul 27 10:44:00 2022 -0400 > > fix: sysconf(_SC_NPROCESSORS_CONF) can be less than max cpu id > > --- > > I started working around it, but it got a bit ugly. Is the change not > a Linuxism? Does it make sense on other systems? If QNX is the > exception then I can try to come up with a patch, but if not perhaps > the entire code should be wrapped by #ifdef __linux__? > > --Elad Hi, We'll need more details on the build failure you are seeing, there is already an '#ifdef __linux__' in 'src/compat-smp.h'. Can you send the relevant build errors? Michael _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAJbg=FWjjBT1RbGxvCcx1+6qgJfhqtF3h3WpLB11cGSb1Efzqw@mail.gmail.com>]
* Re: [lttng-dev] Change to CPU number detection breaks QNX compilation [not found] ` <CAJbg=FWjjBT1RbGxvCcx1+6qgJfhqtF3h3WpLB11cGSb1Efzqw@mail.gmail.com> @ 2022-08-15 15:55 ` Michael Jeanson via lttng-dev 2022-08-15 16:56 ` Elad Lahav via lttng-dev 0 siblings, 1 reply; 7+ messages in thread From: Michael Jeanson via lttng-dev @ 2022-08-15 15:55 UTC (permalink / raw) To: Elad Lahav; +Cc: lttng-dev On 2022-08-15 10 h 04, Elad Lahav wrote: > The problem is the use of d_type as a member of the dirent structure. > POSIX does not define such a member. > I can provide the necessary code for getting the file type in a > readdir() loop on QNX, but it seems unnecessary given that there is no > /sys file system with CPU information. The method for getting > information on processors is different, and I suspect that is true for > *BSDs and other non-Linux OSs. > > --Elad Can you try this patch [1] to see if it fixes the build on QNX? Can you also run 'make check' in 'tests/unit', the linux specific tests should be skipped. Michael [1] https://review.lttng.org/c/userspace-rcu/+/8664 _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [lttng-dev] Change to CPU number detection breaks QNX compilation 2022-08-15 15:55 ` Michael Jeanson via lttng-dev @ 2022-08-15 16:56 ` Elad Lahav via lttng-dev 2022-08-15 17:39 ` Michael Jeanson via lttng-dev 0 siblings, 1 reply; 7+ messages in thread From: Elad Lahav via lttng-dev @ 2022-08-15 16:56 UTC (permalink / raw) To: Michael Jeanson; +Cc: lttng-dev That fixes the build, thanks. I see some errors coming out of "make check", though: ERROR: test_get_cpu_mask_from_sysfs - missing test plan ERROR: test_get_cpu_mask_from_sysfs - exited with status 1 --Elad On Mon, 15 Aug 2022 at 11:55, Michael Jeanson <mjeanson@efficios.com> wrote: > > On 2022-08-15 10 h 04, Elad Lahav wrote: > > The problem is the use of d_type as a member of the dirent structure. > > POSIX does not define such a member. > > I can provide the necessary code for getting the file type in a > > readdir() loop on QNX, but it seems unnecessary given that there is no > > /sys file system with CPU information. The method for getting > > information on processors is different, and I suspect that is true for > > *BSDs and other non-Linux OSs. > > > > --Elad > > Can you try this patch [1] to see if it fixes the build on QNX? Can you > also run 'make check' in 'tests/unit', the linux specific tests should > be skipped. > > Michael > > [1] https://review.lttng.org/c/userspace-rcu/+/8664 _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [lttng-dev] Change to CPU number detection breaks QNX compilation 2022-08-15 16:56 ` Elad Lahav via lttng-dev @ 2022-08-15 17:39 ` Michael Jeanson via lttng-dev 2022-08-15 17:52 ` Elad Lahav via lttng-dev 0 siblings, 1 reply; 7+ messages in thread From: Michael Jeanson via lttng-dev @ 2022-08-15 17:39 UTC (permalink / raw) To: Elad Lahav; +Cc: lttng-dev On 2022-08-15 12 h 56, Elad Lahav wrote: > That fixes the build, thanks. > > I see some errors coming out of "make check", though: > > ERROR: test_get_cpu_mask_from_sysfs - missing test plan > ERROR: test_get_cpu_mask_from_sysfs - exited with status 1 > > --Elad I tested on Freebsd (as a non-linux target) and I get the expected : SKIP: test_get_cpu_mask_from_sysfs - Skip Linux specific tests. I wonder what might differ here, it might have to do with the version of bash on QNX, I'm not familiar with this platform. Michael _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [lttng-dev] Change to CPU number detection breaks QNX compilation 2022-08-15 17:39 ` Michael Jeanson via lttng-dev @ 2022-08-15 17:52 ` Elad Lahav via lttng-dev 2022-08-16 15:20 ` Michael Jeanson via lttng-dev 0 siblings, 1 reply; 7+ messages in thread From: Elad Lahav via lttng-dev @ 2022-08-15 17:52 UTC (permalink / raw) To: Michael Jeanson; +Cc: lttng-dev /bin/sh on QNX is (by default) ksh, not bash, so perhaps that's the issue. Shouldn't block you from submitting that change. +1 from me, if that matters ;-) --Elad On Mon, 15 Aug 2022 at 13:39, Michael Jeanson <mjeanson@efficios.com> wrote: > > On 2022-08-15 12 h 56, Elad Lahav wrote: > > That fixes the build, thanks. > > > > I see some errors coming out of "make check", though: > > > > ERROR: test_get_cpu_mask_from_sysfs - missing test plan > > ERROR: test_get_cpu_mask_from_sysfs - exited with status 1 > > > > --Elad > > I tested on Freebsd (as a non-linux target) and I get the expected : > > SKIP: test_get_cpu_mask_from_sysfs - Skip Linux specific tests. > > I wonder what might differ here, it might have to do with the version of > bash on QNX, I'm not familiar with this platform. > > Michael _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [lttng-dev] Change to CPU number detection breaks QNX compilation 2022-08-15 17:52 ` Elad Lahav via lttng-dev @ 2022-08-16 15:20 ` Michael Jeanson via lttng-dev 0 siblings, 0 replies; 7+ messages in thread From: Michael Jeanson via lttng-dev @ 2022-08-16 15:20 UTC (permalink / raw) To: Elad Lahav; +Cc: lttng-dev On 2022-08-15 13 h 52, Elad Lahav wrote: > /bin/sh on QNX is (by default) ksh, not bash, so perhaps that's the issue. > > Shouldn't block you from submitting that change. +1 from me, if that matters ;-) > > --Elad I'll get this merged. Thanks, Michael _______________________________________________ lttng-dev mailing list lttng-dev@lists.lttng.org https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-08-16 15:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-13 23:10 [lttng-dev] Change to CPU number detection breaks QNX compilation Elad Lahav via lttng-dev
2022-08-15 13:53 ` Michael Jeanson via lttng-dev
[not found] ` <CAJbg=FWjjBT1RbGxvCcx1+6qgJfhqtF3h3WpLB11cGSb1Efzqw@mail.gmail.com>
2022-08-15 15:55 ` Michael Jeanson via lttng-dev
2022-08-15 16:56 ` Elad Lahav via lttng-dev
2022-08-15 17:39 ` Michael Jeanson via lttng-dev
2022-08-15 17:52 ` Elad Lahav via lttng-dev
2022-08-16 15:20 ` Michael Jeanson via lttng-dev
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).