Compiling error on Linux (OEL 7.3)

RCFProto support and general discussion.
Post Reply
Posts: 1
Joined: Tue Mar 21, 2017 5:44 am

Compiling error on Linux (OEL 7.3)

Post by shukant »

We are trying to deploy RCF server on Linux but getting error while execute "make" command.
OS: OEL 7.3
Protoc version: 2.4.1
Purpose to make source code is to create .so files for linux system.
Ref. url: ... /java.html

We have followed steps given for Ubuntu (Linux) and find below error:
[root@hostname make]# cmake -G "Unix Makefiles" ..
-- Boost version: 1.53.0
Using RCF source from directory: /home/user1/RCFProtoc/RCFProto-src-
JAVA_HOME environment variable is not set. Setting JAVA_HOME to/usr/java/jdk1.8.0_60 , to assist cmake in finding JNI headers.
Searching for Protocol Buffers Java bindings.
Trying: /usr/share/java/protobuf.jar
Trying: /usr/share/java/protobuf-java.jar
Found Protocol Buffers Java bindings: /usr/share/java/protobuf-java.jar
*** RCFProto build: Third party dependency summary ***
RCF include path: /home/user1/RCFProtoc/RCFProto-src-
Boost include path: /usr/include
Protobuf include path: /usr/local/include
Protobuf libs: optimized/usr/local/lib/libprotobuf.sodebug/usr/local/lib/
Protobuf debug lib: /usr/local/lib/
Protobuf Java class path: /usr/share/java/protobuf-java.jar
JNI include paths: /usr/java/jdk1.8.0_60/include/usr/java/jdk1.8.0_60/include/linux/usr/java/jdk1.8.0_60/include
Java compiler: /usr/java/default/bin/javac
Java runtime: /usr/java/default/bin/java
Java archiver: /usr/java/default/bin/jar
Python include paths: /usr/include/python2.7
Python libs: /usr/lib64/
ZLIB include path: /usr/include
OpenSSL include path: /usr/include
Using Python interpreter: /usr/bin/python
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user1/RCFProtoc/RCFProto-src-
[root@hostname make]# make
[ 5%] Built target CppDemoDir
[ 11%] Built target CppDemoProto
[ 16%] Built target RCF
[ 22%] Built target RCFProto
Linking CXX executable DemoClientCpp
libRCF.a(RCF.cpp.o): In function `RCF::RcfServer::resolveServiceThreadPools(boost::shared_ptr<RCF::I_Service>) const':
RCF.cpp:(.text+0x5c904): undefined reference to `typeinfo for RCF::UdpServerTransport'
collect2: error: ld returned 1 exit status
make[2]: *** [DemoClientCpp] Error 1
make[1]: *** [CMakeFiles/DemoClientCpp.dir/all] Error 2
make: *** [all] Error 2

Please help to get it make successfully.
Or please share and RCFProto.jar for same protoc version and OS.
Or please share steps to deploy on OEL 7.3.

Thank you in advance!


Posts: 238
Joined: Mon Oct 03, 2011 4:53 am

Re: Compiling error on Linux (OEL 7.3)

Post by jarl »

I'm not sure what's going on there. Can you verify that you have the relevant RTTI compiler flags turned on for all the binaries you are building?

If worst comes to worst, you can try commenting out the code that is causing the linker error, in RcfServer.cpp:

Code: Select all

            if (taskEntry.mMuxerType == Mt_None && !taskEntry.mLocalThreadPoolPtr)
                taskEntry.mLocalThreadPoolPtr.reset( new ThreadPool(1) );

                //if ( mThreadPoolPtr && boost::dynamic_pointer_cast<UdpServerTransport>(servicePtr) )
                //    for ( std::size_t i = 0; i < mThreadPoolPtr->mThreadInitFunctors.size(); ++i )
                //    {
                //        taskEntry.mLocalThreadPoolPtr->addThreadInitFunctor(mThreadPoolPtr->mThreadInitFunctors[i]);
                //    }
                //    for ( std::size_t i = 0; i < mThreadPoolPtr->mThreadDeinitFunctors.size(); ++i )
                //    {
                //        taskEntry.mLocalThreadPoolPtr->addThreadDeinitFunctor(mThreadPoolPtr->mThreadDeinitFunctors[i]);
                //    }
Kind Regards

Jarl Lindrud
Delta V Software

Post Reply