# \[SOLVED\] Jbuilder error "Error: I don't know about package"

**URL:** <https://discuss.ocaml.org/t/solved-jbuilder-error-error-i-dont-know-about-package/643>\
**Category:** Ecosystem\
**Tags:** jbuilder\
**Created:** [July 29, 2017, 8:03pm UTC](https://discuss.ocaml.org/t/solved-jbuilder-error-error-i-dont-know-about-package/643 "2017-07-29T20:03:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![modlfo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/modlfo/32/345_2.png) [@modlfo](https://discuss.ocaml.org/u/modlfo)\
**Post date:** [July 29, 2017, 8:03pm UTC](https://discuss.ocaml.org/t/solved-jbuilder-error-error-i-dont-know-about-package/643/1 "2017-07-29T20:03:52Z")

</div>

Hi folks,

I have a package that I updated to build with jbuilder. Before I made the pull request to the opam-repository I wanted to test it so I forked opam-repository and I add as a a remote.

When trying to install the package with opam I get:

```auto
# Error: I don't know about package pla (passed through --only-packages/--release)

```

but the package builds correctly when I do

```auto
$ jbuilder build
$ jbuilder install

```

and also when I run the install command specified in the opam file

```auto
$ jbuilder build -p pla -j 1

```

The code of my package is here [https://github.com/modlfo/pla](https://github.com/modlfo/pla) and my forked opam repository is here [https://github.com/modlfo/opam-repository/tree/master/packages/pla/pla.1.2](https://github.com/modlfo/opam-repository/tree/master/packages/pla/pla.1.2)

Maybe I’m doing something stupid or I’m forgetting something.

Leonardo

---

<div class="post-metadata">

**Author:** ![rgrinberg](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/rgrinberg/32/40_2.png) [@rgrinberg](https://discuss.ocaml.org/u/rgrinberg)\
**Post date:** [July 30, 2017, 12:51pm UTC](https://discuss.ocaml.org/t/solved-jbuilder-error-error-i-dont-know-about-package/643/2 "2017-07-30T12:51:54Z")

</div>

This is a common mistake about the `-p` option. The way to think about `-p` (in fact, it literally works this way) is that it makes only the listed packages under `-p` visible to jbuilder. In your case, that means everything but `pla` should be invisible.

What you’re probably looking for is a way to only build a particular package. To do you should simply pass the appropriate targets to `$ jbuilder build`. In your case, `pla.install` could work, or you could select a particular cma or binary. IMO, this is a bit of a usability issue with jbuilder today so feel free to mention this issue in the appropriate issue so that it can be fixed.

---

<div class="post-metadata">

**Author:** ![modlfo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/modlfo/32/345_2.png) [@modlfo](https://discuss.ocaml.org/u/modlfo)\
**Post date:** [July 31, 2017, 5:11am UTC](https://discuss.ocaml.org/t/solved-jbuilder-error-error-i-dont-know-about-package/643/3 "2017-07-31T05:11:08Z")

</div>

Thank you for your answer. I works correctly now.

From the manual I got the impression that one should always used the `-p` option as stated in: [https://jbuilder.readthedocs.io/en/latest/usage.html#invocation-from-opam](https://jbuilder.readthedocs.io/en/latest/usage.html#invocation-from-opam)

Leonardo

---

<div class="post-metadata">

**Author:** ![rgrinberg](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/rgrinberg/32/40_2.png) [@rgrinberg](https://discuss.ocaml.org/u/rgrinberg)\
**Post date:** [July 31, 2017, 6:05am UTC](https://discuss.ocaml.org/t/solved-jbuilder-error-error-i-dont-know-about-package/643/4 "2017-07-31T06:05:06Z")

</div>

When jbuilder is building a package for opam, it should build it against the _installed_ packages rather than the other _local_ packages in the source directory. This is why -p is mandatory in opam builds.
