hello misc! I'm now trying to deploy diaspora on openbsd.

I was almost sucessfull, the only problem is:

i can't build 'eye' gem, what requires 'kostya-sigar' gem, and 'kostya-sigar' is failing to build.

At first i created an issue on github https://github.com/kostya/sigar/issues/12 but owner of repo could not help me.

Maybe some of openbsd devs can.

Without any edits, gem does not build because lack of "sys/dkstat.h":

compiling darwin_sigar.c
darwin_sigar.c:55:10: fatal error: 'sys/dkstat.h' file not found
#include <sys/dkstat.h>
         ^~~~~~~~~~~~~~

I've tried to replace sys/dkstat.h with sys/sched.h

and now build fails with this errors:

compiling darwin_sigar.c
darwin_sigar.c:1080:21: error: no member named 'kp_eproc' in 'struct kinfo_proc'
        if (proc[i].KI_FLAG & P_SYSTEM) {
            ~~~~~~~ ^
darwin_sigar.c:227:17: note: expanded from macro 'KI_FLAG'
#define KI_FLAG kp_eproc.e_flag
                ^
darwin_sigar.c:1080:31: error: use of undeclared identifier 'P_SYSTEM'
        if (proc[i].KI_FLAG & P_SYSTEM) {
                              ^
darwin_sigar.c:1083:21: error: no member named 'kp_proc' in 'struct kinfo_proc'
        if (proc[i].KI_PID == 0) {
            ~~~~~~~ ^
darwin_sigar.c:212:17: note: expanded from macro 'KI_PID'
#define KI_PID  kp_proc.p_pid
                ^
darwin_sigar.c:1087:54: error: no member named 'kp_proc' in 'struct kinfo_proc'
        proclist->data[proclist->number++] = proc[i].KI_PID;
                                             ~~~~~~~ ^
darwin_sigar.c:212:17: note: expanded from macro 'KI_PID'
#define KI_PID  kp_proc.p_pid
                ^
darwin_sigar.c:1118:29: error: use of undeclared identifier 'KERN_PROC2'
    int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, 0, sizeof(*sigar->pinfo), 1 };
                            ^
darwin_sigar.c:1118:65: error: invalid application of 'sizeof' to an incomplete type 'bsd_pinfo_t' (aka 'struct kinfo_proc2')     int mib[] = { CTL_KERN, KERN_PROC2, KERN_PROC_PID, 0, sizeof(*sigar->pinfo), 1 };
^~~~~~~~~~~~~~~
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1122:24: error: invalid application of 'sizeof' to an incomplete type 'bsd_pinfo_t' (aka 'struct kinfo_proc2')
    size_t len = sizeof(*sigar->pinfo);
                       ^~~~~~~~~~~~~~~
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1139:21: error: invalid application of 'sizeof' to an incomplete type 'int []'
    if (sysctl(mib, NMIB(mib), sigar->pinfo, &len, NULL, 0) < 0) {
                    ^~~~~~~~~
darwin_sigar.c:115:26: note: expanded from macro 'NMIB'
#define NMIB(mib) (sizeof(mib)/sizeof(mib[0]))
                         ^~~~~
darwin_sigar.c:1299:15: error: incomplete definition of type 'struct kinfo_proc2'         (pinfo->p_vm_tsize + pinfo->p_vm_dsize + pinfo->p_vm_ssize) * sigar->pagesize;
         ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1299:35: error: incomplete definition of type 'struct kinfo_proc2'         (pinfo->p_vm_tsize + pinfo->p_vm_dsize + pinfo->p_vm_ssize) * sigar->pagesize;
                             ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1299:55: error: incomplete definition of type 'struct kinfo_proc2'         (pinfo->p_vm_tsize + pinfo->p_vm_dsize + pinfo->p_vm_ssize) * sigar->pagesize;
                                                 ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1301:30: error: incomplete definition of type 'struct kinfo_proc2'
    procmem->resident = pinfo->p_vm_rssize * sigar->pagesize;
                        ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1305:34: error: incomplete definition of type 'struct kinfo_proc2'
    procmem->minor_faults = pinfo->p_uru_minflt;
                            ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1306:34: error: incomplete definition of type 'struct kinfo_proc2'
    procmem->major_faults = pinfo->p_uru_majflt;
                            ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1330:27: error: incomplete definition of type 'struct kinfo_proc2'
    proccred->uid  = pinfo->p_ruid;
                     ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1331:27: error: incomplete definition of type 'struct kinfo_proc2'
    proccred->gid  = pinfo->p_rgid;
                     ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1332:27: error: incomplete definition of type 'struct kinfo_proc2'
    proccred->euid = pinfo->p_uid;
                     ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1333:27: error: incomplete definition of type 'struct kinfo_proc2'
    proccred->egid = pinfo->p_gid;
                     ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
darwin_sigar.c:1456:28: error: incomplete definition of type 'struct kinfo_proc2'
    proctime->user  = pinfo->p_uutime_sec * SIGAR_MSEC;
                      ~~~~~^
../../src/os/darwin/sigar_os.h:49:16: note: forward declaration of 'struct kinfo_proc2'
typedef struct kinfo_proc2 bsd_pinfo_t;
               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Reply via email to