Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » SMS User Support

Post new topic   Reply to topic
fragroute | Solved! Goto page 1, 2  Next
View previous topic :: View next topic  
Author Message
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sat May 05, 2012 9:30 am    Post subject: fragroute | Solved! Reply with quote

Dear gerasimos_h!

I have got S*M*S v SMS 1.6.0 (i486) installed, and with your help, got a Tor-node up and working, transmitting 0,5-2 GB/24h Smile. Beside my now excellently working vsftpd- and httpd-servers (with SSL/TSL-support).

I wonder if you can help me with one final tool for testing network intrusion detection that evades my efforts? fragroute, fairly old, but I have managed to install and get it working i Debian5 and OpenSuse 10.3-12.1 and therefore cannot understand why I cannot with Slackware 13.37? -There is, in opposite to fragrouter, no Slackpkg, nor any Slackbuild so I've tried to install it from source: http://www.monkey.org/~dugsong/fragroute/fragroute-1.2.tar.gz.

I depends on libdnet, libpcap and libevent. From my Debian- and SuSE-installations I learned that working versions of those were:
libdnet.so.1, libpcap.so.0 and libevent-1.4.so.2. -I there for completed my SMS libraries with those so I now got installed:
libdnet-1.11-i486-7sl
libpcap-0.9.3-i486-1suk and libpcap-1.1.1-i486-1
libevent-1.4.14a-i486-1sl and libevent-2.0.10-i486-1_SBo.
There seems to be no conflict between them, as there wasn't in Debian or OpenSuse.

Now to the problem:
fragroute-1.2 configure cannot find libevent, but stops by
Code:
checking for libevent... no
configure: error: libevent not found

Though it is there??

There is no way I can get fragroute-config find libevent! Tried tor read out "configure" to try to figure out where configure looks, but am not competent enough?

Is there anyway you can help me out here?

Best regards
Lars


Last edited by Lars on Sun May 06, 2012 8:20 pm; edited 1 time in total
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sat May 05, 2012 10:44 am    Post subject: Reply with quote

As of May 3rd libevent is part of SMS
http://sms.it-ccs.com/isos/SMS-Current/ChangeLog.txt

So uninstall all previous libevent from slacky.eu and install latest with slapt-get.

If you still have problems with fragroute let me know , so I can try to build it.

Don't forget to check SMS Wiki for compile options
http://sms.it-ccs.com/wiki/#LinkTarget_2039

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sat May 05, 2012 8:17 pm    Post subject: Reply with quote

Thank you gerasimos!

In the meantime a friend tried to follow the idea that it was something with fragroute-configure looking in wrong directory. I suggested /usr/local since I saw that somewhere in the configure-file.

He just told me he tried to put all the required libs there and obviously got it working? I'll try it first thing in the morning and will let you know if you want to?

Otherwise I will try your suggestion.

Till next

Best regards
Lars
Back to top
View user's profile Send private message
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sat May 05, 2012 9:23 pm    Post subject: Reply with quote

YESS!

It worked!

I a way I was right in my suggestion about "wrong directories" but didn't know how to solve it.

fragroute-1.2-configure looked for the required libs in /usr/local/lib but since I installed them with the packages I could find (libdnet-1.11-i486-7sl.txz, libevent-1.4.14a-i486-1sl.txz, and libpcap-0.9.3-i486-1suk.tgz), the libs were located in /usr/lib

Installing the libs from ordinary source-codes (libdnet-1.11.tar.gz, libevent-1.4.12-stable.tar.gz and libpcap-1.2.1.tar.gz) put them in /usr/local/lib and know I could configure-make-make install fragroute-1.2.tar.gz Very Happy. And get it working!

If you have got any second thoughts about this solution, please let me know!

Many thanks and my best regards
Lars
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sat May 05, 2012 10:03 pm    Post subject: Reply with quote

I take a look at fragroute and since it's an old package it's looking for static libevent library (libevent.a)
SMS and most slackware packages have only shared library (built with--enable-static=no )
An easy hack would be to alter configure to look libevent.la instead of libevent.a Smile

If it's working then no problem, you could though build them with --prefix=/usr and have no problem also.
/usr/local it's in $PATH and in $LD_LIBRARY_PATH so no worries.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sun May 06, 2012 8:31 am    Post subject: Reply with quote

Can I ask you a bit more about the configure changes you mention? I'm trying to learn this Shocked .

Quote:
An easy hack would be to alter configure to look libevent.la instead of libevent.a

Do you mean changing the lines in fragroute configure:
Code:
*)
     echo "$ac_t""$withval" 1>&6
     if test -f $withval/include/event.h -a -f $withval/lib/libevent.a; then and following
*)
     echo "$ac_t""$withval" 1>&6
     if test -f $withval/src/libdnet.a; then
*)
     echo "$ac_t""$withval" 1>&6
     if test -f $withval/pcap.h -a -f $withval/libpcap.a; then


to resp. libevent.la, libdnet.1a and libpcap.1a?

Quote:
you could though build them with --prefix=/usr and have no problem also

Do you mean changing the lines in resp libevent-, libdnet- and libpcap-configure from
# Initializations.
#
ac_default_prefix=/usr/local
to
ac_default_prefix=/usr ?
Won't the libs then get installed i /usr/lib?
But that's where I already got those libs but installed with *.txz and fragroute config couldn't find them?

Could I instead build fragroute with -prefix=/usr? And it that way force fragroute-config to look for the already existing libs in /usr/lib and install itself in /usr/sbin? (This was my thought when I first wrote my question to you, but didn't know how to do it.)

Forgive me if I misunderstood your suggestions below! Embarassed I'm not even a beginner at this.

Lars
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sun May 06, 2012 9:13 am    Post subject: Reply with quote

First thing, you should remove packages from slacky.eu if you have installed your own from source.

The problem only exist in libevent.a so changing those parts you mention will find libevent.la.

ac_default_prefix=/usr/local has nothing to do with paths to search for dependencies, it's all about where program will be installed by default. usually all apps by default installed in /usr/local.
The lib paths any program search for libs are in /etc/ld.so.conf
Code:
/usr/lib/qt/lib
/usr/local/lib
/usr/i486-slackware-linux/lib
/usr/lib/wvstreams


Now since you build libevent from source you build static library too and you install it in /usr/local/lib, which is in the so called LD_LIBRARY_PATH, so configure find it, because it was looking in those paths.

To change the prefix directory you pass --prefix=/usr to override default options and install app in /usr/lib.
You could also set any prefix like --prefix=/home/lars/mylibs and libevent would installed in /home/lars/mylibs/lib/, but then configure couldn't find it since /home/lars/mylibs/lib/ it's not in LD_LIBRARY_PATH, unless you add it in /etc/ld.so.conf, or pass argument in configure --with-libevent=/home/lars/mylibs/lib/ , or LDFLAGS="-L/home/lars/mylibs/lib"

There is nothing wrong building packages from source, but to respect package management system, better way is creating packages, or else keep the source to uninstall the package with "make uninstall" if it's necessary.

So to conclusion the problem was that fragroute was searching for libevent static library which none of the prebuilt packages had, so installing yours from source made it happy Smile

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sun May 06, 2012 5:56 pm    Post subject: Reply with quote

Thank you for all your efforts to explain this to me!

I cannot say I quite follow but I will save this whole thread as a Slackware doc that I can return to when trying to install and configure Slackware14. -I think I'll have to "melt" this while practicing.

Can you please just tel me one more thing? With
Quote:
To change the prefix directory you pass --prefix=/usr to override default options

do you mean changing "configure" the way i suggested earlier:
ac_default_prefix=/usr/local
to
ac_default_prefix=/usr
or how and where do I do it?

Lars
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sun May 06, 2012 6:24 pm    Post subject: Reply with quote

I have a feeling, you didn't follow the link to SMS Wiki a few posts earlier,
so I add it again Smile
http://sms.it-ccs.com/wiki/#LinkTarget_2039

If you type
Code:
./configure --help

in any app you build from source code. you will get the configure options, which some are common and others vary depending the app.
Common options are
--prefix= (install architecture-independent files in PREFIX default is /usr/local)
If you don't pass prefix option, the default is set by ac_default_prefix=/usr/local in configure script.
Now if you run configure like
Code:
./configure --prefix=/usr

Then your prefix path now is /usr, and it's the same like changing ac_default_prefix=/usr/local to ac_default_prefix=/usr

Other common options are
--sysconfdir in other words our /etc
--localstatedir in other words our /var

By default those two above options are set to PREFIX so if you don't set them, you will end up with
PREFIX/etc/
PREFIX/var/
e.g. assuming --prefix=/usr
/usr/etc
/usr/var

If you have any other questions, let me know.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sun May 06, 2012 8:16 pm    Post subject: Reply with quote

Embarassed Well, you know, I just came from reading that part "Compile from source", but I must say your post made it much clearer (sparing me from reading the ./configure --help just now, I'll return to that)! Downloaded your SMSdoc again, that has grown since last.

Thank you very much indeed! Finally I understood!

By the way, removed the slacky libevent, libdnet and the sukkology libpcap. I guess there was no other use for libdnet as you suggested removal.

Beside from that final libdnet-question I really have none, and think I really learned something through this post! In the meantime I overlooked my SuSE and Debian-installations with respect to this subject and found things I never noticed nor have had to do something special about. Guess I've been lucky Wink

Best regards
Lars
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sun May 06, 2012 8:24 pm    Post subject: Reply with quote

Quote:
Beside from that final libdnet-question I really have none


What was the question? Confused

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sun May 06, 2012 8:53 pm    Post subject: Reply with quote

I guess there was no other use for libdnet as you suggested removal. ?
Sorry, forgot the question-mark!
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Sun May 06, 2012 9:12 pm    Post subject: Reply with quote

If you are talking about your libdnet package, you shouldn't remove it as it is a dependency, only slacky.eu packages.
Also libcap is already installed in system, now you have 2 versions of libpcap, SMS and yours, yours it's newer though Smile
That's not necessarily a problem either.

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Lars
Senior Member


Joined: 25 Oct 2010
Posts: 134

PostPosted: Sun May 06, 2012 9:26 pm    Post subject: Reply with quote

Now this puzzles!
I had no libdnet package before I installed libdnet-1.11-i486-7sl.txz.
I'm quite certain, and after I removed the slacky package I've got none??

Do you think I should reinstall it or do you know another source? Searched through 1.6.0 packages, but found none?

Or, perhaps I didn't read carefully enough? By your libdnet package, did you mean the libdnet-1.11.tar.gz I installed? Didn't count that as a package since it doesn't get listed in /var/log/packages. That I did of course not remove Smile

Lars
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1752
Location: Greece

PostPosted: Mon May 07, 2012 5:27 am    Post subject: Reply with quote

When I'm referring to your packages I mean the ones you built from source.
Although you didn't create a package for them, they exist, and they are now a part of your system Smile

By the way libdnet slackbuild exist in slackbuilds.org
http://slackbuilds.org/repository/13.37/network/libdnet/

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » SMS User Support All times are GMT + 2 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional