Apache OpenOffice (AOO) Bugzilla – Issue 66723
m173-to-be: W32 build fails in idlc
Last modified: 2006-07-25 14:18:34 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 *---
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)
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.
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?
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
Created attachment 37396 [details] Preprocessed file
Created attachment 37397 [details] Compile (preprocess) command
Created attachment 37398 [details] bison generated file
Created attachment 37399 [details] bison generated file (hxx)
sb->hjs: do you have time to look at those files?
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.
@vq: Please verify that idlc/source/parser.y:1.15.2.1 (CWS warningfixes02) indeed solves your problem.
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.
*** Issue 66879 has been marked as a duplicate of this issue. ***
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)
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 ;)
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.)
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
@vq: Please verify.
I verified that idlc, rsc from warningfixes02 build fine with W32-tcsh. Reassigning for final closing
Works!
.