RE: ./snmpd:not found

2010-03-15 Thread Mike Ayers
> From: Sylvain Dery [mailto:snmpgroupu...@yahoo.ca]
> Sent: Thursday, March 11, 2010 1:28 PM

> /usr/local/sbin # ./snmpd
> -sh: ./snmpd: not found
> 
> But it is there!:
> /usr/local/sbin # ls -la ./snmpd
> -rwxr-xr-x 1 rootroot   32859  Mar 10  14:40  2010  ./snmpd

If this is actually cut-n-paste, then the daemon, which should be named 
"snmpd", is actually named "./snmpd", and the command `./snmpd`, which 
translates to "run the file snmpd in the current working directory" fails 
because it cannot find the file named "snmpd".  To run the file named 
"./snmpd", try:

/usr/local/sbin # ./\.\/snmpd

...but I don't know.  I can't even seem to create a file with that name!


HTH,

Mike

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-03-15 Thread Dave Shield
On 13 March 2010 00:05, Mike Ayers  wrote:
>> /usr/local/sbin # ls -la ./snmpd
>> -rwxr-xr-x     1 root    root   32859  Mar 10  14:40  2010  ./snmpd
>
>        If this is actually cut-n-paste, then the daemon, which should be 
> named "snmpd",
> is actually named "./snmpd"

No - the daemon is indeed named "snmpd".
The path "./snmpd" means "the file snmpd in the current directory"
Since that was the path given to ls, that's what ls uses in the output.

The commands:
$ ls -l snmpd
-rwx--x--x. 1 daves csc 7637 2010-03-12 11:43 ./snmpd
$ ls -l ./snmpd
-rwx--x--x. 1 daves csc 7637 2010-03-12 11:43 snmpd

refer to exactly the same file.


Whatever is going on here, it's nothing to do with the name of the file.

Dave

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-03-15 Thread Dave Shield
On 15 March 2010 13:53, Sylvain Dery  wrote:
> You are correct, but I am still clueless on what is happening!

What was the answer to Bart's question about shared libraries?

What do the commands

file  ./snmpd
ldd ./snmpd

report?

Dave

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-03-15 Thread Sylvain Dery
You are correct, but I am still clueless on what is happening!

Regards,

Sylvain





From: Dave Shield 
To: Mike Ayers 
Cc: Sylvain Dery ; net-snmp-users@lists.sourceforge.net
Sent: Mon, March 15, 2010 6:29:58 AM
Subject: Re: ./snmpd:not found

On 13 March 2010 00:05, Mike Ayers  wrote:
>> /usr/local/sbin # ls -la ./snmpd
>> -rwxr-xr-x     1 root    root   32859  Mar 10  14:40  2010  ./snmpd
>
>        If this is actually cut-n-paste, then the daemon, which should be 
> named "snmpd",
> is actually named "./snmpd"

No - the daemon is indeed named "snmpd".
The path "./snmpd" means "the file snmpd in the current directory"
Since that was the path given to ls, that's what ls uses in the output.

The commands:
    $ ls -l snmpd
    -rwx--x--x. 1 daves csc 7637 2010-03-12 11:43 ./snmpd
    $ ls -l ./snmpd
    -rwx--x--x. 1 daves csc 7637 2010-03-12 11:43 snmpd

refer to exactly the same file.


Whatever is going on here, it's nothing to do with the name of the file.

Dave



  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-03-15 Thread Sylvain Dery
If you are refering to the "LD_TRACE_LOADED_OBJECTS " question, the answer was:

Setting LD_TRACE_LOADED_OBJECTS did not do anything... any other suggestions 
are welcome! 
/usr/local/sbin # LD_TRACE_LOADED_OBJECTS=1 ./snmpd
>-sh: ./snmpd: not found
>
Unfortunately, "file" and "ldd" are not available on my target system since it 
was build with minimal resources to preserve valuable space.  I will try to add 
those two and get back to you with the results.

Regards,
 
Sylvain





From: Dave Shield 
To: Sylvain Dery 
Cc: net-snmp-users@lists.sourceforge.net
Sent: Mon, March 15, 2010 10:02:17 AM
Subject: Re: ./snmpd:not found

On 15 March 2010 13:53, Sylvain Dery  wrote:
> You are correct, but I am still clueless on what is happening!

What was the answer to Bart's question about shared libraries?

What do the commands

    file  ./snmpd
    ldd ./snmpd

report?

Dave



  __
Be smarter than spam. See how smart SpamGuard is at giving junk email the boot 
with the All-new Yahoo! Mail.  Click on Options in Mail and switch to New Mail 
today or register for free at http://mail.yahoo.ca--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-03-15 Thread Sylvain Dery
Here is the result of the "file" and "ldd" command, which I ran on the building 
platform:

[sylvain.d...@macadamian-plantcml sbin]$ ldd ./snmpd
 not a dynamic executable
[sylvain.d...@macadamian-plantcml sbin]$ file ./snmpd
./snmpd: ELF 32-bit LSB executable, ARM, version 1, dynamically linked (uses 
shared libs), for GNU/Linux 2.0.0, not stripped
[sylvain.d...@macadamian-plantcml sbin]$ 

And here is the parameters I used to build the application:

MAKELEVEL=3
>GATEWAY_COMPILATION_PLATFORM=arm
>MFLAGS=-w
>MAKEFLAGS=w
>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
>CFLAGS="-v -W -Wall -fPIC -mcpu=ep9312 -mfix-crunch-d1 -Wno-deprecated 
>-DUSE_PTHREADS -MMD -DCML_VERSION_RELEASE -DVOCAL_USE_DEPRECATED"
>CPPFLAGS="-v -W -Wall -fPIC -mcpu=ep9312 -mfix-crunch-d1 -Wno-deprecated 
>-DUSE_PTHREADS -MMD -DCML_VERSION_RELEASE -DVOCAL_USE_DEPRECATED"
>CONFIGURE_ARGS="--target=arm-linux --host=i686-linux"
>export CONFIGURE_ARGS
>export CPPFLAGS
>export CFLAGS
>export LD_LIBRARY_PATH
>export MAKELEVEL
>export GATEWAY_COMPILATION_PLATFORM
>export MFLAGS
>export MAKEFLAGS
>
>./configure --host=arm-linux --target=arm-linux 
>--with-cc=/usr/local/arm/ep93xx-d1/bin/arm-linux-gcc --disable-applications 
>--disable-manuals --disable-scripts --disable-snmpv1 --disable-privacy 
>--disable-md5 --without-openssl --enable-mini-agent 
>--with-out-mib-modules="examples/ucdDemoPublic" 
>--with-persistent-directory="/var/net-snmp" 
>--with-logfile="/var/log/snmpd.log" --with-sys-location="Hull" 
>--with-sys-contact="s...@plantcml.com" --with-default-snmp-version="2" 
>--with-install-prefix="/home/sylvain.dery/Download/net-snmp-5.5/ARG-temp-install"
> --with-ldflags=-Bstatic
>
Regards,

Sylvain




From: Sylvain Dery 
To: Dave Shield 
Cc: net-snmp-users@lists.sourceforge.net
Sent: Mon, March 15, 2010 10:34:03 AM
Subject: Re: ./snmpd:not found


If you are refering to the "LD_TRACE_LOADED_OBJECTS " question, the answer was:

Setting LD_TRACE_LOADED_OBJECTS did not do anything... any other suggestions 
are welcome! 
/usr/local/sbin # LD_TRACE_LOADED_OBJECTS=1 ./snmpd
>-sh: ./snmpd: not found
>
Unfortunately, "file" and "ldd" are not available on my target system since it 
was build with minimal resources to preserve valuable space.  I will try to add 
those two and get back to you with the results.

Regards,
 
Sylvain





From: Dave Shield 
To: Sylvain Dery 
Cc: net-snmp-users@lists.sourceforge.net
Sent: Mon, March 15, 2010 10:02:17 AM
Subject: Re: ./snmpd:not found

On 15 March 2010 13:53, Sylvain Dery  wrote:
> You are correct, but I am still clueless on what is happening!

What was the answer to Bart's question about shared libraries?

What do the commands

    file  ./snmpd
    ldd ./snmpd

report?

Dave


Make your browsing faster, safer, and easier with the new Internet Explorer® 8. 
Optimized for Yahoo! Get it Now for Free! 


  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-03-15 Thread Dave Shield
On 15 March 2010 15:22, Sylvain Dery  wrote:
> $ ldd ./snmpd
>  not a dynamic executable
> $ file ./snmpd
> ./snmpd: ELF 32-bit LSB executable, ARM, version 1,
> dynamically linked (uses shared libs)


Hmmm...
   So one command states that it's not using shared libraries,
while the other claims that it is?   That sounds strange to me.

I presume this is being built for some form of embedded system.
Have you tried asking for advice from that community?
They probably know more about the pitfalls of porting software
to that environment than we do.

Dave

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-03-15 Thread Sylvain Dery
You are correct, I'm building for an ARM-linux embedded system.

Good idea, I will see what kind of support is available from the ARM-linux 
community; in the mean time any other suggestions are more than welcome!

Could it be a problem with the parameters I used for the configuration tool? 
./configure --host=arm-linux --target=arm-linux 
--with-cc=/usr/local/arm/ep93xx-d1/bin/arm-linux-gcc --disable-applications 
--disable-manuals --disable-scripts --disable-snmpv1 --disable-privacy 
--disable-md5 --without-openssl --enable-mini-agent 
--with-out-mib-modules="examples/ucdDemoPublic" 
--with-persistent-directory="/var/net-snmp" --with-logfile="/var/log/snmpd.log" 
--with-sys-location="Hull" --with-sys-contact="s...@plantcml.com" 
--with-default-snmp-version="2" 
--with-install-prefix="/home/sylvain.dery/Download/net-snmp-5.5/ARG-temp-install"
 --with-ldflags=-Bstatic
>
Regards,

Sylvain



From: Dave Shield 
To: Sylvain Dery 
Cc: net-snmp-users@lists.sourceforge.net
Sent: Mon, March 15, 2010 11:29:48 AM
Subject: Re: ./snmpd:not found

On 15 March 2010 15:22, Sylvain Dery  wrote:
> $ ldd ./snmpd
>  not a dynamic executable
> $ file ./snmpd
> ./snmpd: ELF 32-bit LSB executable, ARM, version 1,
> dynamically linked (uses shared libs)


Hmmm...
  So one command states that it's not using shared libraries,
while the other claims that it is?  That sounds strange to me.

I presume this is being built for some form of embedded system.
Have you tried asking for advice from that community?
They probably know more about the pitfalls of porting software
to that environment than we do.

Dave



  __
Looking for the perfect gift? Give the gift of Flickr! 

http://www.flickr.com/gift/--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: ./snmpd:not found

2010-04-30 Thread Sylvain Dery
The problem here was that I was trying to statically compile the snmpd. and 
obviously by looking at the size of snmpd it was dynamically linked.  The size 
of snmpd was 32K, while it should be around 1Meg!

So, the question is: why does it not statically compile despite the proper 
flags beeing set ? 

The answer is: DO NOT SPECIFY a "-v" flag (verbose output) in the CFLAGS!!!

If you do so, the config script will think static linking is not supported and 
a dynamic version will be created instead, without properly warning you! 
If you look carefully in the generated output file, you will see a line warning 
you of the fact, but it is lost in s many other things...

Anyways, many thanks for those of you who spent time trying to solve this issue 
with me.

Sylvain



From: Dave Shield 
To: Sylvain Dery 
Cc: net-snmp-users@lists.sourceforge.net
Sent: Mon, March 15, 2010 11:29:48 AM
Subject: Re: ./snmpd:not found

On 15 March 2010 15:22, Sylvain Dery  wrote:
> $ ldd ./snmpd
>  not a dynamic executable
> $ file ./snmpd
> ./snmpd: ELF 32-bit LSB executable, ARM, version 1,
> dynamically linked (uses shared libs)


Hmmm...
  So one command states that it's not using shared libraries,
while the other claims that it is?  That sounds strange to me.

I presume this is being built for some form of embedded system.
Have you tried asking for advice from that community?
They probably know more about the pitfalls of porting software
to that environment than we do.

Dave











From: Sylvain Dery 
To: net-snmp-cod...@lists.sourceforge.net
Sent: Fri, March 12, 2010 3:19:16 PM
Subject: Re: snmpd: not found


I did run make install, and copied everything but the many .h files (I had to 
remove the .h file since the target is limited in disk spave).

Here is the script I am using to run the install command:

MAKELEVEL=3
GATEWAY_COMPILATION_PLATFORM= arm
MFLAGS=-w
MAKEFLAGS=w
LD_LIBRARY_PATH=$LD_LIBRARY_ PATH:/usr/local/lib
CFLAGS="-v -W -Wall -fPIC -mcpu=ep9312 -mfix-crunch-d1 -Wno-deprecated 
-DUSE_PTHREADS -MMD -DVOCAL_USE_DEPRECATED"
CPPFLAGS="-v -W -Wall -fPIC -mcpu=ep9312 -mfix-crunch-d1 -Wno-deprecated 
-DUSE_PTHREADS -MMD -DVOCAL_USE_DEPRECATED"
CONFIGURE_ARGS="--target=arm- linux --host=i686-linux"
export CONFIGURE_ARGS
export CPPFLAGS
export CFLAGS
export LD_LIBRARY_PATH
export MAKELEVEL
export GATEWAY_COMPILATION_PLATFORM
export MFLAGS
export MAKEFLAGS


./configure --host=arm-linux --target=arm-linux --with-cc=/usr/local/arm/ 
ep93xx-d1/bin/arm-linux-gcc --disable-applications --disable-manuals 
--disable-scripts --disable-snmpv1 --disable-privacy --disable-md5 
--without-openssl --enable-mini-agent --with-out-mib-modules=" 
examples/ucdDemoPublic" --with-persistent-directory="/ var/net-snmp" 
--with-logfile="/var/log/ snmpd.log" --with-default-snmp-version=" 2" 
--with-install-prefix="/home/ sylvain/Download/net- snmp-5.5/ARG-temp-install" 
--with-ldflags=-Bstatic
 





From: Magnus Fromreide 
To: Sylvain Dery 
Cc: net-snmp-cod...@lists.sourceforge.net
Sent: Fri, March 12, 2010 1:41:22 PM
Subject: Re: snmpd: not found

On Fri, Mar 12, 2010 at 09:24:27AM -0800, Sylvain Dery wrote:
> Hi,
> 
> I'm compiling net-snmp for an arm-linux embedded system.  However, when I try 
> to run the snmp daemon on the embedded system, I get:
> 
> /usr/local/sbin # ./snmpd
> -sh: ./snmpd: not found
> 
> But it is there!:
> /usr/local/sbin # ls -la ./snmpd
> -rwxr-xr-x 1 root    root   32859  Mar 10  14:40  2010  ./snmpd
> 
> Any idea what is going on?
> 

Given the size of the object my guess would be that you did

./configure 
make

and then copied agent/.libs/snmpd to your device. Is that so? If that is
the case then you have only the driver for the agent, you need the shared
libraries as well since they contain the actual code of the agent.

I would suggest that you do 'make install' and copy the generated tree
to your device, then you could start removing things. I do not think you
should need anything but the libraries and the binary.

Please also see http://www.net-snmp.org/wiki/index.php/FAQ:Compiling_04

/MF


From: Sylvain Dery 
To: net-snmp-cod...@lists.sourceforge.net
Sent: Fri, March 12, 2010 12:24:27 PM
Subject: snmpd: not found

Hi,

I'm compiling net-snmp for an arm-linux embedded system.  However, when I try 
to run the snmp daemon on the embedded system, I get:

/usr/local/sbin # ./snmpd
-sh: ./snmpd: not found

But it is there!:
/usr/local/sbin # ls -la ./snmpd
-rwxr-xr-x 1 root    root   32859  Mar 10  14:40  2010  ./snmpd
 
 
Any idea what is going on?
 
Thanks!


--
___
Net-snmp-us