<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi, <br>
<br>
Here is the corrected patch.<br>
I fixed the build error with --enable-werror option enabled.<br>
<br>
C problem:<br>
I renamed rand to local_rand in eval.c<br>
<br>
C++ problem<br>
As on gbuild parser are not wrapped any more, I adjusted the warning
suppression in parser.y (borrowed from rsc module).<br>
<br>
David<br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject: </th>
<td>Fwd: Re: [PATCH][REVIEW] gbuild conversion: idlc module --
problem with --enable-werror</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Fri, 13 Apr 2012 11:26:03 +0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>David Ostrovsky <a class="moz-txt-link-rfc2396E" href="mailto:david.ostrovsky@gmx.de"><david.ostrovsky@gmx.de></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td>Libreoffice-dev <a class="moz-txt-link-rfc2396E" href="mailto:libreoffice@lists.freedesktop.org"><libreoffice@lists.freedesktop.org></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi,<br>
<br>
my patch (that is apparently not pushed yet ;-) breaks the build
with --enable-werror option enabled.<br>
I didn't try it yersterday, sorry for that.<br>
<br>
I have two error: in C and in C+ code.<br>
<br>
I removed the patch and compiled idlc with old dmake with
--enable-werror enabled.<br>
It worked.<br>
<br>
C-code error:<br>
<br>
The dfference between the two is:<br>
old dmake build: only -Werror option on C code is present,<br>
new gbuild build: -Werror and -Wshadow are present.<br>
<br>
The reason is here: <br>
<br>
on dmake:<br>
solenv/inc/unxgcc.mk<br>
# -Wshadow does not work for C with nested uses of
pthread_cleanup_push:<br>
CFLAGSWARNBOTH=-Wall -Wextra -Wendif-labels<br>
<br>
on gbuild:<br>
<br>
solenv/gbuild/platform/unxgcc.mk<br>
gb_CFLAGS := \<br>
$(gb_CFLAGS_COMMON) \<br>
-fPIC \<br>
-Wdeclaration-after-statement \<br>
-Wshadow \<br>
<br>
<br>
The C error that I'm getting is:<br>
<br>
home/david/projects/libreoffice-core/git/libo/idlc/source/preproc/eval.c:
In Funktion »eval«:<br>
/home/david/projects/libreoffice-core/git/libo/idlc/source/preproc/eval.c:265:15:
Fehler: Deklaration von »rand« überdeckt eine globale Deklaration
[-Werror=shadow]<br>
<br>
translated:<br>
Declaration of `rand` shadows a global declaration [-Werror=shadow]<br>
<br>
With -Wshadow option commented out, the new build with my patch
works again.<br>
gb_CFLAGS := \<br>
$(gb_CFLAGS_COMMON) \<br>
-fPIC \<br>
-Wdeclaration-after-statement \<br>
# -Wshadow \<br>
<br>
<br>
C++ error is about bison generated parser:<br>
<br>
idlc/source/parser.y:261:13: Fehler: #pragma system_header außerhalb
include-Datei ignoriert [-Werror]<br>
source/parser.y: In Funktion »int yyparse()«:<br>
source/parser.y:604:65: Fehler: Um Zuweisung, die als Wahrheitswert
verwendet wird, werden Klammern empfohlen [-Werror=parentheses]<br>
<br>
I'm investigating this.<br>
<br>
David<br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject: </th>
<td>Re: [PATCH][REVIEW] gbuild conversion: idlc module</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Thu, 12 Apr 2012 23:45:51 +0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>David Ostrovsky <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:david.ostrovsky@gmx.de"><david.ostrovsky@gmx.de></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td>David Tardon <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:dtardon@redhat.com"><dtardon@redhat.com></a>,
Matúš Kukan <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:matus.kukan@gmail.com"><matus.kukan@gmail.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">CC: </th>
<td>Libreoffice-dev <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:libreoffice@lists.freedesktop.org"><libreoffice@lists.freedesktop.org></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
Hi David,<br>
hi Matus,<br>
<br>
thank you for your comments on my patch. I changed it accordingly.<br>
<br>
*@Matúš:* thank you for your help on IRC.<br>
<br>
Special usage gnu_getopt lib in windows:<br>
Matúš proposed the follow simple solution to include in
Executable_idlcpp.mk:<br>
<br>
ifeq ($(OS),WNT)<br>
$(eval $(call gb_Executable_use_libraries,idlcpp,\<br>
gnu_getopt \<br>
))<br>
endif<br>
<br>
because<br>
<br>
1. HAVE_GETOPT is allways NO on windows<br>
<br>
2. gnu_getopt is registered already on windows:
gb_Library_PLAINLIBS_NONE += [...] gnu_getopt [...]<br>
here solenv/gbuild/platform/WNT_INTEL_GCC.mk<br>
and here solenv/gbuild/platform/WNT_INTEL_MSC.mk<br>
<br>
3. original make file snippet was only active on windows<br>
<br>
.IF "$(HAVE_GETOPT)" != "YES"<br>
.IF "$(GUI)$(COM)" == "WNTMSC"<br>
APP1STDLIBS=gnu_getopt.lib<br>
.ELIF "$(GUI)$(COM)" == "WNTGCC"<br>
APP1STDLIBS=-lgnu_getopt<br>
.ENDIF<br>
.ENDIF<br>
<br>
Having said that, how could we simplify the gnu_getopt treatment in
tools/Executable_rscdep.mk?<br>
<br>
David<br>
<br>
-------- Original Message --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
cellspacing="0">
<tbody>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Subject: </th>
<td>Re: [PATCH][REVIEW] gbuild conversion: idlc module</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Date: </th>
<td>Thu, 12 Apr 2012 06:33:19 +0200</td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">From: </th>
<td>David Tardon <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:dtardon@redhat.com"><dtardon@redhat.com></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">To: </th>
<td>David Ostrovsky <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:david.ostrovsky@gmx.de"><david.ostrovsky@gmx.de></a></td>
</tr>
<tr>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">CC: </th>
<td>Libreoffice-dev <a moz-do-not-send="true"
class="moz-txt-link-rfc2396E"
href="mailto:libreoffice@lists.freedesktop.org"><libreoffice@lists.freedesktop.org></a></td>
</tr>
</tbody>
</table>
<br>
<br>
<pre>On Wed, Apr 11, 2012 at 11:18:46PM +0200, David Ostrovsky wrote:
> Hi,
>
> this is gbuild conversion for idlc module.
Good. But it is not quite ready yet, see comments below.
> diff --git a/Repository.mk b/Repository.mk
> index 1a3851e..638f4f8 100644
> --- a/Repository.mk
> +++ b/Repository.mk
> @@ -31,6 +31,8 @@ $(eval $(call gb_Helper_register_executables,NONE, \
> bmp \
> bmpsum \
> cppunit/cppunittester \
> + idlc \
> + idlcpp \
> g2g \
> gencoll_rule \
> genconv_dict \
Both binaries should be registered in layer SDKBIN (because of
APP1RPATH=SDK).
> +
> +$(eval $(call gb_Executable_use_libraries,idlc,\
> + sal \
> + reg \
Originally idlc is linked with salhelper too. It is possible it is no
longer necessary, but it is also possible that it is necessary on a
different platform. (Nitpick: please, keep the libs sorted
alphabetically :-)
> +))
> +$(eval $(call gb_Executable_use_linked_libs,idlcpp,\
> + gnu_getopt \
> +))
This is wrong: there is no unconditionally built library gnu_getopt. It
only worked for you because there is no function
gb_Executable_use_linked_libs either (it is called
gb_Executable_use_libraries) and your platform's libc has getopt .-)
You need to use gb_Executable_use_externals and add a new definition to
RepositoryExternals.mk for it, like:
ifeq ($(HAVE_GETOPT),YES)
# nothing needed
define gb_LinkTarget__use_gnu_getopt
endef
else # !HAVE_GETOPT
define gb_LinkTarget__use_gnu_getopt
$(call gb_LinkTarget_use_libraries,$(1),\
gnu_getopt \
)
endef
$(eval $(call gb_Helper_register_libraries,PLAINLIBS_NONE,\
gnu_getopt \
))
endif # HAVE_GETOPT
D.
</pre>
</body>
</html>