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

Disable profiling for ocaml version > 4.08.0 #18

Merged
merged 5 commits into from
Mar 1, 2023
Merged

Conversation

nicokn
Copy link
Contributor

@nicokn nicokn commented Feb 26, 2023

I'm trying to run opam pin mlgmpidl git+https://github.com/nberth/mlgmpidl, but it fails with the following error message.

# Profiling with "gprof" (option `-p') is only supported up to OCaml 4.08.0
# make: *** [mpz.p.cmx] Error 2
# rm mpq_caml.o mpz_caml.o mpf_caml.o gmp_random_caml.o mpfr_caml.o gmp_caml.o

Can we add the -disable-profiling flag with filter {ocaml:version > "4.08.0"} to the build step?

@nberth
Copy link
Owner

nberth commented Feb 27, 2023

Sure I'd certainly accept these changes.
Yet, I'm noticing the configure script misses cases with OCaml versions > 4 on line 373, and that may be the actual culprit. Could you try to fix this line and remove the corresponding adjustment to opam/opam?

@nicokn
Copy link
Contributor Author

nicokn commented Feb 27, 2023

Sure I'd certainly accept these changes.
Yet, I'm noticing the configure script misses cases with OCaml versions > 4 on line 373, and that may be the actual culprit. Could you try to fix this line and remove the corresponding adjustment to opam/opam?

Yes, that's a good idea. I added the case to the configure script.

configure Outdated
@@ -370,7 +370,7 @@ if test $enable_prof -eq 1
then
echo -n "checking whether to enable profiling: "
case "${overs}" in
4.08.[1-9]*|4.09.*|4.[1-9]*)
4.08.[1-9]*|4.09.*|4.[1-9]*|5*)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One last thing: could you make it [5-9]*|[1-9][0-9]*) instead (for future-proofing — even if it's likely to be obsolete when we reach such versions of OCaml 😉 )?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure 😀

Copy link
Owner

@nberth nberth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 😄

@nberth nberth merged commit d7e4f3c into nberth:master Mar 1, 2023
@nicokn nicokn mentioned this pull request Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants