EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  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  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: EPICS on OS X Lion -- C++ problem
From: Andrew Johnson <[email protected]>
To: [email protected]
Cc: Eric Norum <[email protected]>
Date: Tue, 26 Jul 2011 16:40:15 -0500
Hi Eric,

On Monday, July 25, 2011 12:54:28 Eric Norum wrote:
> Downloaded and installed OS X Lion and the latest version of Xcode on my
> laptop machine.  Attempting to build EPICS results in:
> /usr/bin/c++ -c -DUNIX  -Ddarwin     -O3 -g   -Wall      -arch i386   
> -fno-common -fPIC -MMD -I. -I../O.Common -I. -I..
> -I../../../include/os/Darwin -I../../../include       -I/opt/local/include
> -I/sw/include  ../udpiiu.cpp ../udpiiu.cpp:1391: error: generic thunk code
> fails for method 'virtual int
> udpiiu::printFormated(epicsGuard<epicsMutex>&, const char*, ...)' which
> uses '...'

We've seen this twice now at APS with GCC 4.1.2 built for both the Xilinx and 
Altera FPGA-based CPUs.  I managed to narrow the code down to to one simple 
file, attached here, which contains valid C++ code but is using some rather 
unusual combination of operations (mixing the use of ... with double 
inheritance) that requires some thunking code that is often not developed for 
new CPUs.  It's basically that whoever wrote the CPU support didn't finish the 
job, and EPICS is the first code to notice.

- Andrew (from England, on holiday)
/* Compiling this file with the microblaze version of g++ generates
 * the generic thunk error:
 *
 * rhel6% microblazeel-unknown-linux-gnu-g++ -c broken.cpp
 * broken.cpp:32: error: generic thunk code fails for method
 *     'virtual void C::f(const char*, ...)' which uses '...'
 *
 */

class A {
public:
    virtual ~A () = 0;
};

class B {
public:
    virtual ~B () = 0;
    virtual void f (const char *, ...) = 0;
};

class C:
    public A,
    public B {
public:
    virtual ~C ();

    void f (const char *, ...);
};

void C::f (const char * p, ...)
{
    // This is line 32
}

Replies:
RE: EPICS on OS X Lion -- C++ problem Jeff Hill
References:
EPICS on OS X Lion -- C++ problem Eric Norum

Navigate by Date:
Prev: RE: EPICS on OS X Lion -- C++ problem Jeff Hill
Next: RE: EPICS on OS X Lion -- C++ problem Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: EPICS on OS X Lion -- C++ problem Jeff Hill
Next: RE: EPICS on OS X Lion -- C++ problem Jeff Hill
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  <20112012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 18 Nov 2013 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·