Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8498405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T00:23:34+00:00 2026-06-11T00:23:34+00:00

i am trying to comile net-snmp 5.7.1 at openBSD5.1. theerror in compile is structure

  • 0

i am trying to comile net-snmp 5.7.1 at openBSD5.1.
theerror in compile is

structure has no member named kp_proc'
structure has no member named
kp_eproc’

can anyone help me about this ??

and how to do python binding at openBSD ??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T00:23:36+00:00Added an answer on June 11, 2026 at 12:23 am

    ok this may be a long post, as we will try to port your software on OpenBSD.
    You see OpenBSD doesn’t have this eproc field on it’s k_proc struct. check the declaration:
    proc@OpenBSD

    grepping the problem in the latest source:

    ./agent/mibgroup/host/data_access/swrun_kinfo.c:        entry->hrSWRunPerfCPU  =     proc_table[i].kp_eproc.e_uticks;
    ./agent/mibgroup/host/data_access/swrun_kinfo.c:        entry->hrSWRunPerfCPU += proc_table[i].kp_eproc.e_sticks;
    ./agent/mibgroup/host/data_access/swrun_kinfo.c:        entry->hrSWRunPerfCPU +=   proc_table[i].kp_eproc.e_iticks;
    ./agent/mibgroup/host/data_access/swrun_kinfo.c:        entry->hrSWRunPerfMem  = proc_table[i].kp_eproc.e_vm.vm_tsize;
    ./agent/mibgroup/host/data_access/swrun_kinfo.c:        entry->hrSWRunPerfMem += proc_table[i].kp_eproc.e_vm.vm_ssize;
    ./agent/mibgroup/host/data_access/swrun_kinfo.c:        entry->hrSWRunPerfMem += proc_table[i].kp_eproc.e_vm.vm_dsize;
    ./agent/mibgroup/host/hr_swrun.c:        long_return = proc_table[LowProcIndex].kp_eproc.e_uticks +
    ./agent/mibgroup/host/hr_swrun.c:            proc_table[LowProcIndex].kp_eproc.e_sticks +
    ./agent/mibgroup/host/hr_swrun.c:            proc_table[LowProcIndex].kp_eproc.e_iticks;
    ./agent/mibgroup/host/hr_swrun.c:            proc_table[LowProcIndex].kp_eproc.e_vm.vm_map.size / 1024;
    ./agent/mibgroup/host/hr_swrun.c:        long_return = proc_table[LowProcIndex].kp_eproc.e_vm.vm_tsize +
    ./agent/mibgroup/host/hr_swrun.c:            proc_table[LowProcIndex].kp_eproc.e_vm.vm_ssize +
    ./agent/mibgroup/host/hr_swrun.c:            proc_table[LowProcIndex].kp_eproc.e_vm.vm_dsize;
    ./agent/mibgroup/ucd-snmp/proc.c:#define EP(pp, field) ((pp)->kp_eproc . field)
    ./agent/mibgroup/ucd-snmp/proc.c:#define VP(pp, field) ((pp)->kp_eproc.e_vm . field)
    

    aha! so we need to take care also of these vm structs… our corrensponding decleration is : p_vmspace@OpenBSD

    ok so in general changing on these .kp_eproc.e_thing to .p_thing
    and .kp_eproc.e_vm.thing to .p_vmspace->thing (it’s a pointer)
    should work.

    The macros need some care and i think i got them right, but since i’m still compiling these
    changes on a pretty slow sparc64 it’s going to take some time to get you the tested diff.

    but that should be the general idea.

    If your whole process works OK , you can add this patch to your ports/ tree along
    with an easy to craft Makefile and have your OpenBSD package administered with pkg_* tools,but more in future edits.

    cheers!

    DsP

    Edit: Here is a first diff that will compile , the second macro is wrong though .
    please test.

    diff -ur net-snmp-5.7.1/agent/mibgroup/host/data_access/swrun_kinfo.c mynet-    snmp-5.7.1/agent/mibgroup/host/data_access/swrun_kinfo.c
    --- net-snmp-5.7.1/agent/mibgroup/host/data_access/swrun_kinfo.c        Wed Sep 28 07:53:47 2011
    +++ mynet-snmp-5.7.1/agent/mibgroup/host/data_access/swrun_kinfo.c      Wed Sep  5 04:26:54 2012
    @@ -85,10 +85,10 @@
      * early FreeBSD, NetBSD, OpenBSD kinfo_proc field names
      */
     #define SWRUN_TABLE    kinfo_proc
     -#define SWRUN_K_STAT   kp_proc.p_stat
     -#define SWRUN_K_PID    kp_proc.p_pid
     -#define SWRUN_K_COMM   kp_proc.p_comm
     -#define SWRUN_K_FLAG   kp_proc.p_flag
     +#define SWRUN_K_STAT   p_stat
     +#define SWRUN_K_PID    p_pid
     +#define SWRUN_K_COMM   p_comm
     +#define SWRUN_K_FLAG   p_flag
     /*      SWRUN_K_CLASS  not defined     */
     #endif
    
    @@ -159,7 +159,8 @@
     #if HAVE_KVM_GETPROC2
         proc_table = kvm_getproc2(kd, KERN_PROC_ALL, 0, sizeof(struct kinfo_proc2), &nprocs );
     #else
    -    proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nprocs );
    +    proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, sizeof(struct kinfo_proc), &nprocs );
    +    //proc_table = kvm_getprocs(kd, KERN_PROC_ALL, 0, &nprocs );
     #endif
         for ( i=0 ; i<nprocs; i++ ) {
             if ( 0 == proc_table[i].SWRUN_K_STAT )
    @@ -304,21 +305,22 @@
            entry->hrSWRunPerfCPU += proc_table[i].kp_lwp.kl_iticks;
            entry->hrSWRunPerfMem  = proc_table[i].kp_vm_map_size / 1024;
     #elif defined(dragonfly)
    -       entry->hrSWRunPerfCPU  = proc_table[i].kp_eproc.e_uticks;
    -       entry->hrSWRunPerfCPU += proc_table[i].kp_eproc.e_sticks;
    -       entry->hrSWRunPerfCPU += proc_table[i].kp_eproc.e_iticks;
    +       entry->hrSWRunPerfCPU  = proc_table[i].p_uticks;
    +       entry->hrSWRunPerfCPU += proc_table[i].p_sticks;
    +       entry->hrSWRunPerfCPU += proc_table[i].p_iticks;
            entry->hrSWRunPerfMem  = proc_table[i].kp_vm_map_size / 1024;
    
     #else
             /*
              * early FreeBSD, NetBSD, OpenBSD
              */
    -        entry->hrSWRunPerfCPU  = proc_table[i].kp_proc.p_uticks;
    -        entry->hrSWRunPerfCPU += proc_table[i].kp_proc.p_sticks;
    -        entry->hrSWRunPerfCPU += proc_table[i].kp_proc.p_iticks;
    -        entry->hrSWRunPerfMem  = proc_table[i].kp_eproc.e_vm.vm_tsize;
    -        entry->hrSWRunPerfMem += proc_table[i].kp_eproc.e_vm.vm_ssize;
    -        entry->hrSWRunPerfMem += proc_table[i].kp_eproc.e_vm.vm_dsize;
    +        entry->hrSWRunPerfCPU  = proc_table[i].p_uticks;
    +        entry->hrSWRunPerfCPU += proc_table[i].p_sticks;
    +        entry->hrSWRunPerfCPU += proc_table[i].p_iticks;
    +        struct vmspace *l = proc_table[i].p_vmspace;
    +        entry->hrSWRunPerfMem  = l->vm_tsize;
    +        entry->hrSWRunPerfMem += l->vm_ssize;
    +        entry->hrSWRunPerfMem += l->vm_dsize;
             entry->hrSWRunPerfMem *= (getpagesize() / 1024);
     #endif
         }
    

    of course this diff sucks like the vacuum , and i will improve it tommorow 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to compile my Visual Basic .NET project named Myproject.sln via command
I am trying to compile mod_spnego ( http://sourceforge.net/projects/modgssapache/ ) with SSPI support in Visual
I'm a .net developer and I'm trying to compile a .tbl and .dll for
I'm trying to compile SQLCipher. I've downloaded source code from http://sqlcipher.net/ . Then I'm
I am trying to compile gsl (R packages) on Windows. It can be compiled
I am trying to compile one .Net c# project into multiple dlls. But here
I'm trying to compile XJig ( http://sourceforge.net/projects/xjig/ ) for Snow Leopard and getting errors:
I'm trying to compile enc2ly ( http://enc2ly.sourceforge.net/en/ ) on Windows using cygwin but it
I'm trying to compile a .cs file using a CSharpCodeProvider from a .net 3.5
I am trying to compile an application in C++ that works without the .net

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.