FFTW / fftw3

DO NOT CHECK OUT THESE FILES FROM GITHUB UNLESS YOU KNOW WHAT YOU ARE DOING. (See below.)
GNU General Public License v2.0
2.66k stars 651 forks source link

Error: Unbound module "Pervasives" #356

Closed antoniovazquezblanco closed 1 month ago

antoniovazquezblanco commented 1 month ago

Hi everyone!

I am trying to compile fftw3 in Archlinux. I succesfully bootstrapped but I am getting the following errors on make:

% make
make  all-recursive
make[1]: Entering directory '/home/signatus/Projects/fftw3'
Making all in support
make[2]: Entering directory '/home/signatus/Projects/fftw3/support'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/signatus/Projects/fftw3/support'
Making all in genfft
make[2]: Entering directory '/home/signatus/Projects/fftw3/genfft'
ocamlbuild -classic-display -libs unix,nums gen_notw.native gen_notw_c.native gen_twiddle.native gen_twiddle_c.native gen_twidsq.native gen_twidsq_c.native gen_r2r.native gen_r2cf.native gen_r2cb.native gen_hc2c.native gen_hc2cdft.native gen_hc2cdft_c.native gen_hc2hc.native gen_mdct.native
/usr/bin/ocamlopt.opt -c -o util.cmx util.ml
+ /usr/bin/ocamlopt.opt -c -o util.cmx util.ml
File "_none_", line 1:
Alert ocaml_deprecated_auto_include: 
OCaml's lib directory layout changed in 5.0. The unix subdirectory has been
automatically added to the search path, but you should add -I +unix to the
command-line to silence this alert (e.g. by adding unix to the list of
libraries in your dune file, or adding use_unix to your _tags file for
ocamlbuild, or using -package unix for ocamlfind).

File "util.ml", line 142, characters 10-27:
142 |     flush Pervasives.stderr;
                ^^^^^^^^^^^^^^^^^
Error: Unbound module "Pervasives"
Command exited with code 2.
Hint: Recursive traversal of subdirectories was not enabled for this build,
  as the working directory does not look like an ocamlbuild project (no
  '_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories,
  you should add the option "-r" or create an empty '_tags' file.

  To enable recursive traversal for some subdirectories only, you can use the
  following '_tags' file:

      true: -traverse
      <dir1> or <dir2>: traverse

make[2]: *** [Makefile:506: all-local] Error 10
make[2]: Leaving directory '/home/signatus/Projects/fftw3/genfft'
make[1]: *** [Makefile:712: all-recursive] Error 1
make[1]: Leaving directory '/home/signatus/Projects/fftw3'
make: *** [Makefile:556: all] Error 2

System updated. Package versions can be seen at https://archlinux.org/packages/?sort=&q=ocaml.

How may I help solve the issue? :) Thanks!

antoniovazquezblanco commented 1 month ago

Ocaml 4.14 manual has references to Pervasives while 5.0 version does not...

https://ocaml.org/manual/4.14/ocaml-4.14-refman.pdf https://ocaml.org/manual/5.0/ocaml-5.0-refman.pdf

I guess that is the problem... :/

stevengj commented 1 month ago

Looks like you can just replace Pervasives with Stdlib (https://github.com/ocaml/ocaml/issues/10930).

antoniovazquezblanco commented 1 month ago

Thanks for the fast solution :D