Friday, June 15, 2018 4:36 PM

> This won't work.  The 'dirs' are only the built in include paths from
> gcc, and the sysroot containing net-snmp-config will be somewhere
> else.

> Let's try something else:

> If CROSS_COMPILE is empty, just test `which net-snmp-config`, and if
> it doesn't fail, then use the output of net-snmp-config.

> If CROSS_COMPILE is non-empty, then check that `which net-snmp-config`
> is not /usr/bin/net-snmp-config.  If so, then use its output.

> If the user puts the sysroot's /usr/bin first in the PATH the we will
> have the correct net-snmp-config program.  That net-snmp-config is a
> shell script, and so it will run on the build machine in a cross
> environment.

I add this check is CROSS_COMPILE is unset, then I look for the h-files. 
If not found, snmpd will not be included. This will work in normal case but 
if you are in a cross compile environment it will just not be included. You 
can still compile. 


>I really want this series to go forward.  If you do the rest, I'll
>take care of the cross compilation issues.

Note that there are two libs that needs to be installed.
net-snmp and net-snmp-devel. 
If you only install the main lib, you will get access to the script but the libs
needed for the subagent will not be in place. This means that the script will 
probably provide the correct path but it will not find the libs when you try 
to link them in. So you need to really verify that they are in place.


Then since snmpd is a subagent, you need to start the master agent provided 
By the lib inorder to get the agent up and running properly.
The snmpd.conf needs to be replaced if you want access to the new 
implemented OIDs.


I will send in a v3 with updates for your other comments and this CROSS_COMPILE
unset check during the day.

/Anders


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to