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

obuild cannot parse findlib predicates #126

Open
yallop opened this issue Mar 14, 2015 · 11 comments
Open

obuild cannot parse findlib predicates #126

yallop opened this issue Mar 14, 2015 · 11 comments
Assignees
Labels

Comments

@yallop
Copy link

yallop commented Mar 14, 2015

For example, the ctypes META file has the following:

requires(-mt) = "ctypes.foreign.unthreaded"

which causes netlink (which depends on ctypes) to fail with a parse error:

error: unexpected parse error 'expecting '+=' or '=' after requires' in meta file /home/jeremy/.opam/4.01.0/lib/ctypes/META
yallop added a commit to yallop/opam-repository that referenced this issue Mar 14, 2015
Netlink fails to build with the latest ctypes due to an obuild issue:

    ocaml-obuild/obuild#126
yallop added a commit to yallop/opam-repository that referenced this issue Mar 14, 2015
Netlink fails to build with the latest ctypes due to an obuild issue:

    ocaml-obuild/obuild#126
@jeromemaloberti jeromemaloberti self-assigned this Mar 15, 2015
@jeromemaloberti
Copy link
Contributor

Thank you for the report.
There are actually 2 problems/bugs.
The first is that negative predicates (-mt) cannot be parsed in the current version of obuild (I just fixed it on my dev branch). The second is that negative predicates are not checked (I'm working on it now).
Hopefully, I will push a fix soon.

@UnixJunkie
Copy link

related to
#121

@UnixJunkie
Copy link

Thanks for trying to fix this.
I can test the fix if needed, just tell me.

@jeromemaloberti
Copy link
Contributor

I pushed a fix on master.
That would be very useful if you could test.

@UnixJunkie
Copy link

I did tests on my side: obuild can now parse the META file from ocamlnet's rpc library.
Maybe @yallop can test his case again against the current master branch of obuild.

@yallop
Copy link
Author

yallop commented Mar 27, 2015

Unfortunately, the master obuild branch still can't parse my META file. Here's how to reproduce the failing netlink build:

$ opam switch 4.02.1
[...]
$ eval `opam config env`
$ opam pin add obuild [email protected]:ocaml-obuild/obuild.git 
[...]
$ opam install ctypes.0.4.0
[...]
$ git clone [email protected]:xapi-project/ocaml-netlink.git
$ cd ocaml-netlink
$ obuild configure
Configuring ocaml-libnl-0.1...
error: unexpected parse error 'expecting '+=' or '=' after requires' in meta file /home/jeremy/.opam/4.02.1/lib/ctypes/META

@jeromemaloberti
Copy link
Contributor

Indeed, I didn't notice it was on the "require" keyword. I need to do more work.

@UnixJunkie
Copy link

@yallop there is no obuild file in ocaml-netlink
I cannot reproduce your recipe

@UnixJunkie
Copy link

@jmaloberti do you support the require keyword?

@yallop
Copy link
Author

yallop commented Apr 28, 2015

@yallop there is no obuild file in ocaml-netlink
I cannot reproduce your recipe

You can reproduce it by checking out a revision which still contained an obuild file:

git checkout 86356f6e

@jeromemaloberti
Copy link
Contributor

Yes, but not with predicate. I fixed the parsing, so it will not raise the exception anymore, however, the compilation DAG cannot choose the right sub package yet, I need to fix it.

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

No branches or pull requests

3 participants