make check failure

Asked by BHASKAR TILAK

make check failing with following output :
"no function found to run cmocka tests"

making check in comp
make[2]: Entering directory `/home/bhatil1/rohc-db/rohc-master/src/comp'
Making check in schemes
make[3]: Entering directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes'
Making check in .
make[4]: Entering directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes'
make[4]: Nothing to be done for `check-am'.
make[4]: Leaving directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes'
Making check in test
make[4]: Entering directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes/test'
make test_rfc4996 test_tcp_ts_opt
make[5]: Entering directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes/test'
make[5]: `test_rfc4996' is up to date.
  CC test_tcp_ts_opt-test_tcp_ts_opt.o
test_tcp_ts_opt.c:153:4: error: #error "no function found to run cmocka tests"
make[5]: *** [test_tcp_ts_opt-test_tcp_ts_opt.o] Error 1
make[5]: Leaving directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes/test'
make[4]: *** [check-am] Error 2
make[4]: Leaving directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes/test'
make[3]: *** [check-recursive] Error 1
make[3]: Leaving directory `/home/bhatil1/rohc-db/rohc-master/src/comp/schemes'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/home/bhatil1/rohc-db/rohc-master/src/comp'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/home/bhatil1/rohc-db/rohc-master/src'
make: *** [check-recursive] Error 1

Thanks,
- Bhaskar

Question information

Language:
English Edit question
Status:
Answered
For:
rohc Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Didier Barvaux (didier-barvaux) said :
#1

Hello,

Your system misses some required dependencies for building and running tests. They are checked by the configure script if you ask it to check those dependencies. Run the following command to detect all of them:
  $ ./configure --enable-rohc-tests

In your case, I'm sure you miss the cmocka library. Install it with your package manager (apt-get install libcmocka-dev for Debian or Ubuntu).

See https://rohc-lib.org/wiki/doku.php?id=library-install-sources-options for the full list of configure options. Or run ./configure --help

Regards,
Didier

Revision history for this message
BHASKAR TILAK (batilak) said :
#2

Thaks for the prompt response.

I have moved on without tests for the time-being. however I will surely try this out when time permits.

Now, just for an experiment I commented the code which appends FAKE_PAYLOAD to IP packet and I see following problem.
The version is reported as 1.

build a fake IP packet
0x45 0x00 0x00 0x26 0x00 0x00 0x00 0x00
0x01 0x86 0xa9 0x3f 0x01 0x02 0x03 0x04
0x05 0x06 0x07 0x08
compress the fake IP packet
[net_pkt.c:68 net_pkt_parse()] outer IP header: 20 bytes
[net_pkt.c:70 net_pkt_parse()] outer IP header: version 1

However I realized that I failed to update the total_length in main(), when I corrected that I got the correct output as below:
enable several ROHC decompression profiles
build a fake IP packet
0x45 0x00 0x00 0x14 0x00 0x00 0x00 0x00
0x01 0x86 0xa9 0x3f 0x01 0x02 0x03 0x04
0x05 0x06 0x07 0x08
compress the fake IP packet
[net_pkt.c:68 net_pkt_parse()] outer IP header: 20 bytes
[net_pkt.c:70 net_pkt_parse()] outer IP header: version 4
[net_pkt.c:75 net_pkt_parse()] outer IP header: next header is of type 134
[net_pkt.c:80 net_pkt_parse()] outer IP header: next layer is of type 134

How the reading of version is related here, I see some problem here:
Please correct me if I am wrong; just by changing the total-length from 0x26 to 0x14 how does it start reporting correct version?
The ip_hdr in below code is not same as iphdr we used in main() function.

bool ip_create(struct ip_packet *const ip,
               const uint8_t *const packet,
               const size_t size)
{
    const struct ip_hdr *const ip_hdr = (struct ip_hdr *) packet;

    /* get the version of the IP packet */
    if(size >= sizeof(struct ip_hdr))
    {
        ip->version = ip_hdr->version;
    }
    else
    {
        ip->version = IP_UNKNOWN;
    }

......
}

Thanks in advance.

Revision history for this message
BHASKAR TILAK (batilak) said :
#3

BYTE_ORDER is LITTLE ENDIAN
and WORDS_BIGENDIAN=0

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#4

Hello,

The IP version variable in the code of the ROHC library is either used for the real IP version of the IP packet (values 4 or 6) or either for advertising some problem. In your case, the problem is a malformed IPv4 header (special value 1). The malformation is the unexpected total length. That's why the correction of the total length changed the value from 1 to 4.

All the possible values are stored in the following enum:

/// IP version
typedef enum
{
   /// IP version 4
   IPV4 = 4,
   /// IP version 6
   IPV6 = 6,
   /// not IP
   IP_UNKNOWN = 0,
   /// IP version 4 (malformed)
   IPV4_MALFORMED = 1,
   /// IP version 6 (malformed)
   IPV6_MALFORMED = 2,
} ip_version;

Regards,
Didier

Revision history for this message
gael anyouzoa (ganyouzoa) said :
#5

Hi, i have got new errorwhen i'm trying make all comandthe output is the following
Thanks
root@asterisk:/usr/src/iprohc-0.7.1# make all
[  9%] Building C object common/CMakeFiles/iprohc_common.dir/tun_helpers.c.o
/usr/src/iprohc-0.7.1/common/tun_helpers.c:31:24: fatal error: libnetlink.h: Aucun fichier ou dossier de ce type
 #include <libnetlink.h>
                        ^
compilation terminated.
make[2]: *** [common/CMakeFiles/iprohc_common.dir/tun_helpers.c.o] Erreur 1
make[1]: *** [common/CMakeFiles/iprohc_common.dir/all] Erreur 2
make: *** [all] Erreur 2

    Le Samedi 12 novembre 2016 10h29, Didier Barvaux <email address hidden> a écrit :

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

Didier Barvaux proposed the following answer:
Hello,

The IP version variable in the code of the ROHC library is either used
for the real IP version of the IP packet (values 4 or 6) or either for
advertising some problem. In your case, the problem is a malformed IPv4
header (special value 1). The malformation is the unexpected total
length. That's why the correction of the total length changed the value
from 1 to 4.

All the possible values are stored in the following enum:

/// IP version
typedef enum
{
  /// IP version 4
  IPV4 = 4,
  /// IP version 6
  IPV6 = 6,
  /// not IP
  IP_UNKNOWN = 0,
  /// IP version 4 (malformed)
  IPV4_MALFORMED = 1,
  /// IP version 6 (malformed)
  IPV6_MALFORMED = 2,
} ip_version;

Regards,
Didier

--
You received this question notification because your team ROHC Team 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

Revision history for this message
Didier Barvaux (didier-barvaux) said :
#6

Hi Gaël,

You asked the same question on another thread. I answered you there yesterday. See my last message there : https://answers.launchpad.net/rohc/+question/403402

Regards,
Didier

Revision history for this message
gael anyouzoa (ganyouzoa) said :
#7

Hi didier,this is my issue throught ubuntu, and centos,i have got the same error link on "include <libnetlink.h>"
is it iprohc system error??i have tried version iprohc 1.7.1 and 1.5.0i got the same issue.need more informations about..
root@asterisk:/usr/src/iprohc-0.7.1# make all
[  9%] Building C object common/CMakeFiles/iprohc_common.dir/tun_helpers.c.o
/usr/src/iprohc-0.7.1/common/tun_helpers.c:31:24: fatal error: libnetlink.h: Aucun fichier ou dossier de ce type
 #include <libnetlink.h>
                        ^
compilation terminated.
make[2]: *** [common/CMakeFiles/iprohc_common.dir/tun_helpers.c.o] Erreur 1
make[1]: *** [common/CMakeFiles/iprohc_common.dir/all] Erreur 2
make: *** [all] Erreur 2

Best regardsGael

    Le Dimanche 13 novembre 2016 9h47, Didier Barvaux <email address hidden> a écrit :

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

Didier Barvaux posted a new comment:
Hi Gaël,

You asked the same question on another thread. I answered you there
yesterday. See my last message there :
https://answers.launchpad.net/rohc/+question/403402

Regards,
Didier

--
You received this question notification because your team ROHC Team 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 BHASKAR TILAK for more information if necessary.

To post a message you must log in.