Trying to compile pcsclite from debian

I am trying to compile pcsclite from svn://

opkg install libusb-1.0-dev
svn co svn://
cd trunk
./configure --enable-libusb --disable-libudev

apart from the fact that pod2man is not found so it can not make some documentation,

the build fails on:

LEX configfile.c
flex: fatal internal error, exec failed
make[3]: *** [configfile.c] Error 141

I read somewhere else that flex was not pointing to the right m4 executable, but I could not find anything about that.

Has anybody else experience with flex on Angstrom?

Did you find a solution?

I’m trying to use PCSCon a begalebone with angstron without any succes… any help will be apreciated!


Did you find a solution?

No not yet. actually I am waiting until BeagleBoard officially will start using Debian instead of Angstrom (which they announced in january informally)

Why are you waiting?


Because of:

No, the real reason was I am completely swamped with other work at the moment. I’ll get around to testing next week (I hope).

For more options, visit

You received this message because you are subscribed to a topic in the Google Groups “BeagleBoard” group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
For more options, visit

Johan Henselmans

you mean:

<cough> </cough>

i need to get the email out..


The problem is peculiar to some Angstrom images such as the v2012.12 one. Turns out /usr/bin/flex uses a hard-wired reference to the m4 executable where it lay on the machine where the Angstrom image was cross-compiled! (Thanks to Rob Clark for finding this out, The ugly but simple fix is to create a symbolic link at the place flex looks for m4:

mkdir -p /build/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/x86_64-linux/usr/bin

ln -s /usr/bin/m4 /build/v2012.12/build/tmp-angstrom_v2012_12-eglibc/sysroots/x86_64-linux/usr/bin/m4

You can find the path by using a hex editor to look at the /usr/bin/flex binary (search for /m4).

Or you can define the M4 environment variable before calling flex:

M4=/usr/bin/m4 flex .l