Hi Max,

it appears you are using an outdated NuttX and/or board config

During the compilation using out .config I got some errors:

In file included from nuttxspace/nuttx/sched/mqueue/mqueue.h:38,
                 from group/group_leave.c:44:
nuttxspace/nuttx/include/nuttx/mqueue.h:103:26: error:
'CONFIG_FS_MQUEUE_NPOLLWAITERS' undeclared here (not in a function);
did you mean 'CONFIG_SERIAL_NPOLLWAITERS'?
  103 |   FAR struct pollfd *fds[CONFIG_FS_MQUEUE_NPOLLWAITERS];
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                          CONFIG_SERIAL_NPOLLWAITERS
make[1]: *** [Makefile:57: group_leave.o] Error 1


You config is missing some new symbols:
CONFIG_NFILE_DESCRIPTORS_PER_BLOCK=8
CONFIG_FS_MQUEUE_NPOLLWAITERS=4
etc

Please update ("git pull") you nuttx and apps and then execute:

$ make distclean
$ ./tools/configure.sh stm32f4discovery:usbnsh
$ make

Now everything will work correctly.

BR,

Alan

On 4/22/21, Max Kriegleder <max.kriegle...@gmail.com> wrote:
> Yes, I am getting this error.
>
> NuttShell (NSH) NuttX-10.1.0
> nsh> nsh: nsh_session: readline failed: 9
>
> I haven't used NuttX on this board for a while, so I cannot say when
> this broke. I have attached the .config file, should be the
> auto-generated config file based on stm32f4discovery/configs/usbnsh
>
> Thanks!
>
>
> On 2021/04/20 22:26:25, Alan Carvalho de Assis <a...@gmail.com> wrote:
>  > Are you getting this error:>
>  >
>  > "nsh> nsh: nsh_session: readline failed: 9">
>  >
>  > Could you please share your .config file?>
>  >
>  > BR,>
>  >
>  > Alan>
>  >
>  > On 4/20/21, Max Kriegleder <ma...@gmail.com> wrote:>
>  > > Strange.. I have sent two mails prior to this one and apparently they>
>  > > did not make it to the list. Trying again:>
>  > >>
>  > > Were you able to fix this problem? I am running nuttx-10.0.1 on a>
>  > > stm32f4discovery board and I have the same issue.>
>  > >>
>  > > Thanks!>
>  > >>
>  > >>
>  > > On 2021/04/17 22:56:48, Alan Carvalho de Assis <a....@gmail.com>
> wrote:>
>  > > > I just received it!>>
>  > > >>
>  > > > Try to submit a new email>>
>  > > >>
>  > > > On 4/17/21, Max Kriegleder <ma...@gmail.com> wrote:>>
>  > > > > Is anybody reading this? I am not sure why my messages get
> lost.. how>>
>  > > > > can I post to the message list?>>
>  > > > >>>
>  > > > > On 2020/12/13 22:19:01, Brennan Ashton <b....@brennanashton.com>>
>  > > wrote:>>
>  > > > > > Yeah 100% agree which is why I need to look when I have a
> little>
>  > > more>>>
>  > > > > > time to understand what is going on.>>>
>  > > > > >>>
>  > > > > > On Sun, Dec 13, 2020 at 2:12 PM Gregory Nutt <sp...@gmail.com>>
>  > > wrote:>>>
>  > > > > > >>>>
>  > > > > > > See>>>
>  > > > > > >>>
>  > > > >>
>  > >
> https://mail-archives.apache.org/mod_mbox/nuttx-dev/202012.mbox/%3CCAKFLXYwes3pcDA2zXsL2FcwgCS4PecdmiP9srkGEtTaOoLEhMg%40mail.gmail.com%3E>>>
>
>
>  > >>
>  > >>
>  > > > >>>
>  > > > >>>
>  > > > > > >>>>
>  > > > > > > I don't think this is the correct solution since with Xiao>
>  > > Xiang's>>>
>  > > > > > > recent changes, stdin should never be closed. But it does
> give>
>  > > some>>>
>  > > > > > > clues about the nature of the problem: stdin is no valid;>
>  > > stdout is>>
>  > > > > okay>>>
>  > > > > > >>>>
>  > > > > > > On 12/13/2020 4:07 PM, Brennan Ashton wrote:>>>
>  > > > > > > > This is impacting all the usbnsh configurations. I can take>
>  > > another>>>
>  > > > > > > > look later this evening>>>
>  > > > > > > > https://github.com/apache/incubator-nuttx/pull/2526>>>
>  > > > > > > >>>>
>  > > > > > > > --Brennan>>>
>  > > > > > > >>>>
>  > > > > > > > On Fri, Dec 11, 2020 at 5:05 AM Gregory Nutt
> <sp...@gmail.com>>>
>  > > > > wrote:>>>
>  > > > > > > >> Several other PRs specifically removed support for fclose>>
>  > > > > (stdin). Are>>>
>  > > > > > > >> you certain you want to restore it? I think this needs
> more>>
>  > > > > analysis>>>
>  > > > > > > >> and resolution with the previous changes that removed the>>
>  > > > > fclose() of>>>
>  > > > > > > >> stdin, stdout, and stderr.>>>
>  > > > > > > >>>>>
>  > > > > > > >> On 12/10/2020 5:37 PM, Masayuki Ishikawa wrote:>>>
>  > > > > > > >>> Suzuki-san,>>>
>  > > > > > > >>>>>>
>  > > > > > > >>> Please send a PR (Pull Request) to>>>
>  > > > > > > >>> https://github.com/apache/incubator-nuttx-apps/>>>
>  > > > > > > >>>>>>
>  > > > > > > >>> On Thu, Dec 10, 2020 at 5:24 PM SUZUKI Keiji>
>  > > <zu...@gmail.com>>>
>  > > > > wrote:>>>
>  > > > > > > >>>>>>
>  > > > > > > >>>> Hi,>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> I use STM32F407G-DISC1 (MB997D) and build nuttx on
> macOS>>
>  > > > > Mojave (10.14.6).>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> The following error occurs with the default
> configuration>
>  > > of>>>
>  > > > > > > >>>> stm32f4discovery:usbnsh.>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> NuttShell (NSH) NuttX-10.0.0>>>
>  > > > > > > >>>> nsh> nsh: nsh_session: readline failed: 9>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> The reason seems that instream->fs_fd is -1 instead of
> 0 in>>
>  > > > > the readline()>>>
>  > > > > > > >>>> function called by>>>
>  > > > > > > >>>> nsh_session().>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> This error occurs in version 10.0-RC0 and after (I
> checked>>
>  > > > > 10.0-RC0, 10.0>>>
>  > > > > > > >>>> and current master)>>>
>  > > > > > > >>>> but does not occur in 9.1 and before (I checked 9.1,
> 8.2 and>>
>  > > > > 7.31).>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> The following patch fixed it in my environment but I
> don't>>
>  > > > > know this is a>>>
>  > > > > > > >>>> correct fix.>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> === from here ===>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> diff --git a/nshlib/nsh_usbconsole.c>
>  > > b/nshlib/nsh_usbconsole.c>>>
>  > > > > > > >>>> index 28f63bcc..768a621b 100644>>>
>  > > > > > > >>>> --- a/nshlib/nsh_usbconsole.c>>>
>  > > > > > > >>>> +++ b/nshlib/nsh_usbconsole.c>>>
>  > > > > > > >>>> @@ -77,8 +77,8 @@>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> static void nsh_configstdio(int fd, FAR struct>
>  > > console_stdio_s>>
>  > > > > *pstate)>>>
>  > > > > > > >>>> {>>>
>  > > > > > > >>>> - /* Make sure the stdout, and stderr are flushed */>>>
>  > > > > > > >>>> ->>>
>  > > > > > > >>>> + /* Make sure the stdin is closed and the stdout, and>
>  > > stderr>>
>  > > > > are flushed>>>
>  > > > > > > >>>> */>>>
>  > > > > > > >>>> + fclose(stdin);>>>
>  > > > > > > >>>> fflush(stdout);>>>
>  > > > > > > >>>> fflush(stderr);>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> @@ -88,6 +88,9 @@ static void nsh_configstdio(int fd,
> FAR>
>  > > struct>>>
>  > > > > > > >>>> console_stdio_s *pstate)>>>
>  > > > > > > >>>> dup2(fd, 1);>>>
>  > > > > > > >>>> dup2(fd, 2);>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> + /* fdopen stdin */>>>
>  > > > > > > >>>> + fdopen(0, "r");>>>
>  > > > > > > >>>> +>>>
>  > > > > > > >>>> /* Setup the stdout */>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> pstate->cn_outfd = 1;>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> =====>>>
>  > > > > > > >>>>>>>
>  > > > > > > >>>> Thanks,>>>
>  > > > > > > >>>> SUZUKI Keiji>>>
>  > > > > > > >>>>>>>
>  > > > > >>>
>  > > > >>>
>  > > >>
>  > >>
>  >
>

Reply via email to