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

No ocamldep link with --disable-installing-bytecode-programs #8855

Open
talex5 opened this issue Aug 5, 2019 · 1 comment

Comments

@talex5
Copy link

commented Aug 5, 2019

If OCaml is compiled with --disable-installing-bytecode-programs then the usual ocamldep hard-link isn't installed. This causes ocamlfind to fail to install:

#=== ERROR while compiling ocamlfind.1.8.0 ====================================#
# context     2.0.5 | linux/arm64 | ocaml-base-compiler.4.08.0 | file:///home/opam/opam-repository
# path        ~/.opam/4.08/.opam-switch/build/ocamlfind.1.8.0
# command     /usr/bin/make all
# exit-code   2
# env-file    ~/.opam/log/ocamlfind-8658-e0ba4f.env
# output-file ~/.opam/log/ocamlfind-8658-e0ba4f.out
### output ###
# [...]
# if [ "true" = "true" ]; then                 \
# 	cp topfind.ml.in topfind.ml;                             \
# else                                                             \
# 	sed -e '/PPXOPT_BEGIN/,/PPXOPT_END/ d' topfind.ml.in     \
# 		> topfind.ml ;                                   \
# fi
# ocamldep *.ml *.mli >depend
# /bin/sh: ocamldep: not found
# Makefile:181: depend: No such file or directory
# make[1]: *** [Makefile:148: depend] Error 127
# make[1]: Leaving directory '/home/opam/.opam/4.08/.opam-switch/build/ocamlfind.1.8.0/src/findlib'
# make: *** [Makefile:13: all] Error 2

It looks like the link step is missing from the disabled case in tools/Makefile:

ocaml/tools/Makefile

Lines 183 to 202 in 064ac56

install::
ifeq "$(INSTALL_BYTECODE_PROGRAMS)" "true"
for i in $(install_files); \
do \
$(INSTALL_PROG) "$$i" "$(INSTALL_BINDIR)/$$i.byte$(EXE)"; \
if test -f "$$i".opt; then \
$(INSTALL_PROG) "$$i.opt" "$(INSTALL_BINDIR)/$$i.opt$(EXE)" && \
(cd "$(INSTALL_BINDIR)/" && $(LN) "$$i.opt$(EXE)" "$$i$(EXE)"); \
else \
(cd "$(INSTALL_BINDIR)/" && $(LN) "$$i.byte$(EXE)" "$$i$(EXE)"); \
fi; \
done
else
for i in $(install_files); \
do \
if test -f "$$i".opt; then \
$(INSTALL_PROG) "$$i.opt" "$(INSTALL_BINDIR)/$$i.opt$(EXE)"; \
fi; \
done
endif

@dra27

This comment has been minimized.

Copy link
Contributor

commented Aug 6, 2019

Darn, it's a shame we didn't realise this a few days ago when I suggested it for the images, as we've just missed the 4.08.1 release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.