Page 1 of 1

Compiling error on Linux (OEL 7.3)

Posted: Tue Mar 21, 2017 5:59 am
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: http://www.deltavsoft.com/RCFProto/dist ... /java.html

We have followed steps given for Ubuntu (Linux) and find below error:
---------------------------------------------------------------------------------------
[root@hostname make]# cmake -G "Unix Makefiles" ..
CMAKE_BUILD_TYPE: Release
-- Boost version: 1.53.0
Using RCF source from directory: /home/user1/RCFProtoc/RCFProto-src-1.2.0.0/cpp/src/RCF
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-1.2.0.0/cpp/src/RCF/include
Boost include path: /usr/include
Protobuf include path: /usr/local/include
Protobuf libs: optimized/usr/local/lib/libprotobuf.sodebug/usr/local/lib/libprotobuf.so-lpthread
Protobuf debug lib: /usr/local/lib/libprotobuf.so
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/libpython2.7.so
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-1.2.0.0/make
[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 libRCFProto_Java_impl.so and RCFProto.jar for same protoc version and OS.
Or please share steps to deploy on OEL 7.3.

Thank you in advance!

Regards,
Shukant

Re: Compiling error on Linux (OEL 7.3)

Posted: Wed Mar 22, 2017 10:05 am
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]);
                //    }
                //}
            }