Mail Archives: cygwin/2004/11/20/13:56:13
On Nov 20, 2004, at 10:19 AM, Reini Urban wrote:
> Peter Rehley schrieb:
>> On Nov 20, 2004, at 12:07 AM, Reini Urban wrote:
>>> Peter Rehley schrieb:
>>>> Peter Rehley wrote:
>>>>> Larry Hall wrote:
>>>>>>> We have a customer that is using flex under a custom version of
>>>>>>> cygwin that we provided them (with source). The customer is
>>>>>>> having problems when their "*.l" files are in dos format. Flex
>>>>>>> is taking the lines from the file and adding them into the
>>>>>>> lex.yy.c file untouched. (i.e. they still have the \n\r at the
>>>>>>> end), and this causing problems later on.
>>>>>>>
>>>>>>> I tried using the version of flex that comes with the latest
>>>>>>> version of cygwin (1.5.12) and flex changes the \n\r to just \n,
>>>>>>> which makes everything work fine. Good I thought since the
>>>>>>> version of flex we provide is not the latest. I'll just
>>>>>>> recompile.
>>>>>>>
>>>>>>> But when I tried that with the latest flex (2.5.4a-3) I get the
>>>>>>> same behavior that the customer is seeing. I get this behavior
>>>>>>> even if I compile on the latest version of cygwin.
>>>>>>>
>>>>>>> So, my question is what options are used for building flex?
>>>
>>>
>>> there's no build script and an inactive maintainer. we don't know.
>>> hopefully just the standard options.
>>> ./configure --prefix=/usr sharedstatedir=/var --mandir=/usr/share/man
>>> make && make install
>> Using these options the behavior of flex differs from the flex that
>> is shipped with cygwin.
>>>
>>>>>> Linking against /usr/lib/binmode.o perhaps?
>>>
>>>
>>> He meant that by accident flex was linked against binmode.o, which
>>> is wrong. It was no advice to reproduce that error with linking
>>> against binmode or textmount.
>>>
>>>>> Tried on cygwin 1.5.12
>>>>> make clean
>>>>> make LDFLAGS="/usr/lib/binmode.o",
>>>>>
>>>>> and
>>>>> make clean
>>>>> make LDFLAGS="-lbinmode"
>>>>>
>>>>> but neither helped
>>>
>>>
>>> for sure not.
>>>
>>>> However linking the /usr/lib/textmode.o did work
>>>> make LDFLAGS="/usr/lib/textmode.o" # <- did the job
>>>> Thanks Larry for pointing me in the right directory :)
>>>
>>> Oh god. This was the right direction? Sorry no.
>>>
>>> If you open your flex input file in a *textmode mount* \r\n will get
>>> converted, if you open that in a binmode mount it will not get
>>> converted.
>>> $ man mount
>> The filesystem has been mounted in binmode, but the flex that comes
>> with cygwin translates the files. Both flex and the text file are on
>> binmode mounts.
>
> ok thanks, for confirmation.
> so cgf should repackage it. it's obviously a bug.
I think so also because this isn't the behavior that occurs on linux or
BSD.
>
> And please add a hint how to reproduce from source, so we don't have
> to guess. Christofer claims that he didn't link against textmode.a,
> but it looks like so, or there was some deeper magic behind, which
> went away suddenly.
He is using automode.o, he said in one of the followups to this thread.
Hint should be included in original posting. It has original make
commands that I used plus a simple example for testing. It also has
instructions on how to build and run the simple sample
Modified build commands would be ./configure; make
LDFLAGS="/usr/lib/automode.o"
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -