Skip to contentSkip to conversation

New: flex and m4 problems

Buildroot bugzilla at busybox.net 1 participant 4 messages Mar 27, 2012 – May 26, 2013

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=4988

Summary: flex and m4 problems
Product: buildroot
Version: 2012.02
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: develop at kristov.de
CC: buildroot at uclibc.org
Estimated Hours: 0.0

Created attachment 4196
--> https://bugs.busybox.net/attachment.cgi?id=4196
adds BR2_PACKAGE_M4 as dependency

Hello,

there is a problem installing flex to the target area. flex ultimatively depends on m4 at run-time (see [1]), but this is not accounted for in the buildroot's flex.mk. Worse, the flex binary includes a fully qualified path to the host area's m4 (see main.c and the use of the M4 define, set in config.h). This is wrong for both flex installed to the staging area and flex installed to the target area.

I attached three patches to solve these problems. The first patch (Config.in.diff) adds BR2_PACKAGE_M4 to flex/Config.in. The second patch (flex.mk.diff) uses the M4 environment variable to force the configure script not to look for the host's m4 tool but to assume /usr/bin/m4. The last patch (flex-2.5.35-fix-cross-compiling.patch) disables checking the features of the cross m4 and it prevents the tools from being built as they reference the target m4 tool in an incompatible way.

Regards,

Christoph Schulz

[1] http://flex.sourceforge.net/manual/M4-Dependency.html

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 4988] flex and m4 problems

https://bugs.busybox.net/show_bug.cgi?id=4988

--- Comment #1 from Christoph Schulz <[email protected]> 2012-03-27 09:38:59 UTC --- Created attachment 4202
--> https://bugs.busybox.net/attachment.cgi?id=4202
fixes the path to the m4 tool used to /usr/bin/m4

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 4988] flex and m4 problems

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=4988

--- Comment #2 from Christoph Schulz <[email protected]> 2012-03-27 09:39:35 UTC --- Created attachment 4208
--> https://bugs.busybox.net/attachment.cgi?id=4208
fixes cross-compiling issues with flex and m4

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 4988] flex and m4 problems

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=4988

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Thomas Petazzoni <[email protected]> 2013-05-26 14:12:49 UTC --- Thanks, I've adapted your patches 1 and 2 to the latest Buildroot (after doing
some minor improvements). However, your patch 3 was not necessary here. Maybe
some other change in flex had fixed the problem.

I'm marking the bug as fixed, I will send the patch later today on the mailing list.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.