Mailing list archive (omnetpp-l at omnetpp.org)


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Omnetpp-l] Problem compiling omnet with tcl-8.6



Hello,

It seems the error appears in:

//
// Print error message on console if Tcl code returns error
//
#ifdef _NDEBUG
#define CHK(tcl_eval_statement)   tcl_eval_statement
#else
#define CHK(tcl_eval_statement)    \
  do{ if (tcl_eval_statement==TCL_ERROR) \
        fprintf(stderr,"%s#%d:%s\n",__FILE__,__LINE__,interp->result); \
  } while(0)
#endif

Since Tcl/Tk 8.6, it is unsupported "nterp->result", you can find more 
information about it in: http://www.tcl.tk/cgi-bin/tct/tip/330.html

It seems there is a workaround in 8.6, adding "-DUSE_INTERP_RESULT" in 
Makefile it compiles. I managed tkenv to compile putting it in 
"configure" file, at the definition of variable "TK_CFLAGS86":

        TK_CFLAGS86=${TK_CFLAGS:-"-I/usr/include/tcl8.6 
-DUSE_INTERP_RESULT"}

I hope somebody find this useful...

Best Regards,
Javier

Javier Díaz escribió:
> Hello,
>
> I have upgraded my linux distro (Mandriva) to its latest version, 
> Mandriva 2009.1 and it seems they have upgraded Tcl/Tk to 8.6 version.
>
> The problem is that it seems omnet doesn't supports this version, when I 
> recompile, appears this error:
>
> ===== Compiling tkenv 
> ====                                                                                                   
>
> cd /home/javi/omnetpp-4.0/src/tkenv && 
> make                                                                                  
>
> make[2]: se ingresa al directorio 
> `/home/javi/omnetpp-4.0/src/tkenv'                                                         
>
> g++ -c -O2 -DNDEBUG=1 -fno-stack-protector -fPIC  -DXMLPARSER=libxml 
> -DWITH_PARSIM -DWITH_NETBUILDER -I/home/javi/omnetpp-4.0/include 
> -I/home/javi/omnetpp-4.0/include/platdep -I../envir -I../layout 
> -I../common -I/usr/include/tcl8.6  -DBUILDING_TKENV 
> -DOMNETPP_IMAGE_PATH="\"./bitmaps;./images;/home/javi/omnetpp-4.0/images\"" 
> tkenv.cc -o 
> /home/javi/omnetpp-4.0/out/gcc-release/src/tkenv/tkenv-e.o                                                                                                        
>
> tkenv.cc: In member function 'virtual void 
> Tkenv::run()':                                                                    
>
> tkenv.cc:262: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void Tkenv::newNetwork(const 
> char*)':                                                         
> tkenv.cc:702: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void Tkenv::newRun(const char*, 
> int)':                                                        
> tkenv.cc:755: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void 
> Tkenv::updateInspectors()':                                                               
>
> tkenv.cc:851: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:854: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:857: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void 
> Tkenv::updateNetworkRunDisplay()':                                                        
>
> tkenv.cc:892: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:895: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void 
> Tkenv::updateSimtimeDisplay()':                                                           
>
> tkenv.cc:903: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:906: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:912: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:916: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:920: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:925: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void 
> Tkenv::updateNextModuleDisplay()':                                                        
>
> tkenv.cc:947: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void 
> Tkenv::clearNextModuleDisplay()':                                                         
>
> tkenv.cc:952: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void 
> Tkenv::updatePerformanceDisplay(Speedometer&)':                                           
>
> tkenv.cc:959: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:961: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:963: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void 
> Tkenv::clearPerformanceDisplay()':                                                        
>
> tkenv.cc:968: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:969: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc:970: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                               
> tkenv.cc: In member function 'void Tkenv::printEventBanner(cMessage*, 
> cSimpleModule*)':                                     
> tkenv.cc:1005: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                              
> tkenv.cc: In member function 'virtual void 
> Tkenv::simulationEvent(cMessage*)':                                               
>
> tkenv.cc:1169: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                              
> tkenv.cc: In member function 'virtual void 
> Tkenv::messageSent_OBSOLETE(cMessage*, 
> cGate*)':                                 
> tkenv.cc:1201: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'                                              
> tkenv.cc: In member function 'virtual void 
> Tkenv::componentMethodBegin(cComponent*, cComponent*, const char*, 
> __va_list_tag*)':
> tkenv.cc:1320: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1343: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1361: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1374: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1384: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'void Tkenv::animateSend(cMessage*, cGate*, 
> cGate*)':
> tkenv.cc:1551: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'void Tkenv::animateSendDirect(cMessage*, 
> cModule*, cGate*)':
> tkenv.cc:1657: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1677: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1695: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1714: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'void Tkenv::animateDelivery(cMessage*)':
> tkenv.cc:1739: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'void Tkenv::animateDeliveryDirect(cMessage*)':
> tkenv.cc:1762: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'void Tkenv::performAnimations()':
> tkenv.cc:1772: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'void Tkenv::confirm(const char*)':
> tkenv.cc:1807: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'bool Tkenv::inputDialog(const char*, const 
> char*, const char*, const char*, std::string&, bool&)':
> tkenv.cc:1858: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1862: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc:1866: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> tkenv.cc: In member function 'virtual bool Tkenv::askyesno(const char*)':
> tkenv.cc:1896: error: 'struct Tcl_Interp' no tiene un miembro llamado 
> 'result'
> make[2]: *** 
> [/home/javi/omnetpp-4.0/out/gcc-release/src/tkenv/tkenv-e.o] Error 1
> make[2]: se sale del directorio `/home/javi/omnetpp-4.0/src/tkenv'
> make[1]: *** [tkenv] Error 2
> make[1]: se sale del directorio `/home/javi/omnetpp-4.0'
> make: *** [allmodes] Error 2
>
> The question is if it is posible to manually change something in 
> tkenv.cc code to manage to compile it, because it seems more easy to 
> repair the problem than to downgrading tck/tk to 8.5.
>
> Thanks in advance,
> Javier
> _______________________________________________
> Omnetpp-l mailing list
> Omnetpp-l at xxx
> http://lists.omnetpp.org/mailman/listinfo/omnetpp-l
>   
_______________________________________________
Omnetpp-l mailing list
Omnetpp-l at xxx
http://lists.omnetpp.org/mailman/listinfo/omnetpp-l

Home | Main Index | Thread Index