EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Compiling CMLOG Error
From: Heinrich du Toit <[email protected]>
To: Jie Chen <[email protected]>, TechTalk EPICS <[email protected]>
Date: Wed, 19 Sep 2007 08:33:42 +0200
i made the change:

Now I'm getting:


g++ -I. -g -DLinux -D_REENTRANT -I. -I../data -I../Thread -I../Common
-I../Network -I/home/heinrich/EPICS/cmlog/CMLOG/C++/
SACE-4.0 -c ../Network/cmlogUpIO.cc -o .obj/Linux-i386/cmlogUpIO.o    
../Network/cmlogUpIO.cc: In member function âvirtual int
cmlogUpIO::handle_input(int)â:
../Network/cmlogUpIO.cc:105: error: âstreamInPacketâ was not declared in
this scope
make[2]: *** [.obj/Linux-i386/cmlogUpIO.o] Error 1
make[2]: Leaving directory `/home/heinrich/EPICS/cmlog/CMLOG/ClientD'
make[1]: *** [linux-redhat6.0-x86-th] Error 2


I don't think it's that the compiler couldn't handle the >> operator.
It's that it can't find it or something.
I don't find any streamInPacket function - not even with grep :(
So i changed it back to fd >> packet

I'm running g++/gcc version 4.1.2

but - I also have 3.4 installed on my system.
And I've modified the makefile.config to use that.
and the result:
IT NOW WORKS!

So effectively it means that CMLOG can't be compiled with gcc version
4.1 and still need 3.4 
AARGH!!
I'm not sure what the problem is. maybe something todo with the way gcc
4.1 handles the friend operator approach.

I've done some googling about this  :)

Came up with a solution:
you need the -ffriend-injection option for g++ 4.1 and anwards.
here is the link of information:
http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/C_002b_002b-Dialect-Options.html


so in Makefile.config: (the one in CMLOG and also in C++/SACE-4.0)
I need to add -ffriend-injection into CXXFLAGS

now it works :)
Thankyou for your help!

I replaced cpThread.cc with the other file you gave me - that fixed that
problem.



On Tue, 2007-09-18 at 10:06 -0400, Jie Chen wrote:
> >
> > I'm trying to compile CMLOG.
> > Ubuntu feisty kernel 2.6.20-15-generic.
> >
> > ace compiles and is fine.
> > I had to edit config-linux-redhat6.0-x86.h to comment out #define
> > ACE_HAS_UNDERCOREFDBITS
> >
> > I had this error:
> >
> > g++ -I. -g -DLinux -I. -I../data -I../database/include -I../database
> > -I../Thread -I../Common -I../Network -I/h
> > ome/heinrich/EPICS/cmlog/CMLOG/C++/SACE-4.0 -D_CMLOG_BUILD_SERVER  -c
> > cmlogCleanupMain.cc -o cmlogCleanupMain.
> > o
> > cmlogCleanupMain.cc:30: error: â::mainâ must return âintâ
> > make[2]: *** [cmlogCleanupMain.o] Error 1
> > make[2]: Leaving directory `/home/heinrich/EPICS/cmlog/CMLOG/Server'
> >
> > So I changed cmLogCleanupMain.cc:
> >
> > int
> > main (int argc, char** argv)q
> > {
> >   cmlogCleanup ();
> >   return 0;
> > }
> >
> > That was easy  :) 
> >
> > Next error is:
> >
> > g++ -I. -g -DLinux -I. -I../data -I../Thread -I../Common -I../Network
> > -I/home/heinrich/EPICS/cmlog/CMLOG/C++/S
> > ACE-4.0 -c ../Network/cmlogUpIO.cc -o .obj/Linux-i386/cmlogUpIO.o 
> > ../Network/cmlogUpIO.cc: In member function âvirtual int
> > cmlogUpIO::handle_input(int)â:
> > ../Network/cmlogUpIO.cc:103: error: no match for âoperator>>â in âfd >>
> > packetâ
> > make[2]: *** [.obj/Linux-i386/cmlogUpIO.o] Error 1
> > make[2]: Leaving directory `/home/heinrich/EPICS/cmlog/CMLOG/ClientD'
> >
> > This one I can't seem to figure out what is wrong?
> > It seem as if it want to use a >> operator from the cmlog_cdevPacket1
> > class - which doesn't exit??
> > There is a streamin function - but that take a char* and not an int. as
> > fd is some handle or something?
> >
> > Somebody out there maybe knows what todo?
> >   
> What version of gcc are you using? If you want, you can change line 103 
> from int n = fd >> packet to n = streamInPacket (fd, packet); I guess 
> your compiler could not handle >> operator defined in cmlogMsg.h 
> (implemented at cmlogMsg.cc).
> 



Navigate by Date:
Prev: Driver: Kepco BOP PS? Mark Bennett
Next: RE: Driver: Kepco BOP PS? Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Driver: Kepco BOP PS? Dave Reid
Next: OMS VME58-4S / brushless motor / servo-star3000 / motor 6.2 jerome HOSSELET
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 10 Nov 2011 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·