bugCERTI - Bugs: bug #21611, Windows won't compile in current...

 
 

bug #21611: Windows won't compile in current version in CVS

Submitted by:  Chris Rule <crule>
Submitted on:  Mon 19 Nov 2007 03:52:04 PM UTC  
 
Category: CERTISeverity: 4 - Important
Item Group: Compilation errorStatus: In Progress
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: ClosedRelease: 3.2.4
Reproducibility: Every TimeFixed Release: 3.2.6

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Thu 06 Dec 2007 05:12:17 PM UTC, comment #6:

OK those two are fixed in the CVS.
the string error lacks a str().c_str() call.

Replace struct forward declaration with a proper
class forward decl.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Thu 06 Dec 2007 04:39:27 PM UTC, comment #5:

This was mistakingly put into bug 20935. It's also here for correctness.

There's a compiler warning and error when compiling on Windows using Visual Studio 2005 with current version in CVS.

c:\certi\librti\RTIambPrivateRefs.hh(32) : warning C4099: 'RTIambPrivateRefs' : type name first seen using 'struct' now seen using 'class'
c:\certi\certi\include\RTI.hh(38) : see declaration of 'RTIambPrivateRefs'

.\RTIambassador.cc(138) : error C2039: 'c_str' : is not a member of 'std::basic_stringstream<_Elem,_Traits,_Alloc>'

The first one is a concern, though I'm not sure what the actual effect is. The second one is definitely a problem. I put in a temp patch to remove the c_str to get it to compile for testing:
throw RTIinternalError( "CreateProcess - Cannot connect to RTIA.exe");

Chris Rule <crule>
Mon 26 Nov 2007 04:09:39 PM UTC, comment #4:

Looks like the latest (26 Nov 2007) from CVS compiles without the changes stated in the original bug. Thanks!

There is still a minor issue where cmake produces a project for libCERTI that calls "yacc" to create syntax.cc. For some reason, the yacc.bat file created when bison was installed doesn't work. I have to change yacc to be bison -y in the custom build step for syntax.cc.rule for it to work. Other than that, using cmake to produce a solution file seems to work just fine and everything now compiles.

Chris Rule <crule>
Mon 26 Nov 2007 03:40:25 PM UTC, comment #3:

This was based off of compiling a CVS download of the repo on 16 Nov 2007

certi.hh - CVS version 3.17.

1) Windows XP
2) Visual Studio 2005 (not express)
3) bison-2.1; flex 2.5.4a-1; cmake-2.4.7; m4-1.4.9
4) I used cmake to build.

Chris Rule <crule>
Tue 20 Nov 2007 09:14:12 AM UTC, comment #2:

There shouldn't be compilation error
with certi 3.2.5 however I keep the bug In Progress
for now since:

- the pstdint.h solution may be better than our
actual solution

- there are several problems in the same report
which are not "completely" or "nicely" fixed

I've just fixed the yyrestart prototype.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Mon 19 Nov 2007 04:03:43 PM UTC, comment #1:

I did commit a hum...
late fix for the Visual Studio compilation
which should be included in certi 3.2.5
(in fact certi 3.2.5 was released twice before
I sent the new release message)

Could you tell me the CVS revision of your certi.hh file?

However in the end I did a "clean" compilation
using Visual Studio 2005 on Windows XP

Could you tell me more about your environment?
1) Windows version
2) Visual Studio Version (express or not)
3) What flex/bison do you use ?
GnuWin32 version?
4) Did you use CMake to generate the Visual Studio Solution
or did you create the project "by hand" ?

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Mon 19 Nov 2007 03:52:04 PM UTC, original submission:

There are several code changes that have crept in and rendered the windows version uncompilable under Visual Studio 2005. Enclosed is a patch that corrects these problems:

1) winsock2.h has to be included before windows.h or visual studio opens winsock.h instead. The compile then fails because of duplicate names.

2) in_addr_t and in_port_t aren't defined in visual studio 2005.

3) stdint.h doesn't exist in visual studio 2005, but the constants are used in many places. It can be retrieved from several sources. The one I used is http://www.azillionmonkeys.com/qed/pstdint.h. I placed this file in libCERT and changed the <stdint.h> to "stdint.h" in certi.hh and clock.hh.

4)PrettyDebug.Mes doesn't exist in the windows version (it's commented out). There are several places that refer to this function but don't have the NDEBUG define check around the calls.

5) Socket.hh needs ws2tcpip.h included.

6) yyrestart (at least using flex and bison) returns a void, not an int as is specified in fed.cc.

Chris Rule <crule>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #14433:  windows_compile.patch added by crule (6KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by crule (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 31 Mar 2008 02:43:47 PM UTCerkOpen/ClosedOpen=>Closed
      Fixed ReleaseUnknown=>3.2.6
    Tue 20 Nov 2007 09:14:12 AM UTCerkStatusNone=>In Progress
      Assigned toNone=>erk
      ReleaseCVS=>3.2.4
      Fixed ReleaseNextRelease=>Unknown
    Mon 19 Nov 2007 03:52:04 PM UTCcruleAttached File-=>Added windows_compile.patch, #14433

    Back to the top


    Powered by Savane 3.1-cleanup1