Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some build problems #2

Merged
merged 2 commits into from
Mar 29, 2020
Merged

Fix some build problems #2

merged 2 commits into from
Mar 29, 2020

Conversation

talex5
Copy link
Contributor

@talex5 talex5 commented Feb 28, 2020

  • Fix dependencies in opam file (and upgrade to opam 2).
  • Add missing -DWLR_USE_UNSTABLE.

Error was:

In file included from types_stubgen.c:4:
/usr/include/wlr/backend.h:6:2: error: #error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
    6 | #error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
      |  ^~~~~

Note: the project still doesn't build, due to other upstream API changes. I don't know how to fix those. Would be good to enable CI for this repository.

- Fix dependencies in opam file.
- Add missing `-DWLR_USE_UNSTABLE`.

Error was:

    In file included from types_stubgen.c:4:
    /usr/include/wlr/backend.h:6:2: error: #error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
        6 | #error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
          |  ^~~~~

Note: the project still doesn't build, due to other upstream API changes.
@Armael
Copy link
Collaborator

Armael commented Mar 29, 2020

Thanks a lot for the PR. As I was mentioning in #3 , note that the project is in a somewhat dormant state right now, but I'll see what I can do for the other build failures today.

@Armael Armael merged commit 815b1c8 into swaywm:master Mar 29, 2020
@talex5 talex5 deleted the fix-opam branch March 29, 2020 12:14
@Armael
Copy link
Collaborator

Armael commented Apr 4, 2020

Everything now build in master, and I made some progress on porting the examples (examples/simple.ml is now complete).

I do agree that it would be really nice to add CI to the repository, in particular CI triggered on updates in wlroots, so that we know when the bindings become outdated. However I have no experience doing that (or doing CI for ocaml projects in fact).
Would you be able to help with this maybe? Or if you just have a couple pointers that would be very fine as well.

@talex5
Copy link
Contributor Author

talex5 commented Apr 4, 2020

I'd suggest:

  1. Add a conf-wlroots.opam package with a depext on the wlroots package of at least one platform (e.g. fedora).
  2. Add https://github.com/apps/ocaml-ci to https://github.com/swaywm, enabled for just this repository. ocaml-ci is experimental, but I can add swaywm to list of alpha testers if you want to try it.

Alternatively, you could set up Travis with e.g. https://github.com/ocaml/ocaml-ci-scripts/blob/master/README-travis.md - that's more mature, but usually takes much longer to run because it does no caching.

@Armael
Copy link
Collaborator

Armael commented Apr 4, 2020

Thanks! Let's try to use ocaml-ci then.

A couple more questions:

  • can the conf-wlroots.opam file live in the root of the wlroots-ocaml repository (for the moment), or do I need to add it as a proper package in the main opam repository?
  • wlroots-ocaml now also depends on bindings for xkbcommon that are not currently released (and they would also need a conf-xkbcommon I assume). What would be the simplest way of depending on these auxiliary bindings in the CI build?

@talex5
Copy link
Contributor Author

talex5 commented Apr 4, 2020

Yes, you can put conf-wlroots.opam in here too.

For unreleased dependencies, I normally use git submodule add .... The CI will use git clone --recursive to get them too, and will opam pin any *.opam files it finds.

@Armael
Copy link
Collaborator

Armael commented Apr 4, 2020

OK, thanks.

Just to be clear: what I thought would be useful is that the CI would trigger not only on new commits for the wlroots-ocaml repository, but also on new commits on the main wlroots repository. This way, I would know when I need to update the bindings because of changes upstream.
Is it something that's possible?

Then I guess the conf-wlroots package would have to contain instructions for building wlroots from source...?

@Armael
Copy link
Collaborator

Armael commented Apr 4, 2020

(it might be worth noting that AFAIK wlroots/sway has its own CI system, that could be worth using if that is simpler)

@talex5
Copy link
Contributor Author

talex5 commented Apr 4, 2020

Yes, good point. Probably best to use the same CI as the rest of the project, indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants