build instructions for IPROHC

Asked by matthew on 2013-04-17

Are build/instructions planned to be released for iprohc similar to what exists for rohc-lib? I see that the source code comes with an INSTALL file, but honestly I'm not familiar with cmake and my initial attempts show that simply typing cmake is not sufficient :-D

Thanks for your effort.

Question information

Language:
English Edit question
Status:
Answered
For:
rohc Edit question
Assignee:
No assignee Edit question
Last query:
2013-04-17
Last reply:
2013-05-19

Matthew,

The instructions in the INSTALL file are pretty simple. Here is the important part:

> Build and install
> -----------------
>
> Configure the program:
>
> $ cmake CMakeLists.txt
>
> Build the program:
>
> $ make all
>
> Install the program:
>
> $ make install

The 3 above commands are required. Type them in the same order. You have to be located at the root of the IP/ROHC sources. If one of them fails, tell me and send me the output of the failed command.

Regards,
Didier

matthew (xcalibre0) said : #3

Here is the error I get from doing a fresh attempt at cmake, this is after I installed gnutls-dev:

cmake CMakeLists.txt
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.23")
-- checking for module 'rohc'
-- found rohc, version 1.5.1
-- Found ROHC: 1.5.1
-- Performing Test NEW_RTNL
-- Performing Test NEW_RTNL - Failed
Using old rtnl_talk prototype
Stats with collectd disabled
-- checking for module 'gnutls'
-- package 'gnutls' not found
CMake Error at /home/user/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message):
  Could NOT find GnuTLS (missing: GNUTLS_LIBRARY GNUTLS_INCLUDE_DIR)
Call Stack (most recent call first):
  /home/user/cmake-2.8.10.2-Linux-i386/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE)
  FindGnuTLS.cmake:60 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  client/CMakeLists.txt:10 (find_package)

-- Configuring incomplete, errors occurred!

Matthew,

> Those instructions don't work on my system, and I doubt
> they will work on many redhat dev systems.

I'm sorry for you. The INSTALL file is not targeting Redhat
systems only. The instructions are generic. And they will
remain as is. Instructions for specific systems could be
described in the project's wiki. That's done that way for the
ROHC library.

> 1. Cmake is not installed by default on most systems and
> needs to be installed.

Yes. I have just added a new sentence in the INSTALL file that
reads: "Please install Cmake and any above dependencies from
sources or with your favorite package manager before going
further."

> 2. There is an environment variable which I believe is
> CMAKE_CXX_COMPILER that must be set to the location of
> your compiler. The cmake program generates a file called the
> CMakeList.cache I believe and the variable must be found and
> set in that file to the location of your GCC or other compiler.

Cmake tells you that you miss a C++ compiler (first hit with Google
search). You can get rid of the warning by installing g++. However
IP/ROHC does not use C++, so I updated the Cmake config file to
disable that check. Thank you for reporting the problem!

> 3. Additionally the system requires you to install gnutls-dev NOT
> gnutls that was another issue I ran into.

A Redhat system requires you that, some other systems may requires
a gnutls-devel package, others may not require anything. It depends on
your system. I would welcome a new page on the wiki that describes the
specific installation steps for Redhat systems.

Regards,
Didier

matthew (xcalibre0) said : #5

I've tried to register on the wiki site so I can make this page, I'm still waiting on the email that provides me access.

matthew (xcalibre0) said : #6

On to the next issue, it seems that the compile assumes that the .h files of rohc-lib are in some magical default location, however, mine are not. How do I change where cmake is looking for these include files, or where do i need to make sure the rohc-lib .h files are copied to?

error text is :
/workspace/iprohc/common/rohc_tunnel.c:39:25: error: rohc_traces.h: No such file or directory

Matthew,

The logs of the server report that there was a temporary DNS failure when resolving the MX for your domain name. Maybe due to the very small TTL of the record. It should work next time the mail server will try. I'll watch the logs tomorrow to check the status.

Regards,
Didier

matthew (xcalibre0) said : #8

When I compile iprohc can not find rohc_traces.h and dllexport.h from the rohc-lib library. As a temporary fix I copied both of those files to /usr/local/include. After that change the build still fails with the following error:

my question is does iprohc only work with the main trunk of lib-rohc and not the distributed 1.5.1?

Thanks again for all your help.

└──> make all
[ 9%] Building C object common/CMakeFiles/iprohc_common.dir/rohc_tunnel.c.o
/home/user/workspace/iprohc/common/rohc_tunnel.c:72: error: expected ‘)’ before ‘level’
/home/user/workspace/iprohc/common/rohc_tunnel.c: In function ‘new_tunnel’:
/home/user/workspace/iprohc/common/rohc_tunnel.c:282: warning: implicit declaration of function ‘rohc_comp_set_traces_cb’
/home/user/workspace/iprohc/common/rohc_tunnel.c:282: error: ‘print_rohc_traces’ undeclared (first use in this function)
/home/user/workspace/iprohc/common/rohc_tunnel.c:282: error: (Each undeclared identifier is reported only once
/home/user/workspace/iprohc/common/rohc_tunnel.c:282: error: for each function it appears in.)
/home/user/workspace/iprohc/common/rohc_tunnel.c:290: warning: implicit declaration of function ‘rohc_comp_set_rtp_detection_cb’
/home/user/workspace/iprohc/common/rohc_tunnel.c:307: warning: implicit declaration of function ‘rohc_decomp_set_traces_cb’
/home/user/workspace/iprohc/common/rohc_tunnel.c: In function ‘tun2raw’:
/home/user/workspace/iprohc/common/rohc_tunnel.c:572: error: ‘rohc_comp_last_packet_info2_t’ undeclared (first use in this function)
/home/user/workspace/iprohc/common/rohc_tunnel.c:572: error: expected ‘;’ before ‘last_packet_info’
/home/user/workspace/iprohc/common/rohc_tunnel.c:607: warning: implicit declaration of function ‘rohc_compress2’
/home/user/workspace/iprohc/common/rohc_tunnel.c:635: error: ‘last_packet_info’ undeclared (first use in this function)
/home/user/workspace/iprohc/common/rohc_tunnel.c:637: warning: implicit declaration of function ‘rohc_comp_get_last_packet_info2’
/home/user/workspace/iprohc/common/rohc_tunnel.c: At top level:
/home/user/workspace/iprohc/common/rohc_tunnel.c:925: error: expected ‘)’ before ‘level’
make[2]: *** [common/CMakeFiles/iprohc_common.dir/rohc_tunnel.c.o] Error 1
make[1]: *** [common/CMakeFiles/iprohc_common.dir/all] Error 2
make: *** [all] Error 2

Matthew,

> On to the next issue, it seems that the compile assumes that the .h files
> of rohc-lib are in some magical default location, however, mine are not.
> How do I change where cmake is looking for these include files, or where
> do i need to make sure the rohc-lib .h files are copied to?

I wouldn't say "magical" because they are the standard directories /usr/include
for includes and /usr/lib for libraries, but you're right there is a problem with the
configuration of the build system.

We can specify a different directory with the following command:
 $ PKG_CONFIG_PATH=/tmp/rohc-main/lib/pkgconfig/ cmake CMakeLists.txt

It checks that the ROHC libraries are available in /tmp/rohc-main/lib/ and the include
files in /tmp/rohc-main/include with pkg-config. However those information are not
used afterwards.

If fixed the problem in revision 100:
    revno: 100
    committer: Didier Barvaux
    branch nick: iprohc
    timestamp: Sun 2013-04-21 14:21:13 +0200
    message:
      Use include paths reported by pkg-config for ROHC library instead of default one.

> When I compile iprohc can not find rohc_traces.h and dllexport.h from the rohc-lib
> library. As a temporary fix I copied both of those files to /usr/local/include. After
> that change the build still fails with the following error:
>
> my question is does iprohc only work with the main trunk of lib-rohc and not the
> distributed 1.5.1?

That's right. The iprohc application requires the main dev branch of the ROHC library,
ie. the future 1.6.0 release. You can get it from Launchpad with Bazaar.

I have just added a check for the newer functions that were introduced after the
1.5.x branch:
    revno: 101
    committer: Didier Barvaux
    branch nick: iprohc
    timestamp: Sun 2013-04-21 14:22:54 +0200
    message:
      Check the presence of the ROHC function rohc_compress2() during configuration.

It now fails as follow with one 1.5.x version:
    $ PKG_CONFIG_PATH=/tmp/rohc-1.5.x/lib/pkgconfig/ cmake CMakeLists.txt
    -- The C compiler identification is GNU 4.7.2
    -- Check for working C compiler: /usr/bin/gcc
    -- Check for working C compiler: /usr/bin/gcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Looking for include file pthread.h
    -- Looking for include file pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - not found.
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
    -- checking for module 'rohc'
    -- found rohc, version 1.5.x
    -- Found ROHC: 1.5.x
    -- Looking for rohc_compress2 in rohc_comp
    -- Looking for rohc_compress2 in rohc_comp - not found
    CMake Error at common/FindROHC.cmake:41 (message):
      rohc_compress2() not available in the ROHC library, please upgrade to 1.6.0
      or greater
    Call Stack (most recent call first):
      common/CMakeLists.txt:6 (find_package)

    -- Configuring incomplete, errors occurred!

Thank you for your reports!

Regards,
Didier

Matthew,

> The logs of the server report that there was a temporary DNS failure
> when resolving the MX for your domain name. Maybe due to the very small
> TTL of the record. It should work next time the mail server will try.
> I'll watch the logs tomorrow to check the status.

Should be OK now. If still don't receive the email, tell me.

Regards,
Didier

I forgot to tell you: I added the generic installation instructions for the IP/ROHC program on the wiki. See http://rohc-lib.org/wiki/doku.php?id=summary#ip_rohc_tunnel . Feel free to add some instructions dedicated to Redhat when needed.

matthew (xcalibre0) said : #12

Excellent I will do!

matthew (xcalibre0) said : #13

I went to add instructions on the wiki but I don't believe I have the permissions to do so, I have the login now that you provided, but when I went to the source to modify I was told it was readonly.

Matthew,

> I went to add instructions on the wiki but I don't believe I have
> the permissions to do so, I have the login now that you provided,
> but when I went to the source to modify I was told it was readonly.

You're totally right. There was a typo in the name of the default
group for new users, you got no edition rights. I fixed it. Sorry for the
inconvenience.

Regards,
Didier

Jamal Hossain (jamalbd) said : #15

I am getting the same error , while trying to install iprohc-0.6. Is there any solution?

Thank you,Jamal

Jamal,

> I am getting the same error , while trying to install iprohc-0.6. Is there any solution?

What error? Matthew encountered several different problems. Please tell me which one(s), so that I can help you.

Did you followed instructions on the wiki [1] ? The section about possible problems and their respective solutions [2] might be of special interest to you.

Regards,
Didier

[1] http://rohc-lib.org/wiki/doku.php?id=iprohc-install
[2] http://rohc-lib.org/wiki/doku.php?id=iprohc-install#possible_problems_and_solutions

Jamal Hossain (jamalbd) said : #17

Dear Didier,
Thank you for your reply. When I put make all , then following error showing:

[  9%] Building C object common/CMakeFiles/iprohc_common.dir/rohc_tunnel.c.o/root/iprohc-0.6/common/rohc_tunnel.c:72: error: expected â)â before âlevelâ/root/iprohc-0.6/common/rohc_tunnel.c: In function ânew_tunnelâ:/root/iprohc-0.6/common/rohc_tunnel.c:282: warning: implicit declaration of function ârohc_comp_set_traces_cbâ/root/iprohc-0.6/common/rohc_tunnel.c:282: error: âprint_rohc_tracesâ undeclared (first use in this function)/root/iprohc-0.6/common/rohc_tunnel.c:282: error: (Each undeclared identifier is reported only once/root/iprohc-0.6/common/rohc_tunnel.c:282: error: for each function it appears in.)/root/iprohc-0.6/common/rohc_tunnel.c:290: warning: implicit declaration of function ârohc_comp_set_rtp_detection_cbâ/root/iprohc-0.6/common/rohc_tunnel.c:307: warning: implicit declaration of function ârohc_decomp_set_traces_cbâ/root/iprohc-0.6/common/rohc_tunnel.c: In function âtun2rawâ:/root/iprohc-0.6/common/rohc_tunnel.c:572:
 error: ârohc_comp_last_packet_info2_tâ undeclared (first use in this function)/root/iprohc-0.6/common/rohc_tunnel.c:572: error: expected â;â before âlast_packet_infoâ/root/iprohc-0.6/common/rohc_tunnel.c:607: warning: implicit declaration of function ârohc_compress2â/root/iprohc-0.6/common/rohc_tunnel.c:635: error: âlast_packet_infoâ undeclared (first use in this function)/root/iprohc-0.6/common/rohc_tunnel.c:637: warning: implicit declaration of function ârohc_comp_get_last_packet_info2â/root/iprohc-0.6/common/rohc_tunnel.c: At top level:/root/iprohc-0.6/common/rohc_tunnel.c:925: error: expected â)â before âlevelâmake[2]: *** [common/CMakeFiles/iprohc_common.dir/rohc_tunnel.c.o] Error 1make[1]: *** [common/CMakeFiles/iprohc_common.dir/all] Error 2make: *** [all] Error 2

--- On Sun, 5/19/13, Didier Barvaux <email address hidden> wrote:

From: Didier Barvaux <email address hidden>
Subject: Re: [Rohc] [Question #226938]: build instructions for IPROHC
To: <email address hidden>
Date: Sunday, May 19, 2013, 2:21 AM

Question #226938 on rohc changed:
https://answers.launchpad.net/rohc/+question/226938

Didier Barvaux requested more information:
Jamal,

> I am getting the same error , while trying to install iprohc-0.6. Is
there any solution?

What error? Matthew encountered several different problems. Please tell
me which one(s), so that I can help you.

Did you followed instructions on the wiki [1]  ? The section about
possible problems and their respective solutions [2] might be of special
interest to you.

Regards,
Didier

[1] http://rohc-lib.org/wiki/doku.php?id=iprohc-install
[2] http://rohc-lib.org/wiki/doku.php?id=iprohc-install#possible_problems_and_solutions

--
You received this question notification because you are a member of ROHC
Team, which is an answer contact for rohc.

_______________________________________________
Mailing list: https://launchpad.net/~rohc
Post to     : <email address hidden>
Unsubscribe : https://launchpad.net/~rohc
More help   : https://help.launchpad.net/ListHelp

Can you help with this problem?

Provide an answer of your own, or ask matthew for more information if necessary.

To post a message you must log in.