fix build error due to Format.dprintf does not shadow Log.dprintf

Signed-off-by: cherry530 <xuping33@huawei.com>
This commit is contained in:
cherry530 2022-01-20 16:50:30 +08:00
parent c8aec9f599
commit d70465ba77
2 changed files with 49 additions and 2 deletions

View File

@ -0,0 +1,43 @@
From 70a33ab6500b35c3d73662ece8de32126f3572ac Mon Sep 17 00:00:00 2001
From: Xavier Clerc <xclerc@janestreet.com>
Date: Mon, 13 Aug 2018 12:56:37 +0100
Subject: [PATCH] Change the order of `open`s so that `Format.dprintf` does not
shadow `Log.dprintf`.
---
src/main.ml | 2 +-
src/solver.ml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main.ml b/src/main.ml
index 55155a7..c0b8772 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -14,12 +14,12 @@
(* Original author: Berke Durak *)
open My_std
+open Format
open Log
open Pathname.Operators
open Command
open Tools
open Ocaml_specific
-open Format
;;
exception Exit_build_error of string
diff --git a/src/solver.ml b/src/solver.ml
index 9895a11..c0b7d06 100644
--- a/src/solver.ml
+++ b/src/solver.ml
@@ -14,8 +14,8 @@
(* Original author: Nicolas Pouillard *)
open My_std
-open Log
open Format
+open Log
open Outcome
type backtrace =

View File

@ -3,11 +3,12 @@
%endif
Name: ocaml-ocamlbuild
Version: 0.12.0
Release: 1
Release: 2
Summary: Build tool for OCaml libraries and programs
License: LGPLv2+ with exceptions
URL: https://github.com/ocaml/ocamlbuild
Source0: https://github.com/ocaml/ocamlbuild/archive/%{version}/%{name}-%{version}.tar.gz
Patch0000: 0001-Change-the-order-of-open-s-so-that-Format.dprintf-do.patch
BuildRequires: ocaml >= 4.04.0
%description
OCamlbuild is a build tool for building OCaml libraries and programs.
@ -25,7 +26,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
This package contains the manual for %{name}.
%prep
%setup -q -n ocamlbuild-%{version}
%autosetup -n ocamlbuild-%{version} -p1
%build
make configure \
@ -94,5 +95,8 @@ rm $RPM_BUILD_ROOT%{_libdir}/ocaml/ocamlbuild/META
%doc manual/*
%changelog
* Thu Jan 20 2022 xu_ping <xuping33@huawei.com> - 0.12.0-2
- fix build error due to `Format.dprintf` does not shadow `Log.dprintf`
* Fri Oct 9 2020 maminjie <maminjie1@huawei.com> - 0.12.0-1
- package init