bison and flex broken in Angstrom distribution for beaglebone

I was just trying to build a program that uses bison and flex and the build failed due to hardcoded links in the bison and flex binaries to x86_64 versions of m4.

For bison, the hardcoded link is (using strace to show the exec call):

For flex, the hardcoded link is:

After setting up symbolic links to the hardcoded paths, I was able to get it to build.

I tried posting this to the Angstrom developer list but it didn’t seem to want to make it through.

I finally ran into this same issue. So sorry for it taking so long. This was fairly low-priority at the time and something I’d expect to hit many OE users on many other platforms, but it seems to be broken in even recent builds. Sample flex script was started from

For now, I’ve worked-around this issue by rebuilding natively. I did the below from a directory (/mnt) with plenty of space.
tar xjf flex-2.5.35.tar.bz2?r=&ts=1380059953&use_mirror=softlayer-dal

cd flex-2.5.35

make install

Be sure that /usr/local/bin is in your path ahead of /usr/bin.

The result seems to produce valid output, but I’m still getting:

root@beaglebone:~# flex flex_test.l
flex: fatal internal error, exec failed
root@beaglebone:~# strace flex flex_test.l 2>&1 | tail
— SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21309, si_status=0, si_utime=0, si_stime=0} —
munmap(0xb6f2f000, 4096) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 21309
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 21307
— SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21307, si_status=0, si_utime=1, si_stime=1} —
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 21308
— SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21308, si_status=0, si_utime=15, si_stime=1} —
wait4(-1, 0xbebb0b8c, 0, NULL) = -1 ECHILD (No child processes)
exit_group(0) = ?
+++ exited with 0 +++

I’m not enough of an OE expert to fix it quickly, but I’ll raise the issue.