westes / flex

The Fast Lexical Analyzer - scanner generator for lexing in C and C++
Other
3.62k stars 536 forks source link

Solaris and "Error: missing translation value" #375

Closed noloader closed 6 years ago

noloader commented 6 years ago

Sorry about the second report. This will be the last one.

I'm working on Solaris 11.3, x86_64, fully patched. Solaris is a ransomware platform that requires folks to purchase a contract to get updated tools. I don't have a support contract so I am stuck with some down-level tools.

I'm trying to build gnutls, which requires libunbound, which requires an updated flex due to Unbound bug 4131. After patching Flex's configure.ac I am able to make.

Attempting to build Flex v2.6.4 results in:

gcc -DHAVE_CONFIG_H -I.  -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -DNDEBUG   -g2 -O2 -m64 -march=native -fPIC -MT flex-tblcmp.o -MD -MP -MF .deps/flex-tblcmp.Tpo -c -o flex-tblcmp.o `test -f 'tblcmp.c' || echo './'`tblcmp.c
mv -f .deps/flex-tables_shared.Tpo .deps/flex-tables_shared.Po
/bin/sh ../build-aux/ylwrap scan.l lex.yy.c scan.c -- lex
"/export/home/jwalton/Build-Scripts/flex-2.6.4/src/scan.l":line 124: Error: missing translation value
gmake[2]: *** [scan.c] Error 1
gmake[2]: *** Waiting for unfinished jobs....
mv -f .deps/flex-tables.Tpo .deps/flex-tables.Po
mv -f .deps/flex-scanopt.Tpo .deps/flex-scanopt.Po
mv -f .deps/flex-tblcmp.Tpo .deps/flex-tblcmp.Po

That's the same bug as unbound has. It is the reason I am trying to upgrade Flex :)

In the case of Flex it might be a good idea to distribute the pre-flexed source files rather than trying to generate them on the fly. Or only generate them on the fly if you have GNU flex and not a broken one like Solaris.

In case it is needed:

$ lex -V
lex: Software Generation Utilities (SGU) Solaris-ELF (4.0)
westes commented 6 years ago

Are you building from the release tar ball? That includes the generated scanner, among other things.

It's not clear to me what translation value it's looking for, but if it's the gettext stuff, add --disable-nls to your configure options and re-run configure. (Or install a full suite of gettext utilities.)

On Friday, 20 July 2018, 5:52 am -0700, Jeffrey Walton notifications@github.com wrote:

Sorry about the second report. This will be the last one.

I'm working on Solaris 11.3, x86_64, fully patched. Solaris is a ransomware platform that requires folks to purchase a contract to get updated tools. I don't have a support contract so I am stuck with some down-level tools.

I'm trying to build gnutls, which requires libunbound, which requires an updated flex due to Unbound bug 4131. After patching Flex's configure.ac I am able to make.

Attempting to build Flex v2.6.4 results in:

gcc -DHAVE_CONFIG_H -I.  -DLOCALEDIR=\"/usr/local/share/locale\" -I/usr/local/include -DNDEBUG   -g2 -O2 -m64 -march=native -fPIC -MT flex-tblcmp.o -MD -MP -MF .deps/flex-tblcmp.Tpo -c -o flex-tblcmp.o `test -f 'tblcmp.c' || echo './'`tblcmp.c
mv -f .deps/flex-tables_shared.Tpo .deps/flex-tables_shared.Po
/bin/sh ../build-aux/ylwrap scan.l lex.yy.c scan.c -- lex
"/export/home/jwalton/Build-Scripts/flex-2.6.4/src/scan.l":line 124: Error: missing translation value
gmake[2]: *** [scan.c] Error 1
gmake[2]: *** Waiting for unfinished jobs....
mv -f .deps/flex-tables.Tpo .deps/flex-tables.Po
mv -f .deps/flex-scanopt.Tpo .deps/flex-scanopt.Po
mv -f .deps/flex-tblcmp.Tpo .deps/flex-tblcmp.Po

That's the same bug as unbound has. It is the reason I am trying to upgrade Flex :)

In the case of Flex it might be a good idea to distribute the pre-flexed source files rather than trying to generate them on the fly. Or only generate them on the fly if you have GNU flex and not a broken one like Solaris.

In case it is needed:

$ lex -V
lex: Software Generation Utilities (SGU) Solaris-ELF (4.0)

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/westes/flex/issues/375

-- Will Estes westes575@gmail.com

Explorer09 commented 6 years ago

The source (scan.c) is pre-flexed on the release tarball. You need to download the right file (flex-2.6.4.tar.gz). I don't think the current flex code can be bootstrapped on other lex implementations. You can try and fix the bugs coming with that, but there's no guarantee of anything.

noloader commented 6 years ago

@westes, @Explorer09,

Are you building from the release tar ball?

I believe so. The file is https://github.com/westes/flex/archive/v2.6.4.tar.gz. It comes with an autogen.sh but not a configure.

Explorer09 commented 6 years ago

@noloader Your download URL is wrong. That's the URL to git snapshot (generated by GitHub), not the tarball for release. Unfortunately we can't turn off that link in GitHub and its wording is confusing.

noloader commented 6 years ago

@westes,

Ack, thanks.