Issue 66723 - m173-to-be: W32 build fails in idlc
Summary: m173-to-be: W32 build fails in idlc
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: solenv (show other issues)
Version: current
Hardware: All Windows, all
: P1 (highest) Trivial (vote)
Target Milestone: OOo 2.0.4
Assignee: Stephan Bergmann
QA Contact: issues@tools
URL:
Keywords:
: 66879 (view as issue list)
Depends on:
Blocks: 66757
  Show dependency tree
 
Reported: 2006-06-24 23:00 UTC by quetschke
Modified: 2006-07-25 14:18 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Preprocessed file (781.95 KB, application/octet-stream)
2006-06-28 14:43 UTC, quetschke
no flags Details
Compile (preprocess) command (1.37 KB, patch)
2006-06-28 14:44 UTC, quetschke
no flags Details | Diff
bison generated file (152.11 KB, application/octet-stream)
2006-06-28 14:47 UTC, quetschke
no flags Details
bison generated file (hxx) (5.43 KB, application/octet-stream)
2006-06-28 14:47 UTC, quetschke
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description quetschke 2006-06-24 23:00:55 UTC
The build fails with:
<http://go-oo.org/tinderbox/gunzip.cgi?tree=SRC680_m173&brief-log=1151185945.4334#err17>

guw.pl /cygdrive/c/MSVS2003/Vc7/bin/cl.exe @/tmp/mk9gSz3b
tr -d "\015" < scanner.ll > ../wntmsci10.pro/misc/stripped_scanner.ll
Making: ../wntmsci10.pro/obj/wrap_parser.obj
guw.pl /cygdrive/c/MSVS2003/Vc7/bin/cl.exe -Zm500 -Zc:forScope -GR -c -nologo
-Gs  -I.  -I../wntmsci10.pro/misc -I../wntmsci10.pro/inc/idlc -I../inc -I../inc
-I../WIN/inc -I../wntmsci10.pro/inc -I.
-I/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/inc/stl
-I/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/inc/external
-I/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/inc
-I/cygdrive/d/w1/tin_ws/solenv/wntmsci10/inc -I/cygdrive/d/w1/tin_ws/solenv/inc
-I/cygdrive/d/w1/tin_ws/res
-I/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/inc/stl
-I/cygdrive/c/J2SDK1~1.2_0/include/win32 -I/cygdrive/c/J2SDK1~1.2_0/include
-I/cygdrive/c/PROGRA~1/MICROS~4/include -I/cygdrive/c/MSVS2003/Vc7/include
-I/cygdrive/c/PROGRA~1/MICROS~1.0SD/include    
-I/cygdrive/d/w1/tin_ws/solver/680/wntmsci10.pro/inc/offuh -I. -I../res -I. -Gy
-Ob1 -Oxs -Oy- -Gd  -GX -Wall -wd4061 -wd4127 -wd4191 -wd4217 -wd4251 -wd4275
-wd4290     -wd4294 -wd4355 -wd4511 -wd4512 -wd4514 -wd4611 -wd4625 -wd4626
-wd4640     -wd4675 -wd4710 -wd4711 -wd4786 -wd4800 -wd4820 -wd4503 -WX   -DWNT
-DWNT -DNT351 -DMSC -DM1310 -DINTEL -D_X86_=1 -DFULL_DESK -DSTLPORT_VERSION=400
-DWINVER=0x400 -D_WIN32_IE=0x400 -D_MT -DCPPU_ENV=msci -DSUPD=680 -DPRODUCT
-DNDEBUG -DPRODUCT_FULL -DOSL_DEBUG_LEVEL=0 -DOPTIMIZE -DEXCEPTIONS_ON -DCUI
-DSOLAR_JAVA -DSRC680=SRC680   -DMULTITHREAD -DWIN32 -D_MT -D_DLL -DWIN32 -D_MT
-D_DLL  -Fo../wntmsci10.pro/obj/wrap_parser.obj
/cygdrive/d/w1/tin_ws/idlc/source/wrap_parser.cxx

options.cxx
wrap_parser.cxx
..\wntmsci10.pro\misc\parser.cxx(575) : error C2220: warning treated as error -
no object file generated
..\wntmsci10.pro\misc\parser.cxx(575) : warning C4273: 'malloc' : inconsistent
dll linkage
..\wntmsci10.pro\misc\parser.cxx(582) : warning C4273: 'free' : inconsistent dll
linkage
dmake:  Error code 2, while making '../wntmsci10.pro/obj/wrap_parser.obj'

ERROR: Error 65280 occurred while making /cygdrive/d/w1/tin_ws/idlc/source
---* tg_merge.mk *---
Comment 1 quetschke 2006-06-25 03:44:52 UTC
This helps:

+++ idlc/source/makefile.mk     25 Jun 2006 02:43:47 -0000
@@ -40,6 +40,8 @@
 TARGETTYPE=CUI
 LIBTARGET=NO
 
+EXTERNAL_WARNINGS_NOT_ERRORS=TRUE
+
 ENABLE_EXCEPTIONS=TRUE
 INCPRE=$(MISC)
Comment 2 jens-heiner.rechtien 2006-06-26 15:50:11 UTC
Again, different parser create different generated sources, which sometimes are
not warning free. Maybe we should ease the warning=error stance for generated
scripts.

Reassign to sb for further tracking.
Comment 3 Stephan Bergmann 2006-06-27 12:28:54 UTC
The most specific fix would be to add 4273 to idlc/source/parser.y:1.15 line
297.  However, those two warnings about inconsistent dll linkage worry Ause and
me, so it might be interesting to track down the root problem here.  @vq:  Can
you supply the preprocessor output of compiling wrap_parser.cxx?
Comment 4 quetschke 2006-06-27 16:56:05 UTC
My UPS failed, so I'm kind of offline ATM. I'll post the file later, but maybe it
helps to know that I use:

$ bison -V
bison (GNU Bison) 2.1
Comment 5 quetschke 2006-06-28 14:43:43 UTC
Created attachment 37396 [details]
Preprocessed file
Comment 6 quetschke 2006-06-28 14:44:46 UTC
Created attachment 37397 [details]
Compile (preprocess) command
Comment 7 quetschke 2006-06-28 14:47:09 UTC
Created attachment 37398 [details]
bison generated file
Comment 8 quetschke 2006-06-28 14:47:48 UTC
Created attachment 37399 [details]
bison generated file (hxx)
Comment 9 Stephan Bergmann 2006-06-29 09:05:05 UTC
sb->hjs: do you have time to look at those files?
Comment 10 Stephan Bergmann 2006-06-29 13:50:51 UTC
Ause had a look, and says there is an #ifdef jungle in the bison-geneated .cxx
leading to suspicious declarations of malloc/free, and the .cxx generated with
the Sun Hamburg build environment looks rather different and does not have this
problem.  This could be due to bison 2.1 or due to a cygwin-related bison which
possibly emits code targeted at GCC.  Whatever the root cause, I will just
silence the warning by adding 4273 to idlc/source/parser.y:1.15 line 297.
Comment 11 Stephan Bergmann 2006-06-29 13:57:09 UTC
@vq:  Please verify that idlc/source/parser.y:1.15.2.1 (CWS warningfixes02)
indeed solves your problem.
Comment 12 Stephan Bergmann 2006-06-30 09:19:06 UTC
Re-did previous fix:  Instead of disabling C4273, removed the suspicious #ifdef
WNT block from idlc/source/parser.y that defined std::fprintf, std::malloc,
std::free (which might have been needed long ago, but appears to not be needed
today; the block was in there right from rev 1.1).

The same for rsc/source/parser/rscyacc.y (issue 66879).

@vq:  Please verify that idlc/source/parser.y:1.15.2.2 and
rsc/source/parser/rscyacc.y:1.8.6.2 (CWS warningfixes02) indeed solve your problems.
Comment 13 Stephan Bergmann 2006-06-30 09:20:08 UTC
*** Issue 66879 has been marked as a duplicate of this issue. ***
Comment 14 quetschke 2006-07-01 00:20:22 UTC
Sorry, but the patch didn't help.

For rsc:
guw.pl /cygdrive/c/MSVS2003/Vc7/bin/cl.exe @/tmp/mk9dJ7nn
rscyacc.cxx
../../wntmsci10.pro\inc\yyrscyacc.cxx(262) : error C2220: warning treated as
error - no object file generated
../../wntmsci10.pro\inc\yyrscyacc.cxx(262) : warning C4273: 'malloc' :
inconsistent dll linkage
../../wntmsci10.pro\inc\yyrscyacc.cxx(269) : warning C4273: 'free' :
inconsistent dll linkage
dmake:  Error code 2, while making '../../wntmsci10.pro/obj/rscyacc.obj'
---* tg_merge.mk *---

ERROR: Error 65280 occurred while making /cygdrive/d/w1/tin_ws/rsc/source/parser

with a warningfixes02 checkout of rsc.

$ oocvs status source/parser/rscyacc.y
===================================================================
File: rscyacc.y         Status: Up-to-date

   Working revision:    1.8.6.2
   Repository revision: 1.8.6.2 /cvs/gsl/rsc/source/parser/rscyacc.y,v
   Sticky Tag:          cws_src680_warningfixes02 (branch: 1.8.6)


And for idlc:

guw.pl /cygdrive/c/MSVS2003/Vc7/bin/cl.exe @/tmp/mkwMYIc7
wrap_parser.cxx
..\wntmsci10.pro\misc\parser.cxx(548) : error C2220: warning treated as error -
no object file generated
..\wntmsci10.pro\misc\parser.cxx(548) : warning C4273: 'malloc' : inconsistent
dll linkage
..\wntmsci10.pro\misc\parser.cxx(555) : warning C4273: 'free' : inconsistent dll
linkage
dmake:  Error code 2, while making '../wntmsci10.pro/obj/wrap_parser.obj'
---* tg_merge.mk *---

ERROR: Error 65280 occurred while making /cygdrive/d/w1/tin_ws/idlc/source

with a warningfixes02 checkout of idlc.

$ oocvs status source/parser.y 
===================================================================
File: parser.y          Status: Up-to-date

   Working revision:    1.15.2.2
   Repository revision: 1.15.2.2        /cvs/udk/idlc/source/parser.y,v
   Sticky Tag:          cws_src680_warningfixes02 (branch: 1.15.2)
Comment 15 quetschke 2006-07-01 00:45:40 UTC
I searched the web a little and it seems this warning is quite common. It looks
like a bison bug, but I wouldn't recommend downgrading just because of a warning.

There is already bison 2.2 and bison 2.3 released, maybe it is already fixed in
this versions. But I wouldn't force an update either ;)
Comment 16 Stephan Bergmann 2006-07-03 07:39:34 UTC
Ok, so I will put back in the disabling of C4273.  (I had guessed the warning
was related to the suspicious #ifdef block, but was not able to verify that myself.)
Comment 17 Stephan Bergmann 2006-07-03 07:46:21 UTC
idlc/source/parser.y:1.15.2.3
rsc/source/parser/rscyacc.cxx:1.7.8.1
rsc/source/parser/rscyacc.y:1.8.6.2
Comment 18 Stephan Bergmann 2006-07-03 13:23:31 UTC
@vq:  Please verify.
Comment 19 quetschke 2006-07-03 18:19:00 UTC
I verified that idlc, rsc from warningfixes02 build fine with W32-tcsh.

Reassigning for final closing
Comment 20 quetschke 2006-07-03 18:19:33 UTC
Works!
Comment 21 Stephan Bergmann 2006-07-25 14:18:34 UTC
.