[zeromq-dev] build problem after mlm_client.xml change

Matjaž Ostroveršnik matjaz.ostroversnik at gmail.com
Tue Apr 19 19:08:19 CEST 2016


Hi Kevin,

Thanks for the reply. So to change the mlm_client api, one needs to 
insert /update api/mlm_client?
Are you sure? This document is generated according to the header comment.

Id'd like to add few methods to mlm_client.
1. Which files needs to be updated?
2. How the updated files can be regenerated in order to get c and header 
files?

I do not care whether the build is performed via autotools or cmake.

Thanks in advance

Matjaž

On 19.4.2016 11:44, Kevin Sapper wrote:
> The header section in mlm_client_custom.xml needs to escape the xml 
> char '<' and '>' as they would otherwise be read by gsl. When using 
> zproto client with zproject it will generate an API otherwise it will 
> generate a C header file. Thus no XML is inserted into the header 
> file. This mix of old (before zproject) and new generation is indeed 
> confusing, so instead of defining custom API in mlm_client_custom.xml 
> we could place it into mlm_client_custom.api. Thereby keeping 
> mlm_client_custom.xml free of any XML strings. The custom API 
> functionality would of course only work if using it with zproject.
>
> 2016-04-18 21:34 GMT+02:00 Matjaž Ostroveršnik 
> <matjaz.ostroversnik at gmail.com <mailto:matjaz.ostroversnik at gmail.com>>:
>
>     Hi Veterans,
>
>     The bug is clearer now. The generator includes xml tags into c
>     header (mlm_client.h) instead of generated c function prototypes.
>
>     see /usr/local/bin/zproto_client_c.gsl line 528
>
>     .for class.custom
>     .   for header
>     $(header.:)     <--- problematic line
>     .   endfor
>     .endfor
>
>     The bug manifests itself only if the custom code is included
>     (mlm_client_custom.xml). When you check the file it becomes fishy.
>     The header tag contains < and > markers instead of < and >.
>     It seems somebody wanted to include the xml definition and one
>     step (as string)
>
>     What the "custom" xml definition should contain in header and
>     source tag? (C code or xml definitions?)
>
>     I started to fix with that, but I do not want to reinvent the
>     wheel. I am sure that there is already a gsl function which from
>     method definition outputs C function prototype. Am I wrong?
>
>     Best regards
>
>     Matjaž
>
>
>     On 14.4.2016 17:05, Matjaž Ostroveršnik wrote:
>>     In the mean time I found out that it is not necessary to change
>>     anything. Just do gsl on mlm_client.xml (started from src folder
>>     as required by Pieter).
>>     I am working on ostri/malamute, but it should be in sync with
>>     zeromq/malamute.
>>
>>     On 14.4.2016 16:33, Osiris Pedroso wrote:
>>>     Hi Matjaz,
>>>
>>>     Can you provide a repository with the modified file checked in?
>>>
>>>     I would like to try it as well.
>>>
>>>     Thanks,
>>>     Osiris
>>>
>>>     On Thu, Apr 14, 2016 at 9:12 AM Matjaž Ostroveršnik
>>>     <matjaz.ostroversnik at gmail.com
>>>     <mailto:matjaz.ostroversnik at gmail.com>> wrote:
>>>
>>>         Hi,
>>>
>>>         I tried to add a new method to the mlm_client.xml and then
>>>         regenerate all dependant files.
>>>         Generation of include/mlm_client.h is unsuccesful (i.e. one
>>>         gets xml garbage within the c header sources)
>>>
>>>         Am I doing something wrong or this is a bug?
>>>         Guys how do you regenerate when you change some xml file (ok
>>>         I know for project.xml)
>>>         I think it is something wrong with an inclusion of custom file
>>>             <custom filename = "mlm_client_custom.xml" language = "C" />
>>>         It seems that gsl is including header tag instead of source
>>>         tag.
>>>
>>>         How to reproduce:
>>>         *git reset --hard*
>>>         HEAD is now at c097dcf Merge pull request #164 from
>>>         opedroso/WIN_CRLF_REGEN
>>>         *git status*
>>>         On branch master
>>>         Your branch is up-to-date with 'origin/master'.
>>>         nothing to commit, working directory clean
>>>         *cd src*
>>>         *gsl mlm_client.xml **
>>>         *GSL/4.1c Copyright (c) 1996-2016 iMatix Corporation
>>>         gsl/4 I: Processing mlm_client.xml...
>>>         *cd ..**
>>>         **make**
>>>         *Making all in doc
>>>         make[1]: Entering directory '/home/ostri/zstuff/malamute/doc'
>>>         make[1]: Nothing to be done for 'all'.
>>>         make[1]: Leaving directory '/home/ostri/zstuff/malamute/doc'
>>>         make[1]: Entering directory '/home/ostri/zstuff/malamute'
>>>           CC       src/src_libmlm_la-mlm_msg.lo
>>>         In file included from src/../include/mlm_library.h:66:0,
>>>                          from src/../include/malamute.h:17,
>>>                          from src/mlm_classes.h:24,
>>>                          from src/mlm_msg.c:20:
>>>         src/../include/mlm_client.h:157:5: error: expected
>>>         identifier or ‘(’ before ‘<’ token
>>>              <method name = "sendx">
>>>              ^
>>>         src/../include/mlm_client.h:159:61: error: identifier "or"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  Returns 0 if OK, -1 if failed due to lack of memory
>>>         or other error.
>>>         ^
>>>         src/../include/mlm_client.h:167:61: error: identifier "or"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  Returns 0 if OK, -1 if failed due to lack of memory
>>>         or other error.
>>>         ^
>>>         src/../include/mlm_client.h:176:61: error: identifier "or"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  Returns 0 if OK, -1 if failed due to lack of memory
>>>         or other error.
>>>         ^
>>>         src/../include/mlm_client.h:184:27: error: identifier "and"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  Receive a subject and string content from the
>>>         server. The content may be
>>>                                    ^
>>>         src/../include/mlm_client.h:185:11: error: identifier "or"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  1 or more string frames. This method is orthogonal
>>>         to the sendx methods.
>>>                    ^
>>>         src/../include/mlm_client.h:186:58: error: identifier "not"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  End the string arguments with NULL. If there are
>>>         not enough frames in
>>>         ^
>>>         src/../include/mlm_client.h:188:38: error: identifier "or"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  of string contents received, or -1 in case of
>>>         error. Free the returned
>>>                                               ^
>>>         src/../include/mlm_client.h:189:17: error: identifier "and"
>>>         is a special operator name in C++ [-Werror=c++-compat]
>>>                  subject and content strings when finished with
>>>         them. To get the type of
>>>                          ^
>>>         cc1: all warnings being treated as errors
>>>         Makefile:1027: recipe for target
>>>         'src/src_libmlm_la-mlm_msg.lo' failed
>>>         make[1]: *** [src/src_libmlm_la-mlm_msg.lo] Error 1
>>>         make[1]: Leaving directory '/home/ostri/zstuff/malamute'
>>>         Makefile:1260: recipe for target 'all-recursive' failed
>>>         make: *** [all-recursive] Error 1
>>>
>>>         *gsl -v**
>>>         *GSL/4.1c
>>>         Built from http://github.com/imatix/gsl.git master
>>>         Copyright (c) 1996-2016 iMatix Corporation
>>>         Compiler: gcc -c -O2 -D_REENTRANT -D_GNU_SOURCE -Wall
>>>         -Wno-unused -fno-strict-aliasing -DBASE_THREADSAFE -I. gsl.c
>>>
>>>
>>>
>>>         Best regards
>>>
>>>         Matjaž
>>>
>>>         _______________________________________________
>>>         zeromq-dev mailing list
>>>         zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
>>>         http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>>
>>>
>>>
>>>     _______________________________________________
>>>     zeromq-dev mailing list
>>>     zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
>>>     http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>>
>
>
>     _______________________________________________
>     zeromq-dev mailing list
>     zeromq-dev at lists.zeromq.org <mailto:zeromq-dev at lists.zeromq.org>
>     http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20160419/db675a01/attachment.htm>


More information about the zeromq-dev mailing list