Bug 9721

Summary: version 2017.02: no acceptable m4 could be found in $PATH
Product: buildroot Reporter: louigi600
Component: OtherAssignee: unassigned
Status: RESOLVED INVALID    
Severity: normal CC: buildroot, yann.morin.1998
Priority: P5    
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Host: x86_64 Target: arm
Build:

Description louigi600 2017-03-10 09:59:52 UTC
using buildroot on slackware 14.2_x86_64 I get this error:
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.
package/pkg-generic.mk:206: recipe for target '/usr/src/buildroot-2017.02/output/build/host-libtool-2.4.6/.stamp_configured' failed
make: *** [/usr/src/buildroot-2017.02/output/build/host-libtool-2.4.6/.stamp_configured] Error 1

But I've m4 version 1.4.17 in path
root@desktopdbsm:/usr/src/buildroot-2017.02# echo $PATH
/usr/src/buildroot-2016.11.2/output/host/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/qt/bin:/usr/share/texmf/bin
root@desktopdbsm:/usr/src/buildroot-2017.02# type m4
m4 is /usr/bin/m4
root@desktopdbsm:/usr/src/buildroot-2017.02# m4 --version
m4 (GNU M4) 1.4.17
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Rene' Seindal.
root@desktopdbsm:/usr/src/buildroot-2017.02#
Comment 1 Peter Korsgaard 2017-03-10 12:21:55 UTC
Can you check in output/build/host-libtool-2.4.6/config.log to see why the m4 check fails?

I'm using m4 1.4.18 here without issues.
Comment 2 Yann E. MORIN 2017-03-10 19:53:04 UTC
host-libtool in Buildroot has a dependency on host-m4, so you should have
seen host-m4 build before host-libtool.

Can you verify this is the case?

Also, I see you are building as root. This is absolutely not necessary,
and it is greatly suggested that you do not do that. Furthermore, this
is known to cause build issues in some packages (at least nodejs is
impacted). Can you retry running as non-root?

Finally, I see that you are building in a sub-directory of /usr, which
has caused issues in the past. Can you try bulding in your user's home
instead?

In the meantime, I'll try a local build in a sub-dir os /usr to check
the issue has not resurfaced...

Regards,
Yann E. MORIN.
Comment 3 louigi600 2017-03-13 14:27:30 UTC
I think solved that issue that may have been induced (not sure how exactly maybe at some point it's looking in /proc/mounts) by working chroot without /sys /proc mountd on the chroot env. Unfortunately I don't have the failing logs anymore.
I've got it to compile now but I've other issues while using the built xtoolchain. 

I know it's not necessary to compile using root ... but appart from being superuser, root is just like any other user on the system.

I've seen some unix systems where the user homes are un /usr/home so that would be a subfolder of usr anyway ... that's another odd thing a folder is a folder and why should I not be able to build this from any folder I like to choose on my system ?
Comment 4 Yann E. MORIN 2017-03-13 15:17:14 UTC
> that may have been induced [...] by working chroot without /sys
> /proc mountd on the chroot env.

OK, so this was an environment problem. Closing the issue.

Thanks for the heads-up. :-)

> but appart from being superuser, root is just like any other user
> on the system.

And it is causing build isues when building nodejs, because nodejs'
buildsystem does not work correctly when running as root. This is a
fact and an issue we do have encountered.

> why should I not be able to build this from any folder I like to
> choose on my system?

Well, we try hard to make it work. However, we have had issues when
building in a sub-dir of /usr, because some packages' buildsystems
behave incorrectly in this case. That's not entirely Buikldroot's
fault, although it should work now.

Regards,
Yann E. MORIN.