Page 1 of 1

Coreutils impossible to compile and bash pipes

Posted: Sun Dec 21, 2008 9:39 am
by AlfaOmega08
My kernel is finally able to execute bash. Now I want to port coreutils using my cross-compiler.

When configuring the script exit with this error:

Code: Select all

checking for listmntent... no
checking for getmntinfo... no
checking for sys/ucred.h... no
checking for sys/mount.h... (cached) yes
checking mntent.h usability... no
checking mntent.h presence... no
checking for mntent.h... no
checking for sys/fs_types.h... (cached) no
checking for struct fsstat.f_fstypename... no
checking for library containing getmntent... no
checking for getmntent... no
checking for listmntent of Cray/Unicos-9... no
checking for mntctl function and struct vmount... no
checking for getfsstat function... no
checking for FIXME existence of three headers... no
checking for getmntinfo function... no
checking for getmnt function... no
checking for next_dev... no
checking for fs_stat_dev... no
checking fs_info.h usability... no
checking fs_info.h presence... no
checking for fs_info.h... no
checking for BEOS mounted file system support functions... no
checking whether it is possible to resort to fread on /etc/mnttab... no
configure: error: could not determine how to read list of mounted file systems
Someone knows how to make it work?

The only problem I got with bash are pipes. If I execute e.g. "ls | grep ..", I receive a page fault.
Do I need some special syscall to handle pipes?

Re: Coreutils impossible to compile and bash pipes

Posted: Mon Dec 22, 2008 9:45 am
by jal
AlfaOmega08 wrote:configure: error: could not determine how to read list of mounted file systems[/code]

Well, assuming you are running this on your OS, it probably needs some syscalls you haven't implemented?
The only problem I got with bash are pipes. If I execute e.g. "ls | grep ..", I receive a page fault.
Do I need some special syscall to handle pipes?
exec, and, what's it dup or something?, to get stdin/out to be linked. But really, it should be rather straigtforward to debug, right? Or have you just compiled bash without a clue what's in it?


JAL

Re: Coreutils impossible to compile and bash pipes

Posted: Mon Dec 22, 2008 10:24 am
by JamesM
jal wrote:
AlfaOmega08 wrote:configure: error: could not determine how to read list of mounted file systems[/code]

Well, assuming you are running this on your OS, it probably needs some syscalls you haven't implemented?
The only problem I got with bash are pipes. If I execute e.g. "ls | grep ..", I receive a page fault.
Do I need some special syscall to handle pipes?
exec, and, what's it dup or something?, to get stdin/out to be linked. But really, it should be rather straigtforward to debug, right? Or have you just compiled bash without a clue what's in it?


JAL
"pipe" and "dup2" are what's required.

Re: Coreutils impossible to compile and bash pipes

Posted: Mon Dec 22, 2008 2:47 pm
by jal
JamesM wrote:"pipe" and "dup2" are what's required.
Ah, yes, I haven't got a copy of POSIX in my head :). Anyway, it seems to me the OP could do much more research himself.


JAL

Re: Coreutils impossible to compile and bash pipes

Posted: Mon Dec 22, 2008 3:53 pm
by dosfan
I ran into the exact same problem while trying to cross compile GNU coreutils packages with newlib. I poked around the configure script a bit to no avail.

(Congrats on getting bash running, nice feeling isn't it?)