Can't comile the hello on Fedora24

gasilugasilu Member Victor LuOrganization: noneProject: none

Hi, I can't compile the hello on Fedora24 sucessfully.

Linux FedoraVM 4.5.7-300.fc24.x86_64 #1 SMP Wed Jun 8 18:12:45 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

g++ --version
g++ (GCC) 6.1.1 20160510 (Red Hat 6.1.1-2)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

18:48:50 **** Build of configuration Debug for project hello_srv ****
make all
Building file: ../Hello.cpp
Invoking: GCC C++ Compiler
c++ -I"/home/devk/workspace/hello_srv" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Hello.d" -MT"Hello.o" -o "Hello.o" "../Hello.cpp"
Finished building: ../Hello.cpp

Building file: ../HelloI.cpp
Invoking: GCC C++ Compiler
c++ -I"/home/devk/workspace/hello_srv" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"HelloI.d" -MT"HelloI.o" -o "HelloI.o" "../HelloI.cpp"
Finished building: ../HelloI.cpp

Building file: ../Server.cpp
Invoking: GCC C++ Compiler
c++ -I"/home/devk/workspace/hello_srv" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"Server.d" -MT"Server.o" -o "Server.o" "../Server.cpp"
Finished building: ../Server.cpp

Building target: hello_srv
Invoking: GCC C++ Linker
c++ -L/usr/lib64/c++11 -pthread -Wl,-rpath,/usr/lib64/c++11 -o "hello_srv" ./Hello.o ./HelloI.o ./Server.o -lIce -lIceUtil
./Hello.o: In function IceProxy::Demo::Hello::sayHello(int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*)': /home/devk/workspace/hello_srv/Debug/../Hello.cpp:72: undefined reference toIceInternal::Outgoing::Outgoing(IceProxy::Ice::Object*, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Ice::OperationMode, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > const*)'
./Hello.o: In function IceProxy::Demo::Hello::begin_sayHello(int, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*, IceUtil::Handle<IceInternal::CallbackBase> const&, IceInternal::Handle<Ice::LocalObject> const&)': /home/devk/workspace/hello_srv/Debug/../Hello.cpp:89: undefined reference toIceInternal::OutgoingAsync::OutgoingAsync(IceInternal::ProxyHandle const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, IceUtil::Handle const&, IceInternal::Handle const&)'

Tagged:

Comments

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    /home/devk/workspace/hello_srv/Debug/../Hello.cpp:92: undefined reference to IceInternal::OutgoingAsync::prepare(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ice::OperationMode, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*)' ./Hello.o: In functionIceProxy::Demo::Hello::end_sayHello(IceInternal::Handle const&)':
    /home/devk/workspace/hello_srv/Debug/../Hello.cpp:108: undefined reference to IceProxy::Ice::Object::__end(IceInternal::Handle<Ice::AsyncResult> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ./Hello.o: In functionIceProxy::Demo::Hello::shutdown(std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > const)':
    /home/devk/workspace/hello_srv/Debug/../Hello.cpp:114: undefined reference to IceInternal::Outgoing::Outgoing(IceProxy::Ice::Object*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, Ice::OperationMode, std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > const*)' ./Hello.o: In functionIceProxy::Demo::Hello::begin_shutdown(std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > const
    , IceUtil::Handle const&, IceInternal::Handle const&)':
    /home/devk/workspace/hello_srv/Debug/../Hello.cpp:122: undefined reference to IceInternal::OutgoingAsync::OutgoingAsync(IceInternal::ProxyHandle<IceProxy::Ice::Object> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, IceUtil::Handle<IceInternal::CallbackBase> const&, IceInternal::Handle<Ice::LocalObject> const&)' /home/devk/workspace/hello_srv/Debug/../Hello.cpp:125: undefined reference toIceInternal::OutgoingAsync::prepare(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Ice::OperationMode, std::map<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::less<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits, std::allocator > const, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > > const)'
    ./Hello.o: In function IceProxy::Demo::Hello::end_shutdown(IceInternal::Handle<Ice::AsyncResult> const&)': makefile:44: recipe for target 'hello_srv' failed /home/devk/workspace/hello_srv/Debug/../Hello.cpp:139: undefined reference toIceProxy::Ice::Object::__end(IceInternal::Handle const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
    ./Hello.o: In function Demo::Hello::__dispatch(IceInternal::Incoming&, Ice::Current const&)': /home/devk/workspace/hello_srv/Debug/../Hello.cpp:238: undefined reference toIce::OperationNotExistException::OperationNotExistException(char const
    , int, Ice::Identity const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
    ./Hello.o: In function Demo::__patch(IceInternal::Handle<Demo::Hello>&, IceInternal::Handle<Ice::Object> const&)': /home/devk/workspace/hello_srv/Debug/../Hello.cpp:293: undefined reference toIceInternal::Ex::throwUOE(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, IceInternal::Handle const&)'
    ./Hello.o:(.rodata._ZTVN4Demo5HelloE[_ZTVN4Demo5HelloE]+0x108): undefined reference to Ice::Object::ice_operationAttributes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ./Hello.o:(.rodata._ZTCN4Demo5HelloE0_N3Ice6ObjectE[_ZTVN4Demo5HelloE]+0x28): undefined reference toIce::Object::ice_isA(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Ice::Current const&) const'
    ./Hello.o:(.rodata._ZTCN4Demo5HelloE0_N3Ice6ObjectE[_ZTVN4Demo5HelloE]+0x38): undefined reference to Ice::Object::ice_ids[abi:cxx11](Ice::Current const&) const' ./Hello.o:(.rodata._ZTCN4Demo5HelloE0_N3Ice6ObjectE[_ZTVN4Demo5HelloE]+0x40): undefined reference toIce::Object::ice_id[abi:cxx11](Ice::Current const&) const'
    ./Hello.o:(.rodata._ZTCN4Demo5HelloE0_N3Ice6ObjectE[_ZTVN4Demo5HelloE]+0x48): undefined reference to Ice::Object::ice_operationAttributes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ./HelloI.o:(.rodata._ZTV6HelloI[_ZTV6HelloI]+0x108): undefined reference toIce::Object::ice_operationAttributes(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
    ./HelloI.o:(.rodata._ZTC6HelloI0_N4Demo5HelloE[_ZTV6HelloI]+0x108): undefined reference to Ice::Object::ice_operationAttributes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const' ./HelloI.o:(.rodata._ZTC6HelloI0_N3Ice6ObjectE[_ZTV6HelloI]+0x28): undefined reference toIce::Object::ice_isA(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, Ice::Current const&) const'
    ./HelloI.o:(.rodata._ZTC6HelloI0_N3Ice6ObjectE[_ZTV6HelloI]+0x38): undefined reference to Ice::Object::ice_ids[abi:cxx11](Ice::Current const&) const' ./HelloI.o:(.rodata._ZTC6HelloI0_N3Ice6ObjectE[_ZTV6HelloI]+0x40): undefined reference toIce::Object::ice_id[abi:cxx11](Ice::Current const&) const'
    ./HelloI.o:(.rodata._ZTC6HelloI0_N3Ice6ObjectE[_ZTV6HelloI]+0x48): undefined reference to `Ice::Object::ice_operationAttributes(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
    collect2: error: ld returned 1 exit status
    make: *** [hello_srv] Error 1

    18:48:56 Build Finished (took 5s.553ms)

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Hi Victor,

    What Ice version are you using? seems like you are using ice-demos from master but Ice 3.6, if that is the case you should use ice-demos 3.6 branch

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    seems c++11 issues(all are related to std::string). but I linked my project with -L/usr/lib64/c++11.

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    libIceBox++11.so.3.6.2

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    /usr/lib64/libIce++11.so.3.6.2

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    What about demos are you using 3.6 branch?

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    hi,
    this is another icebox project. stll can't run.

    icebox++11 --Ice.Config=config.icebox
    !! 07/13/16 19:37:03.311 icebox++11: error: ServiceManager: unable to load entry point `./cst_server:launch_create': ./libcst_server++11.so: undefined symbol: _ZNK3Ice6Object23ice_operationAttributesERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

    Building file: ../load_service.cpp
    Invoking: GCC C++ Compiler
    g++ -I"/home/devk/workspace/cst_server" -O0 -g3 -Wall -c -fmessage-length=0 -m64 -Wno-unknown-pragmas -fPIC -MMD -MP -MF"load_service.d" -MT"load_service.o" -o "load_service.o" "../load_service.cpp"
    Finished building: ../load_service.cpp

    Building target: libcst_server.so
    Invoking: GCC C++ Linker
    g++ -L/usr/lib64/c++11 -pthread -Wl,-rpath,/usr/lib64/c++11 -shared -o "libcst_server.so" ./common.o ./data_db-odb.o ./data_db_common.o ./data_info.o ./data_mgmt.o ./data_mgmt_impl.o ./internal_process.o ./internal_process_impl.o ./load_service.o -lodb -lodb-boost -lodb-mysql -lcrypto -lIce -lIceUtil
    Finished building target: libcst_server.so

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    ldd libcst_server++11.so
    linux-vdso.so.1 (0x00007ffd45716000)
    libodb-2.4.so => /lib64/libodb-2.4.so (0x00007f4b8e961000)
    libodb-boost-2.4.so => /lib64/libodb-boost-2.4.so (0x00007f4b8e75d000)
    libodb-mysql-2.4.so => /lib64/libodb-mysql-2.4.so (0x00007f4b8e533000)
    libcrypto.so.10 => /lib64/libcrypto.so.10 (0x00007f4b8e0d3000)
    libIce++11.so.36 => /lib64/libIce++11.so.36 (0x00007f4b8db2e000)
    libIceUtil++11.so.36 => /lib64/libIceUtil++11.so.36 (0x00007f4b8d8ea000)
    libstdc++.so.6 => /lib64/libstdc++.so.6 (0x00007f4b8d563000)
    libm.so.6 => /lib64/libm.so.6 (0x00007f4b8d258000)
    libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f4b8d041000)
    libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f4b8ce25000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f4b8ca62000)
    /lib64/ld-linux-x86-64.so.2 (0x000055ec63ea1000)
    libboost_system.so.1.60.0 => /lib64/libboost_system.so.1.60.0 (0x00007f4b8c85e000)
    libmysqlclient.so.18 => /usr/lib64/mysql/libmysqlclient.so.18 (0x00007f4b8c2e6000)
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f4b8c0e1000)
    libz.so.1 => /lib64/libz.so.1 (0x00007f4b8becb000)
    libbz2.so.1 => /lib64/libbz2.so.1 (0x00007f4b8bcbb000)
    librt.so.1 => /lib64/librt.so.1 (0x00007f4b8bab2000)
    libssl.so.10 => /lib64/libssl.so.10 (0x00007f4b8b840000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f4b8b5f2000)
    libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007f4b8b30c000)
    libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007f4b8b108000)
    libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007f4b8aed6000)
    libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007f4b8acc7000)
    libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007f4b8aac3000)
    libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f4b8a8a8000)
    libselinux.so.1 => /lib64/libselinux.so.1 (0x00007f4b8a681000)
    libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f4b8a40d000)

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    How did you install Ice? did you build it your self or are you using a binary package if that is the case what package?

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    rpm -qa | grep ice
    libice3.6-c++-3.6.2-1.el7.x86_64
    device-mapper-persistent-data-0.6.2-0.1.rc6.fc24.x86_64
    php-ice-devel-3.6.2-1.el7.x86_64
    libice-java-3.6.2-1.el7.x86_64
    tigervnc-license-1.6.0-6.fc24.noarch
    bind-license-9.10.4-1.P1.fc24.noarch
    icebox-3.6.2-1.el7.x86_64
    device-mapper-libs-1.02.122-2.fc24.x86_64
    ice-utils-3.6.2-1.el7.x86_64
    device-mapper-multipath-libs-0.4.9-81.fc24.x86_64
    hyperv-daemons-license-0-0.14.20150702git.fc24.noarch
    ice-slice-3.6.2-1.el7.noarch
    libice-c++-devel-3.6.2-1.el7.x86_64
    device-mapper-multipath-0.4.9-81.fc24.x86_64
    device-mapper-event-libs-1.02.122-2.fc24.x86_64
    icegrid-3.6.2-1.el7.x86_64
    kf5-kservice-5.22.0-1.fc24.x86_64
    ice-all-devel-3.6.2-1.el7.x86_64
    libnice-gstreamer1-0.1.13-4.fc24.x86_64
    device-mapper-event-1.02.122-2.fc24.x86_64
    php-ice-3.6.2-1.el7.x86_64
    icepatch2-3.6.2-1.el7.x86_64
    libimobiledevice-1.2.0-7.fc24.x86_64
    ice-utils-java-3.6.2-1.el7.noarch
    libicestorm3.6-3.6.2-1.el7.x86_64
    bind99-license-9.9.9-1.P1.fc24.noarch
    device-mapper-1.02.122-2.fc24.x86_64
    libnice-0.1.13-4.fc24.x86_64
    spice-vdagent-0.16.0-3.fc24.x86_64
    ice-all-runtime-3.6.2-1.el7.x86_64

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    rpm -qa | grep ice
    libice3.6-c++-3.6.2-1.el7.x86_64
    device-mapper-persistent-data-0.6.2-0.1.rc6.fc24.x86_64
    php-ice-devel-3.6.2-1.el7.x86_64
    libice-java-3.6.2-1.el7.x86_64
    tigervnc-license-1.6.0-6.fc24.noarch
    bind-license-9.10.4-1.P1.fc24.noarch
    icebox-3.6.2-1.el7.x86_64
    device-mapper-libs-1.02.122-2.fc24.x86_64
    ice-utils-3.6.2-1.el7.x86_64
    device-mapper-multipath-libs-0.4.9-81.fc24.x86_64
    hyperv-daemons-license-0-0.14.20150702git.fc24.noarch
    ice-slice-3.6.2-1.el7.noarch
    libice-c++-devel-3.6.2-1.el7.x86_64
    device-mapper-multipath-0.4.9-81.fc24.x86_64
    device-mapper-event-libs-1.02.122-2.fc24.x86_64
    icegrid-3.6.2-1.el7.x86_64
    kf5-kservice-5.22.0-1.fc24.x86_64
    ice-all-devel-3.6.2-1.el7.x86_64
    libnice-gstreamer1-0.1.13-4.fc24.x86_64
    device-mapper-event-1.02.122-2.fc24.x86_64
    php-ice-3.6.2-1.el7.x86_64
    icepatch2-3.6.2-1.el7.x86_64
    libimobiledevice-1.2.0-7.fc24.x86_64
    ice-utils-java-3.6.2-1.el7.noarch
    libicestorm3.6-3.6.2-1.el7.x86_64
    bind99-license-9.9.9-1.P1.fc24.noarch
    device-mapper-1.02.122-2.fc24.x86_64
    libnice-0.1.13-4.fc24.x86_64
    spice-vdagent-0.16.0-3.fc24.x86_64
    ice-all-runtime-3.6.2-1.el7.x86_64

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    are this from Ice el7 repository https://zeroc.com/download/rpm/zeroc-ice-el7.repo? that package are for rhel7 build with GCC 4.8 and are not compatible with Fedora 24 GCC 6.

    If you want to use GCC 6 which is not a supported platform for Ice 3.6, you might need to build Ice 3.6 from sources.

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    OK.~.
    Thanks a lot.
    how to build Ice3.6 source

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
  • gasilugasilu Member Victor LuOrganization: noneProject: none

    HI,
    " Ice el7 repository https://zeroc.com/download/rpm/zeroc-ice-el7.repo" supports CentOS-7-x86_64?

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Centos7 should work, but we officially only support and test Red Hat Enterprise Linux 7

    Se the list of supported platforms

  • gasilugasilu Member Victor LuOrganization: noneProject: none

    Hi, Jose,
    u r right. CentOS7 works.
    But I met ConnectionRefused problems when i used iceboxadmin.

    iceboxadmin start XXxSvc --Ice.Config=config.admin
    !! 07/14/16 11:43:19.580 iceboxadmin: error: Network.cpp:2365: Ice::ConnectionRefusedException:
    connection refused: Connection refused

    the configs of iceboxadmin is copied from Hello. the port is 9996.

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff

    Try to enable network tracing in icebox and iceboxadmin with --Ice.Trace.Network=3 in the command line, this will trace connection attempts and will help to figure us what is happening.

Sign In or Register to comment.