Mailing List Archive

How to compile nDPI with JSON-C enabled?
Dear list

I downloaded the latest (development) version of nDPI from https://github.com/ntop/nDPI.
Now I can't find out to compile it with JSON-C support enabled:

[user@server nDPI-dev]$ ./example/ndpiReader -i /home/user/test.pcapng -j ./test.json
WARNING: this copy of ndpiReader has been compiled without JSON-C: json export disabled

What I do:
./autogen.sh
./configure --enable-json-c
./make

I have JSON-C installed:
[user@server nDPI-dev]$ sudo yum list installed | grep json-c
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
json-c.x86_64 0.11-4.el7_0 @anaconda

Operating system: CentOS 7.3

What am I doing wrong?
Thank you very much for any help.

Regards,
Marcel
Re: How to compile nDPI with JSON-C enabled? [ In reply to ]
Marcel
please install it form source or the development package

Luca

> On 18 Jul 2017, at 17:12, Lüthi Marcel FUB <Marcel.Luethi@vtg.admin.ch> wrote:
>
> Dear list
>
> I downloaded the latest (development) version of nDPI from https://github.com/ntop/nDPI <https://github.com/ntop/nDPI>.
> Now I can’t find out to compile it with JSON-C support enabled:
>
> [user@server nDPI-dev]$ ./example/ndpiReader -i /home/user/test.pcapng -j ./test.json
> WARNING: this copy of ndpiReader has been compiled without JSON-C: json export disabled
>
> What I do:
> ./autogen.sh
> ./configure --enable-json-c
> ./make
>
> I have JSON-C installed:
> [user@server nDPI-dev]$ sudo yum list installed | grep json-c
> Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
> json-c.x86_64 0.11-4.el7_0 @anaconda
>
> Operating system: CentOS 7.3
>
> What am I doing wrong?
> Thank you very much for any help.
>
> Regards,
> Marcel
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it <mailto:Ntop-misc@listgateway.unipi.it>
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc <http://listgateway.unipi.it/mailman/listinfo/ntop-misc>
Re: How to compile nDPI with JSON-C enabled? [ In reply to ]
Hello Luca

It worked – but it wasn’t that easy…
That’s what I did:

- Removed json-c (rpm --nodeps –e json-c)

- Downloaded json-c (https://github.com/json-c/json-c)

- Compiled it to ~/json-c

o ./autogen.sh

o ./configure --prefix=~/json-c

o make

o sudo make install

- Renamed ~/json-c/lib to ~/json-c/.libs

- Copied ~/json-c/include/json-c/* to ~/nDPI-dev/src/include

- Compiled nDPI:

o ./autogen.sh

o ./configure --enable-json-c

o make

o sudo make install

Probably this is not the correct way… ?

Maybe “How To Compile nDPI” should explain this a little bit more if anybody wants to use JSON too.

Thanks for your help!

Regards,
Marcel




Von: ntop-misc-bounces@listgateway.unipi.it [mailto:ntop-misc-bounces@listgateway.unipi.it] Im Auftrag von Luca Deri
Gesendet: Dienstag, 18. Juli 2017 20:49
An: ntop-misc@listgateway.unipi.it
Betreff: Re: [Ntop-misc] How to compile nDPI with JSON-C enabled?

Marcel
please install it form source or the development package

Luca

On 18 Jul 2017, at 17:12, Lüthi Marcel FUB <Marcel.Luethi@vtg.admin.ch<mailto:Marcel.Luethi@vtg.admin.ch>> wrote:

Dear list

I downloaded the latest (development) version of nDPI from https://github.com/ntop/nDPI.
Now I can’t find out to compile it with JSON-C support enabled:

[user@server nDPI-dev]$ ./example/ndpiReader -i /home/user/test.pcapng -j ./test.json
WARNING: this copy of ndpiReader has been compiled without JSON-C: json export disabled

What I do:
./autogen.sh
./configure --enable-json-c
./make

I have JSON-C installed:
[user@server nDPI-dev]$ sudo yum list installed | grep json-c
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
json-c.x86_64 0.11-4.el7_0 @anaconda

Operating system: CentOS 7.3

What am I doing wrong?
Thank you very much for any help.

Regards,
Marcel
_______________________________________________
Ntop-misc mailing list
Ntop-misc@listgateway.unipi.it<mailto:Ntop-misc@listgateway.unipi.it>
http://listgateway.unipi.it/mailman/listinfo/ntop-misc
Re: How to compile nDPI with JSON-C enabled? [ In reply to ]
> On 19 Jul 2017, at 15:09, Lüthi Marcel FUB <Marcel.Luethi@vtg.admin.ch> wrote:
>
> Hello Luca
>
> It worked – but it wasn’t that easy…
> That’s what I did:
> - Removed json-c (rpm --nodeps –e json-c)
> - Downloaded json-c (https://github.com/json-c/json-c <https://github.com/json-c/json-c>)
> - Compiled it to ~/json-c
> o ./autogen.sh
> o ./configure --prefix=~/json-c
> o make
> o sudo make install
> - Renamed ~/json-c/lib to ~/json-c/.libs
make install would help here I believe

Luca
> - Copied ~/json-c/include/json-c/* to ~/nDPI-dev/src/include
> - Compiled nDPI:
> o ./autogen.sh
> o ./configure --enable-json-c
> o make
> o sudo make install
>
> Probably this is not the correct way… J
>
> Maybe “How To Compile nDPI” should explain this a little bit more if anybody wants to use JSON too.
>
> Thanks for your help!
>
> Regards,
> Marcel
>
>
>
>
> Von: ntop-misc-bounces@listgateway.unipi.it <mailto:ntop-misc-bounces@listgateway.unipi.it> [mailto:ntop-misc-bounces@listgateway.unipi.it <mailto:ntop-misc-bounces@listgateway.unipi.it>] Im Auftrag von Luca Deri
> Gesendet: Dienstag, 18. Juli 2017 20:49
> An: ntop-misc@listgateway.unipi.it <mailto:ntop-misc@listgateway.unipi.it>
> Betreff: Re: [Ntop-misc] How to compile nDPI with JSON-C enabled?
>
> Marcel
> please install it form source or the development package
>
> Luca
>
> On 18 Jul 2017, at 17:12, Lüthi Marcel FUB <Marcel.Luethi@vtg.admin.ch <mailto:Marcel.Luethi@vtg.admin.ch>> wrote:
>
> Dear list
>
> I downloaded the latest (development) version of nDPI from https://github.com/ntop/nDPI <https://github.com/ntop/nDPI>.
> Now I can’t find out to compile it with JSON-C support enabled:
>
> [user@server nDPI-dev]$ ./example/ndpiReader -i /home/user/test.pcapng -j ./test.json
> WARNING: this copy of ndpiReader has been compiled without JSON-C: json export disabled
>
> What I do:
> ./autogen.sh
> ./configure --enable-json-c
> ./make
>
> I have JSON-C installed:
> [user@server nDPI-dev]$ sudo yum list installed | grep json-c
> Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
> json-c.x86_64 0.11-4.el7_0 @anaconda
>
> Operating system: CentOS 7.3
>
> What am I doing wrong?
> Thank you very much for any help.
>
> Regards,
> Marcel
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it <mailto:Ntop-misc@listgateway.unipi.it>
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc <http://listgateway.unipi.it/mailman/listinfo/ntop-misc>
>
> _______________________________________________
> Ntop-misc mailing list
> Ntop-misc@listgateway.unipi.it <mailto:Ntop-misc@listgateway.unipi.it>
> http://listgateway.unipi.it/mailman/listinfo/ntop-misc <http://listgateway.unipi.it/mailman/listinfo/ntop-misc>