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

Unable to compile - Unbound module Option #8

Closed
paddatrapper opened this issue Aug 19, 2019 · 2 comments
Closed

Unable to compile - Unbound module Option #8

paddatrapper opened this issue Aug 19, 2019 · 2 comments

Comments

@paddatrapper
Copy link

When building master, make produces the error

File "image.ml", line 607, characters 19-31:
Error: Unbound module Option

Full log:

$ ./bootstrap
$ ./configure
configuring ocaml-mm 0.5.0
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking target toolchain... linux
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking for ar... ar
checking for ocamlc... ocamlc
OCaml version is 4.05.0
checking if ocaml compiler supports first-class modules... yes
OCaml library path is /usr/lib/ocaml
checking for ocamlopt... ocamlopt
checking for ocamlc.opt... ocamlc.opt
checking for ocamlopt.opt... ocamlopt.opt
checking for ocaml... ocaml
checking for ocamldep... ocamldep
checking for ocamldep.opt... ocamldep.opt
checking for ocamlmktop... ocamlmktop
checking for ocamlmklib... ocamlmklib
checking for ocamldoc... ocamldoc
checking for ocamldoc.opt... ocamldoc.opt
checking for ocamlbuild... ocamlbuild
checking for camlidl... no
checking for ocamllex... ocamllex
checking for ocamllex.opt... ocamllex.opt
checking for ocamlyacc... ocamlyacc
checking for camlp4... no
checking for camlp4boot... no
checking for camlp4o... no
checking for camlp4of... no
checking for camlp4oof... no
checking for camlp4orf... no
checking for camlp4prof... no
checking for camlp4r... no
checking for camlp4rf... no
checking for ocamlfind... ocamlfind
checking for ocaml standard library path... /usr/lib/ocaml
checking for caml/threads.h... yes
checking for gcc option to produce PIC... -fPIC
checking for memalign... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking whether byte ordering is bigendian... no
checking for OCaml library alsa... not found
checking for OCaml library ao... not found
checking for OCaml library pulseaudio... not found
checking for OCaml library gstreamer... not found
checking for OCaml library mad... not found
checking for OCaml library ogg... not found
checking for OCaml library sdl... not found
checking for OCaml library theora... not found
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking libavcodec/avcodec.h usability... no
checking libavcodec/avcodec.h presence... no
checking for libavcodec/avcodec.h... no
checking linux/videodev.h usability... no
checking linux/videodev.h presence... no
checking for linux/videodev.h... no
checking for ocaml bytes module... ok
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating external/Makefile
config.status: creating external/Makefile.defs
config.status: creating src/META
config.status: creating config.h


Supported external libraries:
  - Alsa      : no
  - AO        : no
  - FFmpeg    : no
  - Gstreamer : no
  - Mad       : no
  - ogg       : no
  - OSS       : yes
  - Pulseaudio: no
  - SDL       : no
  - Theora    : no
  - V4L       : no

$ make
make -C src all
make[1]: Entering directory '/home/paddatrapper/ocaml-mm/src'
make[2]: Entering directory '/home/paddatrapper/ocaml-mm/src'
ocamldep.opt synth.mli > ._bcdi/synth.di
ocamldep.opt MIDI.mli > ._bcdi/MIDI.di
ocamldep.opt video.mli > ._bcdi/video.di
ocamldep.opt image.mli > ._bcdi/image.di
ocamldep.opt audio.mli > ._bcdi/audio.di
ocamldep.opt ringbuffer.mli > ._bcdi/ringbuffer.di
ocamldep.opt synth.ml > ._d/synth.d
ocamldep.opt MIDI.ml > ._d/MIDI.d
ocamldep.opt video.ml > ._d/video.d
ocamldep.opt image.ml > ._d/image.d
ocamldep.opt audio.ml > ._d/audio.d
ocamldep.opt IO.ml > ._d/IO.d
ocamldep.opt ringbuffer.ml > ._d/ringbuffer.d
ocamlc.opt -c -cc "gcc" -ccopt "-fPIC -g -O2 -I.. -g -Wall -O3 \
                        -DPIC   \
                          -I.. -I/usr/lib/ocaml/bytes  -o audio_c.o " audio_c.c
ocamlc.opt -c -cc "gcc" -ccopt "-fPIC -g -O2 -I.. -g -Wall -O3 \
                        -DPIC   \
                          -I.. -I/usr/lib/ocaml/bytes  -o image_data.o " image_data.c
ocamlc.opt -c -cc "gcc" -ccopt "-fPIC -g -O2 -I.. -g -Wall -O3 \
                        -DPIC   \
                          -I.. -I/usr/lib/ocaml/bytes  -o image_pixel.o " image_pixel.c
ocamlc.opt -c -cc "gcc" -ccopt "-fPIC -g -O2 -I.. -g -Wall -O3 \
                        -DPIC   \
                          -I.. -I/usr/lib/ocaml/bytes  -o image_rgb.o " image_rgb.c
image_rgb.c: In function 'caml_rgb_color_to_alpha':
image_rgb.c:1108:10: warning: variable 'd' set but not used [-Wunused-but-set-variable]
 1108 |   double d;
      |          ^
image_rgb.c:1107:22: warning: variable 'aa' set but not used [-Wunused-but-set-variable]
 1107 |   double rr, gg, bb, aa;
      |                      ^~
ocamlc.opt -c -cc "gcc" -ccopt "-fPIC -g -O2 -I.. -g -Wall -O3 \
                        -DPIC   \
                          -I.. -I/usr/lib/ocaml/bytes  -o image_yuv420.o " image_yuv420.c
ar rcs libmm_stubs.a  audio_c.o image_data.o image_pixel.o image_rgb.o image_yuv420.o
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I .. -I /usr/lib/ocaml/bytes ringbuffer.mli
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I .. -I /usr/lib/ocaml/bytes ringbuffer.ml
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I .. -I /usr/lib/ocaml/bytes IO.ml
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I .. -I /usr/lib/ocaml/bytes audio.mli
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I .. -I /usr/lib/ocaml/bytes audio.ml
File "audio.ml", line 329, characters 10-14:
Warning 32: unused value ifft.
File "audio.ml", line 350, characters 5-10:
Warning 32: unused value iteri.
File "audio.ml", line 386, characters 28-29:
Warning 27: unused variable f.
File "audio.ml", line 395, characters 25-26:
Warning 27: unused variable f.
File "audio.ml", line 407, characters 23-29:
Warning 27: unused variable window.
File "audio.ml", line 766, characters 4-287:
Warning 34: unused type tb303.
File "audio.ml", line 767, characters 11-17:
Warning 27: unused variable self.
File "audio.ml", line 774, characters 18-21:
Warning 27: unused variable buf.
File "audio.ml", line 774, characters 22-25:
Warning 27: unused variable ofs.
File "audio.ml", line 774, characters 26-29:
Warning 27: unused variable len.
File "audio.ml", line 874, characters 4-10:
Warning 32: unused value length.
File "audio.ml", line 1213, characters 9-15:
Warning 27: unused variable self.
File "audio.ml", line 1230, characters 9-15:
Warning 27: unused variable self.
File "audio.ml", line 1298, characters 9-15:
Warning 27: unused variable self.
File "audio.ml", line 1422, characters 9-15:
Warning 27: unused variable self.
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I .. -I /usr/lib/ocaml/bytes image.mli
ocamlc.opt -c -dtypes -g -w +A-4@5-7@8-9@11@12@20-35-44-45-50 -I .. -I /usr/lib/ocaml/bytes image.ml
File "image.ml", line 607, characters 19-31:
Error: Unbound module Option
make[2]: *** [OCamlMakefile:1055: image.cmo] Error 2
make[2]: Leaving directory '/home/paddatrapper/ocaml-mm/src'
make[1]: *** [OCamlMakefile:781: byte-code-library] Error 2
make[1]: Leaving directory '/home/paddatrapper/ocaml-mm/src'
make: *** [Makefile:12: all] Error 2
@glondu
Copy link

glondu commented Aug 20, 2019

The opam file says it depends on ocaml >= 4.08. Did you pay attention?

@toots
Copy link
Member

toots commented Aug 20, 2019

I think the configure should also check for it. Will add something, thanks for reporting.

@toots toots closed this as completed in 4671b22 Aug 20, 2019
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

No branches or pull requests

3 participants