davidediger / flow-tools

Automatically exported from code.google.com/p/flow-tools
Other
0 stars 0 forks source link

CFlow does not build with flow-tools 0.68.1 #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
 Date: Thu, 20 Sep 2007 10:32:12 -0300
From: Fernando Garcia <fernandosetegarcia@uol.com.br>
To: flow-tools@list.splintered.net
Subject: [Flow-tools] cflow-1.053 compile problem for flow-tools 0.68.1
X-Spam-Level:

Hello all    ,

Sorry if this is not the corret list, but in think it's strongly related...

Have anyone tried (and managed) compile Cflow-1.053 with flow-tools-0.68.1 ?

As recommended on INSTALL, Cflow must be compiled from dir contrib on
flow-tools dir. It looks for libft.a on ../../lib (considering it is in
contrib dir) to figure out it has to be compiled for flow-tools.

I figured out libft.a changed to libft.la on flow-tools-0.68.1.
Changelog has this comment:
"Compiles libft with -fPIC to work ok with libcflow-perl"

Dow anyone know any fix for this ? As cflow doens't find libft.a it
doesn't figure out it should be compiled for flow-tool.

I tried a little tick, changind Makefile.PL to look for libft.la. At a
first glance, it did work but when I run flowscan I got a weird error:
(probably due this "smooth" change).

-------- flowscan error --------------
Wanted function created
/usr/bin/perl: symbol lookup error:
/usr/lib/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Cflow/Cflow.so:
undefined symbol: fterr_setid
---------------------

I'm using 64bit arch, Suse 10.1.

Trying to use flow-tools-0.68 (with patchs, due 64bit problem) Cflow
doesn't compile.

Regards,

Fernando

Original issue reported on code.google.com by therap...@gmail.com on 20 Sep 2007 at 2:02

GoogleCodeExporter commented 8 years ago
I am maintaining a separate set of patches for flow-tools on FreeBSD/amd64.  We 
have
an extensive perl infrastructure based on Cflow.pm.  If this worked, I'd switch 
over
to the new fork in two, maybe three heartbeats.

I will happily test any patches on FreeBSD, and help get the new version into 
the
official FreeBSD ports tree.  (I'm a FreeBSD committer, I can help do that.  :-)

Original comment by agsheke...@gmail.com on 13 Oct 2007 at 10:43

GoogleCodeExporter commented 8 years ago
Hi!

Sorry for huge latency :)

In order to compile Cflow-1.053 on a system where flow-tools is already fully
installed (headers and devel libraries) you need to unpack it somewhere (not to 
the
contrib subdir, but literally, somewhere) and run
perl Makefile.PL CCFLAGS='-DOSU' LIBS='-lft'
make

This will do the trick.

This method is better than contrib/... one because it uses systemwide shared 
libft.so
and allows to properly package perl-Cflow.

Original comment by therap...@gmail.com on 26 Oct 2007 at 2:08

GoogleCodeExporter commented 8 years ago
I am trying to get Cflow working with flow-tools from this site
http://flow-tools.googlecode.com/files/flow-tools-0.68.4.tar.bz2

Although flow-tools install I am unable to compile Cflow and get that working 
which
is really frustrating.

I keep reading everywhere that:

 This assumes you have flow-tools installed on your system fully, 
including headers
 and development libraries. This is the only supported way to use Cflow.

I am stuck - please can anyone help me - how exactly do I install the headers 
and
development libraries?

Original comment by stevo1664@gmail.com on 6 Nov 2008 at 7:48

GoogleCodeExporter commented 8 years ago
I'm stumbling on compiling Cflow-1.053.

CentOS 5.4
perl-5.10.0
flow-tools-0.68.4.3

guru> cd /usr/local/src/Cflow-1.053
guru> perl Makefile.PL CCFLAGS='-DOSU' LIBS='-lft'
Found flow-tools... using "-DOSU -I../../lib -I../../lib/../include -L../../lib 
-lft -lz".
Note (probably harmless): No library found for -lft
Writing Makefile for Cflow
guru>
guru> make
cp Cflow.pm blib/lib/Cflow.pm
AutoSplitting blib/lib/Cflow.pm (blib/lib/auto/Cflow)
/opt/vdops/bin/perl /opt/vdops/lib/perl5/5.10.0/ExtUtils/xsubpp  -typemap /opt/v
dops/lib/perl5/5.10.0/ExtUtils/typemap  Cflow.xs > Cflow.xsc && mv Cflow.xsc Cfl
ow.c
cc -c  -I../../lib -I../../lib/.. -DOSU -O2   -DVERSION=\"1.053\" -DXS_VERSION=\
"1.053\" -fPIC "-I/opt/vdops/lib/perl5/5.10.0/x86_64-linux-thread-multi/CORE"   
Cflow.c
Cflow.xs:62:21: error: ftlib.h: No such file or directory
[...] 

I can fiddle Makefile.PL so that it can find the locally-installed flow-tools 
include
and lib directories ... and Cflow will then compile ... but it isn't functional
(missing at least one symbol:  fterr_setid)

guru> flowdumper ft-v05.2009-10-31.163152-0700  | head -50
/usr/local/bin/perl: symbol lookup error: /usr/local/lib/perl5/site_perl/5.10.0/
x86_64-linux-thread-multi/auto/Cflow/Cflow.so: undefined symbol: fterr_setid
guru> 

Seems to me that libft.a contains fterr_setid:
guru> string /usr/local/lib/libft.a | grep fterr_setid
fterr_setid
fterr_setid
fterr_setid
fterr_setid
guru>

Suggestions?

--sk

Stuart Kendrick
Fred Hutchinson Cancer Research Center
Seattle, WA USA

Original comment by stuart.k...@gmail.com on 1 Nov 2009 at 12:08

GoogleCodeExporter commented 8 years ago
Hello,

Were you able to resolve this particular issue of yours? I too having the same 
exact 
issue.

Ctang

Original comment by Tan...@gmail.com on 5 Dec 2009 at 1:52

GoogleCodeExporter commented 8 years ago
I've have tried on and off to get Cflow to compile on RHEL5 for months now. It 
always
worked fine on RHEL4. The following posts helped me greatly:

http://biobug.org/index.php/2009/04/03/collecting-netflow-on-rhel5-with-flow-too
ls/
http://onlamp.com/pub/a/bsd/2005/08/18/Big_Scary_Daemons.html?page=4
http://mailman.splintered.net/pipermail/flow-tools/2007-July/003506.html

However, none of those actually worked for me. I compiled a step by step 
solution for
RHEL5 32 bit and 64 bit which worked for me. 

##Clean out any old installations
rm -f /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/Cflow.pm
rm -fR /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/auto/Cflow
rm -fR /usr/local/flow-tools

##Get and build fresh installation
wget http://flow-tools.googlecode.com/files/flow-tools-0.68.4.3.tar.bz2
bunzip2 flow-tools-0.68.4.3.tar.bz2
tar -xvf flow-tools-0.68.4.3.tar
cd flow-tools-0.68.4.3
CC='gcc -fPIC' ./configure (for 64-bit)
./configure (for 32-bit)
make
make install
cd lib
ln -s /usr/local/flow-tools/lib/libft.a libft.a
cd ../contrib
tar -xvzf Cflow-1.053.tar.gz
cd Cflow-1.053
perl Makefile.PL
make
make test (should get OK here, if not it will not work)
make install

I was able to reproduce these results on multiple 32 bit and 64 bit RHEL5 
servers. I
hope this helps others.

Thanks,

WDW

Original comment by wdwr...@gmail.com on 29 Dec 2009 at 2:26

GoogleCodeExporter commented 8 years ago
That's the secret sauce right there WDW, thanks.

Original comment by sh0...@gmail.com on 27 Mar 2011 at 8:12

GoogleCodeExporter commented 8 years ago
I had the same issues with Cflow not compiling correctly on opensuse 12.1 with 
flow-tools 0.68.5.1. I'd try to run:

 perl Makefile.PL CCFLAGS='-DOSU' LIBS='-lft'

as it instructs in the /contrib/README, but it would always give me the "Note 
(probably harmless): No library found for -lft" warning. Make would then throw 
the "Cflow.xs:62:21: fatal error: ftlib.h: No such file or directory" error.

WDW's instructions didn't work for me (unfortunately), so to get it to compile 
and have flowdumper actually give me output I did the following:

1 - edited Makefile.PL
     changed this section:

          if (-f '../../lib/libft.a') {
                $dir = '../../lib';
                $incdir = "-I$dir -I$dir/..";
                $libdir = "-L$dir";

     to this:

          if (-f '/etc/flow-tools/lib/libft.a') {
                $dir = '/etc/flow-tools/lib';
                $incdir = "-I/etc/flow-tools/lib -I/etc/flow-tools -I/etc/flow-tools/include";
                $libdir = "-L/etc/flow-tools/lib";

     NOTE: My installation is using /etc/flow-tools, if yours uses /usr/local/flow-tools change these line accordingly

2 - Run this: perl Makefile.PL CCFLAGS='-DOSU'
It could never find the -lft library it needed so I just tried it without this 
and it compiled just fine.

3 - Finish installing
make
make install

4 - Test flowdumper.

Hopefully this works. I spent a ton of time playing around with this to get it 
to work, so hopefully this will help someone else.

Good luck!

Original comment by klamb...@propertysolutions.com on 3 Feb 2012 at 12:05

GoogleCodeExporter commented 8 years ago
Hi, 

I have problem about flowscan and flow-tool on Centos 6.2 .

have error in below:

ERROR updating /var/netflow/rrds/network_routers.rrd: unknown option 
'/var/netflow/rrds/network_routers.rrd'

Please help me.

thank you.

Original comment by mieme...@gmail.com on 16 Sep 2013 at 3:52