All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-oe] net-snmp config help
@ 2012-07-02 14:45 Jack Mitchell
  2012-07-02 15:06 ` Jack Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Mitchell @ 2012-07-02 14:45 UTC (permalink / raw)
  To: openembedded-devel

Ok, so I managed to get net-snmp compiling however I now have an issue 
where the configure stage is picking up libpci and using that to 
configure net-snmp to look for pci devices on startup which my 
beaglebone doesn't have

    root@beaglebone:~# snmpd
    pcilib: Cannot open /proc/bus/pci
    pcilib: Cannot find any working access method.
    root@beaglebone:~#

Off I went and found a solution[1] which states that I should force the 
PCI_* defines to off *after* the configuration stage. So I go into my 
work directory and alter includes/net-snmp/net-snmp-config.h:

    /* define if you have pci_lookup_name() */
    #undef HAVE_PCI_LOOKUP_NAME

    /* Define to 1 if you have the <pci/pci.h> header file. */
    #undef HAVE_PCI_PCI_H

Then compile with:

     bitbake net-snmp -c compile -f

Then

     bitbake core-image-minimal

Which does net-snmp do_install and then builds the rootfs. However this 
makes no difference and it still fails with the same error message on 
start. Is my work flow for this wrong, or is it re-configuring, I'm at a 
bit of a loss of what to do now?

I suppose the correct procedure would be to find out why pcilibs is 
being detected and configured, then fix that. Could anyone point me in 
the right direction?

Regards,
Jack.

[1] 
http://stackoverflow.com/questions/9470494/snmpd-cannot-open-proc-bus-pci

-- 

   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-oe] net-snmp config help
  2012-07-02 14:45 [meta-oe] net-snmp config help Jack Mitchell
@ 2012-07-02 15:06 ` Jack Mitchell
  2012-07-04  8:25   ` Jack Mitchell
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Mitchell @ 2012-07-02 15:06 UTC (permalink / raw)
  To: openembedded-devel

On 02/07/12 15:45, Jack Mitchell wrote:
> Ok, so I managed to get net-snmp compiling however I now have an issue 
> where the configure stage is picking up libpci and using that to 
> configure net-snmp to look for pci devices on startup which my 
> beaglebone doesn't have
>
>    root@beaglebone:~# snmpd
>    pcilib: Cannot open /proc/bus/pci
>    pcilib: Cannot find any working access method.
>    root@beaglebone:~#
>
> Off I went and found a solution[1] which states that I should force 
> the PCI_* defines to off *after* the configuration stage. So I go into 
> my work directory and alter includes/net-snmp/net-snmp-config.h:
>
>    /* define if you have pci_lookup_name() */
>    #undef HAVE_PCI_LOOKUP_NAME
>
>    /* Define to 1 if you have the <pci/pci.h> header file. */
>    #undef HAVE_PCI_PCI_H
>
> Then compile with:
>
>     bitbake net-snmp -c compile -f
>
> Then
>
>     bitbake core-image-minimal
>
> Which does net-snmp do_install and then builds the rootfs. However 
> this makes no difference and it still fails with the same error 
> message on start. Is my work flow for this wrong, or is it 
> re-configuring, I'm at a bit of a loss of what to do now?
>
> I suppose the correct procedure would be to find out why pcilibs is 
> being detected and configured, then fix that. Could anyone point me in 
> the right direction?
>
> Regards,
> Jack.
>
> [1] 
> http://stackoverflow.com/questions/9470494/snmpd-cannot-open-proc-bus-pci
>

It seems that udev is forcing PCI down every ones throats, is this 
necessary, can it be built without? There seems to be a lot of extra 
configuration in there to make it happen...

Onward ho!

-- 

   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-oe] net-snmp config help
  2012-07-02 15:06 ` Jack Mitchell
@ 2012-07-04  8:25   ` Jack Mitchell
  0 siblings, 0 replies; 3+ messages in thread
From: Jack Mitchell @ 2012-07-04  8:25 UTC (permalink / raw)
  To: openembedded-devel

On 02/07/12 16:06, Jack Mitchell wrote:
> On 02/07/12 15:45, Jack Mitchell wrote:
>> Ok, so I managed to get net-snmp compiling however I now have an 
>> issue where the configure stage is picking up libpci and using that 
>> to configure net-snmp to look for pci devices on startup which my 
>> beaglebone doesn't have
>>
>>    root@beaglebone:~# snmpd
>>    pcilib: Cannot open /proc/bus/pci
>>    pcilib: Cannot find any working access method.
>>    root@beaglebone:~#
>>
>> Off I went and found a solution[1] which states that I should force 
>> the PCI_* defines to off *after* the configuration stage. So I go 
>> into my work directory and alter includes/net-snmp/net-snmp-config.h:
>>
>>    /* define if you have pci_lookup_name() */
>>    #undef HAVE_PCI_LOOKUP_NAME
>>
>>    /* Define to 1 if you have the <pci/pci.h> header file. */
>>    #undef HAVE_PCI_PCI_H
>>
>> Then compile with:
>>
>>     bitbake net-snmp -c compile -f
>>
>> Then
>>
>>     bitbake core-image-minimal
>>
>> Which does net-snmp do_install and then builds the rootfs. However 
>> this makes no difference and it still fails with the same error 
>> message on start. Is my work flow for this wrong, or is it 
>> re-configuring, I'm at a bit of a loss of what to do now?
>>
>> I suppose the correct procedure would be to find out why pcilibs is 
>> being detected and configured, then fix that. Could anyone point me 
>> in the right direction?
>>
>> Regards,
>> Jack.
>>
>> [1] 
>> http://stackoverflow.com/questions/9470494/snmpd-cannot-open-proc-bus-pci 
>>
>>
>
> It seems that udev is forcing PCI down every ones throats, is this 
> necessary, can it be built without? There seems to be a lot of extra 
> configuration in there to make it happen...
>
> Onward ho!
>

As a stop gap till I manage to get to the bottom of this properly, doing:

     bitbake core-image-minimal

to get the initial image and everything built properly

     bitbake -c cleansstate pciutils

To remove pci.h from the sysroot

     bitbake -c cleansstate net-snmp

to remove the net-snmp with pci config enabled

     bitbake net-snmp

to rebuild net-snmp without pci config enabled (due to it not finding pci.h)

     bitbake core-image-minimal

pciutils gets rebuilt, net-snmp stays configured without pci and 
everybody is happy (apart from the deterministic build goddess).

Regards,

-- 

   Jack Mitchell (jack@embed.me.uk)
   Embedded Systems Engineer
   http://www.embed.me.uk

--




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-07-04  8:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-02 14:45 [meta-oe] net-snmp config help Jack Mitchell
2012-07-02 15:06 ` Jack Mitchell
2012-07-04  8:25   ` Jack Mitchell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.