# Utop sends "Alert deprecated: module Base.Format"

**URL:** <https://discuss.ocaml.org/t/utop-sends-alert-deprecated-module-base-format/13365>\
**Category:** Learning\
**Tags:** ocamlfind, utop, install, real-world-ocaml, base\
**Created:** [November 3, 2023, 3:49pm UTC](https://discuss.ocaml.org/t/utop-sends-alert-deprecated-module-base-format/13365 "2023-11-03T15:49:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![carotte\_sauvage](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/carotte_sauvage/32/4352_2.png) [@carotte\_sauvage](https://discuss.ocaml.org/u/carotte_sauvage)\
**Post date:** [November 3, 2023, 3:49pm UTC](https://discuss.ocaml.org/t/utop-sends-alert-deprecated-module-base-format/13365/1 "2023-11-03T15:49:21Z")

</div>

Hi,

On this page [Real World OCaml](https://dev.realworldocaml.org/install.html), I tried to follow the instructions to :

1. Install and set up opam
2. Install librairies and tools
3. Set up my editor (I use Emacs)

The step 2) asks me to execute this command :

> opam install core core\_bench utop

Then I have to set up “utop”, by creating the file "~/.ocamlinit ", and insert the following contents :

> #require “core.top”;;  
> #require “ppx\_jane”;;  
> open Base;;

The step 3) asks me to execute this commands :

> opam install user-setup tuareg ocamlformat merlin  
> opam user-setup install

But when I launch “utop”, this message appears :

> Welcome to utop version 2.13.1 (using OCaml version 4.13.1)!
> 
> File “/home/asalek01/.opam/4.13.1/lib/toplevel/topfind”, line 20, characters 12-33:  
> 20 | let fmt = Format.make\_formatter (fun \_ \_ \_ → ()) (fun \_ → ()) in  
> ^^^^^^^^^^^^^^^^^^^^^  
> Alert deprecated: module Base.Format  
> [2016-09] this element comes from the stdlib distributed with OCaml.  
> [Base] doesn’t export a [Format] module, although the  
> [Caml.Format.formatter] type is available (as [Formatter.t])  
> for interaction with other libraries.

Does anyone knows why ?

---

<div class="post-metadata">

**Author:** ![Kakadu](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/kakadu/32/1204_2.png) [@Kakadu](https://discuss.ocaml.org/u/Kakadu)\
**Post date:** [November 3, 2023, 3:53pm UTC](https://discuss.ocaml.org/t/utop-sends-alert-deprecated-module-base-format/13365/2 "2023-11-03T15:53:39Z")

</div>

AFAIR, either the recent version of base, or the recent version of core gives this deprecation. You should try to install the older versions of these libraries, and check.

---

<div class="post-metadata">

**Author:** ![carotte\_sauvage](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ocaml.org/carotte_sauvage/32/4352_2.png) [@carotte\_sauvage](https://discuss.ocaml.org/u/carotte_sauvage)\
**Post date:** [November 3, 2023, 4:04pm UTC](https://discuss.ocaml.org/t/utop-sends-alert-deprecated-module-base-format/13365/3 "2023-11-03T16:04:06Z")

</div>

Thank you for your response @Kakadu . By looking the content of the file “`~/.ocamlinit`”, I read this:

> #require “core.top”;;  
> #require “ppx\_jane”;;  
> open Base;;  
> (\* ## added by OPAM user-setup for ocamltop / base ## 3ec62baf6f9c219ae06d9814069da862 ## you can edit, but keep this line _)  
> #use “topfind”;;  
> (_ ## end of OPAM user-setup addition for ocamltop / base ## keep this line \*)

Finaly, I decided to write the line “`open Base;;`” after “`#use "topfind";;`” :

> #require “core.top”;;  
> #require “ppx\_jane”;;  
> (\* ## added by OPAM user-setup for ocamltop / base ## 3ec62baf6f9c219ae06d9814069da862 ## you can edit, but keep this line _)  
> #use “topfind”;;  
> (_ ## end of OPAM user-setup addition for ocamltop / base ## keep this line \*)  
> open Base;;

Then I relaunch “`utop`” and everything works :

> Welcome to utop version 2.13.1 (using OCaml version 4.13.1)!
> 
> Findlib has been successfully loaded. Additional directives:  
> #require “package”;; to load a package  
> #list;; to list the available packages  
> #camlp4o;; to load camlp4 (standard syntax)  
> #camlp4r;; to load camlp4 (revised syntax)  
> #predicates “p,q,…”;; to set these predicates  
> Topfind.reset();; to force that packages will be reloaded  
> #thread;; to enable threads
> 
> utop[0]\>
