From: Stephane F. <f8...@fr...> - 2010-09-28 21:37:22
|
Tue, Sep 28, 2010 at 10:20:28AM -0700, Kamal Mostafa skribis: > On 2010 27 Sep 22:23 -0500, Jeff Steinkamp (N7YG) wrote: > > > /bin/sh ../libtool --tag=CXX --mode=link g++ -g -O2 -Wall -pthread -pthread -no-undefined -module -avoid-version -o hamlib-kit.la -rpath /usr/local/lib/hamlib elektor304.lo drt1.lo dwt.lo usrp.lo elektor507.lo dds60.lo miniVNA.lo si570avrusb.lo pcrotor.lo kit.lo ../lib/libmisc.la -lusb -lm ../src/libhamlib.la -ldl > > > libtool: link: unsupported hardcode properties > > > libtool: link: See the libtool documentation for more information. > > > libtool: link: Fatal configuration error. > > > make[1]: *** [hamlib-kit.la] Error 1 > > > I suspect that it might be the CXX and g++ properties as I do not believe I have g++ installed > > On Tue, 2010-09-28 at 06:13 -0500, Nate Bargmann wrote: > > I think you're correct. g++ is pretty much a requirement these days. Indeed. Yet I don't understand why configure script didn't catch the missing g++, because that should be handled nicely through autoconfiscation. Maybe could we simply fix that. Perhaps libtool is unable to work with conditional C++ support? > But it looks to me like C++ isn't even actually necessary here!... > > The file in causing the need for C++ here is ./kit/usrp_impl.cc but it > appears to contain only regular C code. So I simply renamed it to > usrp_impl.c, tweaked the Makefile accordingly, and voila... the kit > directory builds just fine without referencing any C++ compiler! Hold on, have you read the code here below? It compiles as C on your system because you don't HAVE_USRP, but I can tell you, this library has a C++ ABI. > diff --unidirectional-new-file -u trunk/kit/usrp_impl.c trunk.patched/kit/usrp_impl.c > --- trunk/kit/usrp_impl.c 1969-12-31 16:00:00.000000000 -0800 > +++ trunk.patched/kit/usrp_impl.c 2010-09-28 09:40:28.000000000 -0700 [...] > +/* > + * Compile only this model if usrp is available > + */ > +#if defined(HAVE_USRP) [...] > +int usrp_open(RIG *rig) > +{ > + struct usrp_priv_data *priv = (struct usrp_priv_data*)rig->state.priv; > + > + int which_board = 0; > + int decim = 125; > + Here is C++ syntax: > + priv->urx = usrp_standard_rx::make (which_board, decim, 1, -1, usrp_standard_rx::FPGA_MODE_NORMAL).get(); > + if (priv->urx == 0) > + return -RIG_EIO; > + > + return RIG_OK; > +} 73 -- Stephane - F8CFE |