problem building on OS X Mavericks, Xcode 5.0.1

ecdowneyecdowney Member Elwood DowneyOrganization: University of ArizonaProject: Large Binocular Telescope Interferometer
Hello. Our build is failing after upgrading from OS X.8.5 (Mountain Lion) to OX X.9 (Mavericks) and the latest Xcode, V5.0.1. Nothing has changed in our Makefiles, source code or Ice installation. But now we see many errors such as the following. Ideas welcome. Thanks.

$ make pass3
/opt/Ice-3.4/bin/slice2cpp IIFServer.ice
g++ -I. -I/opt/Ice-3.4/include -ffast-math -Wall -O2 -g -pthread -c IIFServer.cpp -o IIFServer.o
In file included from IIFServer.cpp:22:
In file included from /opt/Ice-3.4/include/Ice/LocalException.h:32:
In file included from /opt/Ice-3.4/include/Ice/BuiltinSequences.h:31:
/opt/Ice-3.4/include/Ice/Stream.h:545:19: error: invalid use of incomplete type
'Ice::MarshalException'
throw MarshalException(__FILE__, __LINE__, "enumerator out of range");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/Ice-3.4/include/Ice/Stream.h:49:7: note: forward declaration of
'Ice::MarshalException'
class MarshalException;
^

In file included from IIFServer.cpp:21:
In file included from ./IIFServer.h:24:
In file included from /opt/Ice-3.4/include/Ice/LocalObjectF.h:15:
/opt/Ice-3.4/include/Ice/Handle.h:66:13: error: call to function 'upCast' that is neither
visible in the template definition nor found by argument-dependent lookup
upCast(this->_ptr)->__incRef();
^
/opt/Ice-3.4/include/Ice/OutgoingAsync.h:49:16: note: in instantiation of member function
'IceInternal::Handle<Ice::Communicator>::Handle' requested here
return 0;
^
/opt/Ice-3.4/include/Ice/CommunicatorF.h:64:29: note: 'upCast' should be declared prior to
the call site or in namespace 'Ice'
ICE_API ::Ice::LocalObject* upCast(::Ice::Communicator*);
^

Comments

  • benoitbenoit Rennes, FranceAdministrators, ZeroC Staff Benoit FoucherOrganization: ZeroC, Inc.Project: Ice ZeroC Staff
    Hi,

    Ice 3.4.x isn't compatible with recent compiler versions. You should upgrade to Ice 3.5.1 to compile your application with the latest Xcode versions. See the Ice release notes for upgrade instructions.

    Cheers,
    Benoit.
  • ecdowneyecdowney Member Elwood DowneyOrganization: University of ArizonaProject: Large Binocular Telescope Interferometer
    Thats helps, thanks. I've installed 3.5.1 and changed the paths in my Makefile. Now compiling works fine but linking is still failing with hundreds of undefined symbols. Perhaps I need to add another lib? Here is the link line and the first few errors:

    g++ -L../libiif -L/Library/Developer/Ice-3.5.1/lib -g -L../libastro -L../liblilxml -L../libz -L../libip -L../liblevmar -L../libmd5sum -L/opt/local/lib -o indilbto indilbto.o indilbtoprops.o indisimbadprops.o location.o indidrivermain.o indidriverbase.o eventloop.o configfile.o -liif -lIce -lIceUtil -lastro -lip -llilxml -lz -llevmar -lmd5sum -lm
    Undefined symbols for architecture x86_64:
    "IceInternal::BasicStream::readConverted(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, int)", referenced from:
    IceInternal::BasicStream::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool) in libiif.a(Factory.o)
    IceInternal::BasicStream::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool) in libiif.a(IIFServer.o)
    "IceInternal::BasicStream::writeConverted(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
    IceInternal::BasicStream::write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libiif.a(Factory.o)
    IceInternal::BasicStream::write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libiif.a(IIFServer.o)
    "IceInternal::BasicStream::read(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, bool)", referenced from:
    IceProxy::lbto::IIFServer::end_Authorize(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
    IceProxy::lbto::IIFServer::end_StepFocus(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
    IceProxy::lbto::IIFServer::end_MoveFocus(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
    IceProxy::lbto::IIFServer::end_OffsetPointing(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
    IceProxy::lbto::IIFServer::end_OffsetGuiding(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
    IceProxy::lbto::IIFServer::end_UpdatePointingReference(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
    IceProxy::lbto::IIFServer::end_TipTilt(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
    ...
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi,

    I think the problem is that you are using g++ but Ice-3.5.1 is build with clang++, you should try to use clang++ instead.
  • ecdowneyecdowney Member Elwood DowneyOrganization: University of ArizonaProject: Large Binocular Telescope Interferometer
    xdm wrote: »
    Hi,

    I think the problem is that you are using g++ but Ice-3.5.1 is build with clang++, you should try to use clang++ instead.

    Thanks for the idea but no help. To make sure I went back and rebuilt all the other dependencies with clang++ too but still doesn't work.

    What puzzles me is the architecture, they match yet it still can't find things:
    ecd-mbpr: uname -m
    x86_64
    ecd-mbpr: file /Library/Developer/Ice-3.5.1/lib/libIce.dylib
    /Library/Developer/Ice-3.5.1/lib/libIce.dylib: Mach-O universal binary with 2 architectures
    /Library/Developer/Ice-3.5.1/lib/libIce.dylib (for architecture i386):	Mach-O dynamically linked shared library i386
    /Library/Developer/Ice-3.5.1/lib/libIce.dylib (for architecture x86_64):	Mach-O 64-bit dynamically linked shared library x86_64
    
    clang++ -L../libiif -L/Library/Developer/Ice-3.5.1/lib -g -L../libastro -L../liblilxml -L../libz  -L../libip -L../liblevmar -L../libmd5sum -L/opt/local/lib  -o indilbto indilbto.o indilbtoprops.o indisimbadprops.o location.o indidrivermain.o indidriverbase.o eventloop.o configfile.o -liif -lIce -lIceUtil -lastro -lip -llilxml -lz -llevmar -lmd5sum -lm
    Undefined symbols for architecture x86_64:
      "IceInternal::BasicStream::readConverted(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, int)", referenced from:
          IceInternal::BasicStream::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool) in libiif.a(Factory.o)
          IceInternal::BasicStream::read(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >&, bool) in libiif.a(IIFServer.o)
      "IceInternal::BasicStream::writeConverted(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
          IceInternal::BasicStream::write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libiif.a(Factory.o)
          IceInternal::BasicStream::write(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) in libiif.a(IIFServer.o)
      "IceInternal::BasicStream::read(std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > >&, bool)", referenced from:
          IceProxy::lbto::IIFServer::end_Authorize(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
          IceProxy::lbto::IIFServer::end_StepFocus(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
          IceProxy::lbto::IIFServer::end_MoveFocus(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
          IceProxy::lbto::IIFServer::end_OffsetPointing(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
          IceProxy::lbto::IIFServer::end_OffsetGuiding(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
          IceProxy::lbto::IIFServer::end_UpdatePointingReference(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
          IceProxy::lbto::IIFServer::end_TipTilt(IceInternal::Handle<Ice::AsyncResult> const&) in libiif.a(IIFServer.o)
          ...
    
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    seems similar issue that you reported early, when there was X11 libICE in /opt/local/lib.

    can you update you linker command to
    clang++ -L/Library/Developer/Ice-3.5.1/lib -lIceUtil -lIce ...
    
  • ecdowneyecdowney Member Elwood DowneyOrganization: University of ArizonaProject: Large Binocular Telescope Interferometer
    xdm wrote: »
    seems similar issue that you reported early, when there was X11 libICE in /opt/local/lib.

    can you update you linker command to
    clang++ -L/Library/Developer/Ice-3.5.1/lib -lIceUtil -lIce ...
    

    Thanks, but that didn't help either so I went even farther and put in just the lib paths explicitly (of course lots of my symbols are gone too but that's beside the point):
    clang++ indilbto.o -o x.out /Library/Developer/Ice-3.5.1/lib/libIceUtil.dylib /Library/Developer/Ice-3.5.1/lib/libIce.dylib
    Undefined symbols for architecture x86_64:
      "_IDDefNumber", referenced from:
          _ISGetProperties in indilbto.o
      "_IDDefText", referenced from:
          _ISGetProperties in indilbto.o
      "_IDLog", referenced from:
          _ISNewText in indilbto.o
          bye(char const*, ...) in indilbto.o
          openIIF() in indilbto.o
          statusCB(void*) in indilbto.o
      "_IDSetNumber", referenced from:
          _ISNewNumber in indilbto.o
          gotoRADec2KThread(void*) in indilbto.o
          bye(char const*, ...) in indilbto.o
          statusCB(void*) in indilbto.o
          uptimeCB(void*) in indilbto.o
      "_IDSetText", referenced from:
          _ISNewText in indilbto.o
          presetTelThread(void*) in indilbto.o
          offsetPointingThread(void*) in indilbto.o
          focusThread(void*) in indilbto.o
          wavefrontThread(void*) in indilbto.o
          runaoThread(void*) in indilbto.o
          statusCB(void*) in indilbto.o
          ...
      "_IEAddTimer", referenced from:
          _ISGetProperties in indilbto.o
          statusCB(void*) in indilbto.o
          uptimeCB(void*) in indilbto.o
      "_IUCrackNumber", referenced from:
          _ISNewNumber in indilbto.o
      "_IUCrackText", referenced from:
          _ISNewText in indilbto.o
      "_IUSaveText", referenced from:
          _ISNewText in indilbto.o
          statusCB(void*) in indilbto.o
      "cfDblValue(_CFValues*, char const*, double)", referenced from:
          _ISGetProperties in indilbto.o
      "cfIntValue(_CFValues*, char const*, int)", referenced from:
          _ISGetProperties in indilbto.o
      "f_scansexa(char const*, double*)", referenced from:
          statusCB(void*) in indilbto.o
      "cfFree(_CFValues*)", referenced from:
          _ISGetProperties in indilbto.o
      "cfLoad(char const*, int, char*)", referenced from:
          _ISGetProperties in indilbto.o
      "fs_sexa(char*, double, int, int)", referenced from:
          _ISNewNumber in indilbto.o
          gotoRADec2KThread(void*) in indilbto.o
      "mjd_year(double, double*)", referenced from:
          _ISNewNumber in indilbto.o
          gotoRADec2KThread(void*) in indilbto.o
      "IceProxy::Ice::Object::ice_isA(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const*)", referenced from:
          IceInternal::ProxyHandle<IceProxy::lbto::Factory> IceInternal::checkedCastImpl<IceInternal::ProxyHandle<IceProxy::lbto::Factory> >(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const*) in indilbto.o
    
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    The problem is that in OS X 10.9 the default C++ run time library is libc++, and Ice-3.5.1/lib was link with libstdc++

    You have two options:
    • link with libraries in Ice-3.5.1/lib/c++11/
    • pass --stdlib=libstdc++ to your linker command to change the C++ runtime library.
  • ecdowneyecdowney Member Elwood DowneyOrganization: University of ArizonaProject: Large Binocular Telescope Interferometer
    xdm wrote: »
    The problem is that in OS X 10.9 the default C++ run time library is libc++, and Ice-3.5.1/lib was link with libstdc++

    You have two options:
    • link with libraries in Ice-3.5.1/lib/c++11/
    • pass --stdlib=libstdc++ to your linker command to change the C++ runtime library.

    c++11 is the simplest change and works great even with g++ (no need to use clang). Thanks much for your help.
Sign In or Register to comment.