-
Notifications
You must be signed in to change notification settings - Fork 412
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
[configurator] more flexible #define parsing #3739
[configurator] more flexible #define parsing #3739
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'm going to test this right now. |
Yes this does appear to work here, thanks. I have pushed this preliminary commit to the Fedora branch of dune where we'll use it to build the packages that failed last time (https://bugzilla.redhat.com/show_bug.cgi?id=1870368#c17). |
We don't seem to be quite there. There is another dune error which may be the same:
Full log here: https://kojipkgs.fedoraproject.org//work/tasks/6856/50036856/build.log |
I grabbed the test program from the log and compiled it with LTO:
Note again that what you're seeing here is a GCC intermediate form. When using LTO the compiler does only a preliminary parse stage. Actual compilation happens in the linker. |
I suppose we could drop leading 0’s for integer valued probes. This is obviously quite fishy though.
Could you show the configure script in question? I want to make sure they are integer probes.
…On Aug 24, 2020, 1:08 AM -0700, rwmjones ***@***.***>, wrote:
I grabbed the test program from the log and compiled it with LTO:
$ gcc -c `rpm --eval '%{optflags}'` `rpm --eval '%{__global_ldflags}'` test.c `pkg-config cairo --cflags`
$ strings test.o | grep BEGIN
BEGIN-0-01-END
BEGIN-1-016-END
BEGIN-1-00000000016-END
BEGIN-0-00000000001-END
Note again that what you're seeing here is a GCC intermediate form. When using LTO the compiler does only a preliminary parse stage. Actual compilation happens in the linker.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
I added a dummy
Compiling to a final program, this was the output:
I still think this whole approach is suspect and studying what autoconf does is the way to go. |
See the log: https://kojipkgs.fedoraproject.org//work/tasks/6856/50036856/build.log |
We'd happily accept a PR taking us in this direction. |
It's unlikely to happen soon. Is there any workaround I can use to get this working so I can build cairo? |
Are the CFLAGS embedded in dune when it is built, or do they come from the environment when dune is used? |
Neither. They come from the cflags found in with ocamlc -config.
…On Aug 24, 2020, 1:55 AM -0700, rwmjones ***@***.***>, wrote:
Are the CFLAGS embedded in dune when it is built, or do they come from the environment when dune is used?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Is it possible to adjust these when building dune? Our |
I pushed another attempt at a workaround. See if that works. |
It's not possible, and I'm not sure it's the right way to solve this problem. Are there any other build tools where you configure the flags it passes at build time? We could just make dune respect Let's see if @avsm has an opinion on this. I recall he wrestled with similar issues. |
Yes that fixes ocaml-cairo (and didn't break ocaml-ssl), thanks. I'll add this patch to Fedora as well and continue rebuilding packages with it. |
@nojb Could you give this another glance if you don't mind? The implementation is now different. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, modulo the suggested simplification.
f813f1f
to
239e3ad
Compare
Allow duplicate values for the same key as long as they are interpreted as the same value. Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
239e3ad
to
73f03a6
Compare
…lugin, dune-private-libs and dune-glob (2.7.1) CHANGES: - configurator: More flexible probing of `#define`. We allow duplicate values in the object file, as long as they are the same after parsing. (ocaml/dune#3739, fixes ocaml/dune#3736, @rgrinberg) - Record instrumentation backends in dune-package files. This makes it possible to use instrumentation backends defined in installed libraries (eg via OPAM). (ocaml/dune#3735, @nojb) - Add missing `.aux` & `.glob` targets to coq rules (ocaml/dune#3721, fixes ocaml/dune#3437, @rgrinberg) - Fix `dune-package` installation when META templates are present (ocaml/dune#3743, fixes ocaml/dune#3746, @rgrinberg) - Resolve symlinks before running `$ git diff` (ocaml/dune#3750, fixes ocaml/dune#3740, @rgrinberg) - Cram tests: when checking that all test directories contain a `run.t` file, skip empty directories. These can be left around by git. (ocaml/dune#3753, @emillon)
…lugin, dune-private-libs and dune-glob (2.7.1) CHANGES: - configurator: More flexible probing of `#define`. We allow duplicate values in the object file, as long as they are the same after parsing. (ocaml/dune#3739, fixes ocaml/dune#3736, @rgrinberg) - Record instrumentation backends in dune-package files. This makes it possible to use instrumentation backends defined in installed libraries (eg via OPAM). (ocaml/dune#3735, @nojb) - Add missing `.aux` & `.glob` targets to coq rules (ocaml/dune#3721, fixes ocaml/dune#3437, @rgrinberg) - Fix `dune-package` installation when META templates are present (ocaml/dune#3743, fixes ocaml/dune#3746, @rgrinberg) - Resolve symlinks before running `$ git diff` (ocaml/dune#3750, fixes ocaml/dune#3740, @rgrinberg) - Cram tests: when checking that all test directories contain a `run.t` file, skip empty directories. These can be left around by git. (ocaml/dune#3753, @emillon)
Allow duplicate values for the same key as long as they are the same.
@rwmjones see if this fixes the issue for you