Re: [Flex-help] Compiling flex 2.6.4 from source
flex is a tool for generating scanners
Brought to you by:
wlestes
|
From: David S. <arc...@da...> - 2026-09-01 10:34:44
|
I finally got to the source of the problem. I updated binutils into /usr/local, and this contained the "ar" command. Then when realining the /usr/local directory (as it was becoming mixed with /usr) I broke where "ar" looked for "libfl.so.2", and so running /usr/local/bin/ar always failed with that error. Trick was to go back to /usr/bin/ar - the old verion which still worked. Then rebuild binutils with the updated /usr/local file structure which recreated "ar" correctly linked to libfl.so.2. flex was also rebuilt then as well - and that worked fine. So problem now cured. Any what I learn about this is I should have fixed the /usr/local file structure before building the updated OS. Mea Culpa. David. On 31/08/2026 19:31, Will Estes wrote: > What file did you start with? > > On Monday, 31 August 2026, 12:12 pm +0100, David Summers <arc...@da...> wrote: > >> Hi, >> >> I'm compiling flex 2.6.4. on my ancient armv5tl machine. The autoconfigure >> and configure seem to work fine. However when I try and make: >> >> /bin/sh ../libtool --tag=CC --mode=link gcc -g -O2 -version-info 2:0:0 >> -o libfl.la -rpath /usr/local/lib libmain.lo libyywrap.lo -lm >> libtool: link: rm -fr .libs/libfl.so .libs/libfl.so.2 .libs/libfl.so.2.0.0 >> libtool: link: gcc -shared -fPIC -DPIC .libs/libmain.o .libs/libyywrap.o >> -lm -g -O2 -Wl,-soname -Wl,libfl.so.2 -o .libs/libfl.so.2.0.0 >> libtool: link: (cd ".libs" && rm -f "libfl.so.2" && ln -s "libfl.so.2.0.0" >> "libfl.so.2") >> libtool: link: (cd ".libs" && rm -f "libfl.so" && ln -s "libfl.so.2.0.0" >> "libfl.so") >> libtool: link: ar cr .libs/libfl.a libmain.o libyywrap.o >> ar: error while loading shared libraries: libfl.so.2: cannot open shared >> object file: No such file or directory >> >> However: >> >> file ./src/.libs/libfl.so.2.0.0 gives >> >> ./src/.libs/libfl.so.2.0.0: ELF 32-bit LSB shared object, ARM, EABI5 version >> 1 (SYSV), dynamically linked, >> BuildID[sha1]=b8851f7a64c9d9d1794b4b91a0126023b5cf0fa2, with debug_info, not >> stripped >> >> So a correct libfl.so.2.0.0 library does exist in the build package. >> >> So my problem seems circular, I need to install flex to get the libfl used >> by much of the build environment, but I can compile flex to give the libfl, >> because the make depends on libfl. So do I need to by hand copy the libfl >> into /usr/local/lib? That seems a bit of a hack. Is there a better way to >> resolve this dependancy? >> >> Thanks, >> >> David Summers. >> >> >> >> -- >> Flex-help mailing list >> Fle...@li... >> https://lists.sourceforge.net/lists/listinfo/flex-help |