# Confdc compile options example from man page

**URL:** <https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817>\
**Category:** Examples Set\
**Created:** [September 23, 2021, 5:59am UTC](https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817 "2021-09-23T05:59:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![terahari](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@terahari](https://dmap-community.ductus.global/u/terahari)\
**Post date:** [September 23, 2021, 5:59am UTC](https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817/1 "2021-09-23T05:59:04Z")

</div>

I recently installed the basic version of confd on my Ubuntu system.

I get the following error message when I tried generating the header file as suggested in the Man page example. What is the reason for this error? Is the basic version of confd limitted to compiling only YANG files to schema files? Same issue when I tried generating mib file from YANG data.

```bash
user@newbunty:~$ confdc -c --emit-h blaster.h system.fxs
confdc: --compile <file> Can only compile .yang, .yin, .cli, and .mib files
        Try 'confdc -h' for help and more information

user@newbunty:~$ confdc -c --emit-mib sys.mib system.fxs
confdc: --compile <file> Can only compile .yang, .yin, .cli, and .mib files
        Try 'confdc -h' for help and more information
user@newbunty:~$

```

Regards … Terahari

---

<div class="post-metadata">

**Author:** ![josephm](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@josephm](https://dmap-community.ductus.global/u/josephm)\
**Post date:** [September 23, 2021, 8:07am UTC](https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817/2 "2021-09-23T08:07:23Z")

</div>

Hello,

this seems like a typo/cosmetic bug in that description of `confdc` man page…

It incorrectly says:

```auto
$ confdc -c --emit-h blaster.h system.fxs

```

but you need to do:

```auto
$ confdc --emit-h blaster.h system.fxs

```

The argument `-c` is not needed for emitting header files of mibs…

---

<div class="post-metadata">

**Author:** ![terahari](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@terahari](https://dmap-community.ductus.global/u/terahari)\
**Post date:** [September 23, 2021, 10:29am UTC](https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817/3 "2021-09-23T10:29:47Z")

</div>

Thanks Joseph.

I am still not able to emit the mib from the example. I even tried the command in the folder where all fxs files are including ietf-inet-types.fxs.

Regards

user@newbunty:~/yangd$ confdc --emit-mib system.mib system.fxs  
system.fxs: ‘urn:ietf:params:xml:ns:yang:ietf-inet-types’: This namespace must be available in one of the referenced fxs files (-f option).

---

<div class="post-metadata">

**Author:** ![josephm](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@josephm](https://dmap-community.ductus.global/u/josephm)\
**Post date:** [September 23, 2021, 11:06am UTC](https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817/4 "2021-09-23T11:06:55Z")

</div>

i see, good old SNMP seems to be bit more complex, and it looks like it’s not covered into much detail in man page…

You can add missing dependencies like the `confdc` suggests using `-f` option, so, for our case and missing `ietf-inet-types`, something like:

```auto
confdc --emit-mib system.mib system.fxs -f ${CONFD_DIR}/etc/confd/ietf-inet-types.fxs 

```

It will then complain that it needs OID for SNMP mib, which is expectable. As we don’t have extra annotation file with OIDs defined for this trivial case, we must use `--oid` param to add an explicit OID for items inside `system.yang`. Thus, finally our command:

```auto
confdc --emit-mib system.mib system.fxs -f ${CONFD_DIR}/etc/confd/ietf-inet-types.fxs --oid 1.2.3

```

should do the whole trick 🙂

---

<div class="post-metadata">

**Author:** ![terahari](https://avatars.discourse-cdn.com/v4/letter/t/59ef9b/32.png) [@terahari](https://dmap-community.ductus.global/u/terahari)\
**Post date:** [September 23, 2021, 11:26am UTC](https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817/5 "2021-09-23T11:26:37Z")

</div>

Thanks Josephm. Got it compiled to an equivalent MIB.

Regards

---

<div class="post-metadata">

**Author:** ![mvf](https://yyz2.discourse-cdn.com/flex010/user_avatar/dmap-community.ductus.global/mvf/32/182_2.png) [@mvf](https://dmap-community.ductus.global/u/mvf)\
**Post date:** [September 23, 2021, 11:45am UTC](https://dmap-community.ductus.global/t/confdc-compile-options-example-from-man-page/3817/6 "2021-09-23T11:45:33Z")

</div>

For the sake of completeness, the example snmpa/8-emit-mib in the ConfD distribution is dedicated exactly to that - how to emit MIB from YANG.
