Summary: | dev-ml/cppo-1.6.7 fail to compile: Error: Library "ocamlbuild" not found. | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | ncaq |
Component: | Current packages | Assignee: | Gentoo Team for the ML programming language family <ml> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | bugs.gentoo.org, gienah, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge --info
build.log of sudo -E emerge -1 cppo |
Description
ncaq
2023-02-25 04:33:27 UTC
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3da83144e754f9432e2f5c715698e1283a11109a commit 3da83144e754f9432e2f5c715698e1283a11109a Author: Sam James <sam@gentoo.org> AuthorDate: 2023-02-25 23:07:31 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-02-25 23:10:54 +0000 dev-ml/cppo: fix dep on ocamlbuild ocamlbuild also installs modules and dune tries to import it here. Closes: https://bugs.gentoo.org/896386 Signed-off-by: Sam James <sam@gentoo.org> dev-ml/cppo/{cppo-1.6.7.ebuild => cppo-1.6.7-r1.ebuild} | 4 ++-- dev-ml/cppo/{cppo-1.6.8.ebuild => cppo-1.6.8-r1.ebuild} | 4 ++-- dev-ml/cppo/{cppo-1.6.9.ebuild => cppo-1.6.9-r1.ebuild} | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) bug 897752 might help too. If it still fails, please attach the full build.log for completeness. The build still fails in my environment, so I investigated a bit more and found a surprise. I usually shorten `sudo -E emerge foo` to `m foo` using zsh alias, but for the bug report I typed `sudo emerge -1 cppo` and found that it compiles. My `m` alias looks like this. ``` 2023-02-26T15:32:15 ❯ type m m is an alias for sudo -E emerge ``` The reason why I put the `-E` flag on `sudo` when I do `emerge` is so that the `USE` flag and the `FEATURES` one-time command specification are not invalidated. Therefore, it is obvious that the environment variable I have set is doing something bad, so I did an `export` to remove the one that came up and did the build. The initial startup `export` of my shell looks like this (I left out anything that looked like a session token, and I also left out anything that was obviously irrelevant since it would be caught by the character limit of DeepL.) ```` CAML_LD_LIBRARY_PATH=/home/ncaq/.opam/default/lib/stublibs:/usr/lib64/ocaml/stublibs:/usr/lib64/ocaml CONFIG_PROTECT='/usr/share/gnupg/qualified.txt /usr/lib64/libreoffice/program/sofficerc' CONFIG_PROTECT_MASK='/etc/sandbox.d /etc/fonts/fonts.conf /etc/gentoo-release /etc/dconf /etc/ca-certificates.conf /etc/texmf/web2c /etc /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/revdep-rebuild' GCC_SPECS='' GDMSESSION=Xsession GDM_LANG=ja_JP.utf8 GLFW_IM_MODULE=ibus GOPATH=/home/ncaq/.go GSETTINGS_BACKEND=dconf GTK_IM_MODULE=ibus GTK_MODULES=canberra-gtk-module HOME=/home/ncaq INFOPATH=/usr/share/gcc-data/x86_64-pc-linux-gnu/12/info:/usr/share/binutils-data/x86_64-pc-linux-gnu/2.40/info:/usr/share/info:/ usr/share/info/emacs-28 JAVAC=/etc/java-config-2/current-system-vm/bin/javac JAVA_HOME=/etc/java-config-2/current-system-vm JDK_HOME=/etc/java-config-2/current-system-vm LANG=en_JP.utf8 LESS='--ignore-case --long-prompt --RAW-CONTROL-CHARS' LESSHISTFILE=- LESSOPEN='|lesspipe %s' LEX=flex LOGNAME=ncaq MAIL=/var/mail/ncaq MANPAGER=manpager MANPATH=/etc/java-config-2/current-system-vm/man:/usr/share/gcc-data/x86_64-pc-linux-gnu/12/man:/usr/share/binutils-data/x86_64-pc -linux-gnu/2.40/man:/etc/java-config-2/current-system-vm/man/:/usr/local/share/man:/usr/share/man:/usr/lib/rust/man:/usr/lib/llvm/ 15/share/man:/home/ncaq/.opam/default/man:/home/ncaq/.opam/default/man MOTD_SHOWN=pam MOZ_GMP_PATH=/usr/lib64/nsbrowser/plugins/gmp-gmpopenh264/system-installed NPM_CONFIG_GLOBALCONFIG=/etc/npm/npmrc OCAML_TOPLEVEL_PATH=/home/ncaq/.opam/default/lib/toplevel OLDPWD=/home/ncaq/.local/share/zinit/plugins/gentoo---gentoo-zsh-completions OPAM_SWITCH_PREFIX=/home/ncaq/.opam/default PAGER=/usr/bin/less PATH=/home/ncaq/.local/share/zinit/polaris/bin:/home/ncaq/.zsh.d/bin:/home/ncaq/.local/bin:/home/ncaq/.yarn/bin:/home/ncaq/.local/ share/gem/ruby/3.1.0/bin:/home/ncaq/.pyenv/shims:/home/ncaq/.pyenv/bin:/home/ncaq/.opam/default/bin:/home/ncaq/.cargo/bin:/home/ ncaq/.cabal/bin:/home/ncaq/.ghcup/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/bin:/usr/lib/llvm/15/bin:/opt/cuda/bin PWD=/home/ncaq QT_IM_MODULE=ibus SBCL_HOME=/usr/lib64/sbcl SBCL_SOURCE_ROOT=/usr/lib64/sbcl/src SHELL=/bin/zsh SHLVL=1 STARSHIP_CONFIG=/home/ncaq/.zsh.d/starship.toml STARSHIP_SHELL=zsh TERM=xterm-kitty TERMINFO=/usr/lib64/kitty/terminfo USER=ncaq VISUAL='emacsclient -a emacs' XAUTHORITY=/home/ncaq/.Xauthority XDG_CONFIG_DIRS=/etc/xdg XDG_DATA_DIRS=/usr/local/share:/usr/share XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ncaq XDG_RUNTIME_DIR=/run/user/1000 XDG_SEAT=seat0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 XDG_SESSION_CLASS=user XDG_SESSION_DESKTOP=Xsession XDG_SESSION_ID=1 XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SESSION_TYPE=x11 XDG_VTNR=7 XMODIFIERS='@im=ibus' ZPFX=/home/ncaq/.local/share/zinit/polaris ZSH_CACHE_DIR=/home/ncaq/.cache/zinit _JAVA_AWT_WM_NONREPARENTING=1 ``` From here I can `unset OPAM_SWITCH_PREFIX` to build even with `sudo -E emerge -1 cppo`. Is this a problem specific to my configuration? But I also think that emerge should succeed regardless of the configuration under the home directory. I think other OCaml packages have similar problems. I have also attached a build.log of the failed build. Created attachment 854774 [details]
build.log of sudo -E emerge -1 cppo
This is why we usually recommend emerging with a clean root shell, not via sudo su. But we could add 'OPAM_SWITCH_PREFIX' and the others from your output to a list that we unset in profiles, I suppose. (In reply to Sam James from comment #5) > This is why we usually recommend emerging with a clean root shell, not via > sudo su. > > But we could add 'OPAM_SWITCH_PREFIX' and the others from your output to a > list that we unset in profiles, I suppose. With emphasis on "clean". Yes, "OPAM_SWITCH_PREFIX" and other OPAM vars should definitely be unset. I hit this bug without any OPAM* env vars set. Even though: $ cat /var/db/repos/gentoo/dev-ml/cppo/cppo-1.6.9-r1.ebuild | grep "dev-ml/ocamlbuild" RDEPEND="dev-ml/ocamlbuild:= ocamlbuild was not installed first. After: $ emerge -1 ocamlbuild cppo compiled. |