[ragel-users] [PATCH 0/3] Fix Cygwin build

Ken Brown kbrown at cornell.edu
Mon Nov 26 14:30:59 UTC 2018


Thanks.  There are still two problems:

First, the syntax for the libtool '-no-undefined' flag is wrong.  It should 
simply be '-no-undefined' (one leading hyphen, no -Wl), as in the patch I 
submitted.  Otherwise, I get the following error if I try to build shared libraries:

libtool:   error: can't build x86_64-unknown-cygwin shared library unless 
-no-undefined is specified

Second, although your change takes care of the reference to rl_parse, which is 
the only undefined reference in a build --without-ragel, there are two further 
"undefined reference" errors if I build with ragel installed:

.libs/libragel_la-inputdata.o: In function `InputData::checkLastRef(InputItem*)':
/home/kbrown/src/ragel/src/inputdata.cc:313: undefined reference to 
`Parser6::terminateParser()'
[...]
.libs/libragel_la-inputdata.o: In function `InputData::parseKelbt()':
/home/kbrown/src/ragel/src/inputdata.cc:427: undefined reference to 
`Scanner::do_scan()'

These are defined in rlparse.cc and rlscan.cc, which aren't in the sources for 
libragel.

Ken

On 11/26/2018 11:40 AM, Adrian Thurston wrote:
> Ah, sorry, I forgot to push from my private repo to the public one. There now.
> 
> On 2018-11-25 12:11, Ken Brown wrote:
>> Hi Adrian,
>>
>> Thanks.  Have you pushed these changes to the upstream git repo?  I'm getting
>> "Already up to date" when I do "git pull".
>>
>> Ken
>>
>> On 11/25/2018 8:22 AM, Adrian Thurston wrote:
>>> Hi Ken, thank you for the patches. I just enabled --no-undefined and removed the
>>> reference to the undefined symbol. The parse.c file cannot be included in
>>> libragel because it defines the frontnend language, which is different for each
>>> binary in the host-* directories. All that was needed was to pass the reference
>>> to rl_parse into libragel from main.cc. Was already doing that for the backend
>>> code generator (also a colm program).
>>>
>>> Adrian
>>>
>>> On 2018-11-16 16:58, Ken Brown wrote:
>>>> I've just built ragel-7.0.0.11 on Cygwin and added it to the Cygwin
>>>> distribution.  I had to patch the sources in order to build shared
>>>> libraries.
>>>>
>>>> libtool won't build shared libraries on Cygwin unless the
>>>> -no-undefined flag is given.  The first patch of this series does that
>>>> for libfsm and libragel.  But it turns out that there are in fact
>>>> undefined symbols in libragel.  The next two patches fix that.
>>>>
>>>> I don't think these patches do any harm on other platforms.
>>>>
>>>> Ken Brown (3):
>>>>   add -no-undefined to LDFLAGS for libfsm and libragel
>>>>   add dependency of libragel on libfsm and libcolm
>>>>   avoid undefined symbols in libragel
>>>>
>>>>  src/Makefile.am | 20 ++++++++++++++------
>>>>  1 file changed, 14 insertions(+), 6 deletions(-)
>>>
>>> _______________________________________________
>>> ragel-users mailing list
>>> ragel-users at colm.net
>>> http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users
>> _______________________________________________
>> ragel-users mailing list
>> ragel-users at colm.net
>> http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users
> 
> _______________________________________________
> ragel-users mailing list
> ragel-users at colm.net
> http://www.colm.net/cgi-bin/mailman/listinfo/ragel-users


More information about the ragel-users mailing list