After recent update (ocaml 4.09.0) camomile fails to compile. The error is File "internal/bitsvect.ml", line 74, characters 2-24: 74 | v.[i0] <- Char.chr c0'; ^^^^^^^^^^^^^^^^^^^^^^ Alert deprecated: Stdlib.String.set Use Bytes.set instead. File "internal/bitsvect.ml", line 74, characters 2-3: 74 | v.[i0] <- Char.chr c0'; ^ Error: This expression has type string but an expression was expected of type bytes Reproducible: Always Portage 2.3.84 (python 3.6.10-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-9.2.0, glibc-2.30-r3, 5.4.6-gentoo x86_64) ================================================================= System uname: Linux-5.4.6-gentoo-x86_64-Intel-R-_Core-TM-_i7-5820K_CPU_@_3.30GHz-with-gentoo-2.6 KiB Mem: 65792160 total, 51420824 free KiB Swap: 101073916 total, 101073916 free Timestamp of repository gentoo: Sat, 28 Dec 2019 16:00:01 +0000 Head commit of repository gentoo: 58aa66ec1fed6071184e7759ee3c257af792e3ba sh bash 5.0_p11 ld GNU ld (Gentoo 2.32 p2) 2.32.0 app-shells/bash: 5.0_p11::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.30.1::gentoo dev-lang/python: 2.7.17::gentoo, 3.6.10::gentoo, 3.7.6::gentoo, 3.8.1::gentoo dev-util/cmake: 3.16.2-r1::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/openrc: 0.42.1::gentoo sys-apps/sandbox: 2.18::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15.1-r2::gentoo, 1.16.1-r2::gentoo sys-devel/binutils: 2.29.1-r1::gentoo, 2.30-r3::gentoo, 2.31.1-r4::gentoo, 2.32-r1::gentoo, 2.33.1::gentoo sys-devel/gcc: 6.4.0-r5::gentoo, 7.3.0-r6::gentoo, 8.3.0-r3::gentoo, 9.2.0-r3::gentoo sys-devel/gcc-config: 2.1::gentoo sys-devel/libtool: 2.4.6-r5::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.30-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: LocalOverlay location: /usr/local/portage masters: gentoo crossdev location: /usr/local/portage-crossdev masters: gentoo priority: 10 dlang location: /var/lib/layman/dlang masters: gentoo priority: 50 science location: /var/lib/layman/science masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64 ~x86" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.3/ext-active/ /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.3/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.3/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-O2 -pipe -march=native" DISTDIR="/usr/portage/distfiles" ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR" FCFLAGS="-O2 -pipe -march=native" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe -march=native" GENTOO_MIRRORS="http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://gentoo.cites.uiuc.edu/pub/gentoo/ ftp://gentoo.cites.uiuc.edu/pub/gentoo/" LANG="en_US.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LINGUAS="en_US" MAKEOPTS="-j13" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git" PORTAGE_TMPDIR="/var/tmp" USE="X a52 aac acl acpi activities alsa amd64 berkdb bindist bluetooth bluray branding bzip2 cairo cdda cdr cli consolekit crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam ffmpeg flac fontconfig fortran fuse gdbm gif gpm gssapi gstreamer gtk iconv icu ieee1394 ipv6 javafx jpeg kde kerberos kipi kwallet latex lcms ldap libnotify libtirpc mad mediacenter mng mp3 mp4 mpeg multilib ncurses networkmanager nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma plotutils png policykit ppds pulseaudio python qml qt3support qt5 readline scanner sdk sdl seccomp semantic-desktop spell split-usr ssl startup-notification svg taglib tcpd tiff truetype udev udisks unicode upower usb v4l vcd vorbis wallpapers widgets winbind wxwidgets x264 xattr xcb xcomposite xft xml xv xvid zlib" ABI_X86="64 32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" L10N="en-US" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-2" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" RUBY_TARGETS="ruby24 ruby25 ruby26 ruby27" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Created attachment 601572 [details] build.log
Same problem here also with the following customized settings of my personal profile: ld GNU ld (Gentoo 2.31.1 p5) 2.31.1 ccache version 3.7.6 [enabled] app-shells/bash: 4.4_p23-r1::gentoo dev-java/java-config: 2.2.0-r4::gentoo dev-lang/perl: 5.30.1::gentoo dev-lang/python: 2.7.17-r1::gentoo, 3.6.9::gentoo, 3.7.5-r1::gentoo dev-util/ccache: 3.7.6::gentoo dev-util/cmake: 3.16.2-r1::gentoo dev-util/pkgconfig: 0.29.2::gentoo sys-apps/baselayout: 2.6-r1::gentoo sys-apps/sandbox: 2.13::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r4::gentoo sys-devel/automake: 1.11.6-r3::gentoo, 1.13.4-r2::gentoo, 1.15.1-r2::gentoo, 1.16.1-r1::gentoo sys-devel/binutils: 2.31.1-r4::gentoo, 2.32-r1::gentoo, 2.33.1-r1::gentoo sys-devel/gcc: 7.3.0-r6::gentoo, 7.4.0-r2::gentoo, 8.2.0-r6::gentoo, 8.3.0-r1::gentoo, 9.2.0-r2::gentoo sys-devel/gcc-config: 2.1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1-r4::gentoo sys-kernel/linux-headers: 5.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.29-r7::gentoo dev-lang/ocaml 4.09.0::gentoo USE=ocamlopt
I try to build camomile version available in arch linux: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=ocaml-camomile After converting pkgbuild to ebuild and add the necessary dependencies I realize that other ebuilds, such as dev-ml/lablgl-1.05-r1 and dev-ml/dune-1.7.2, have the same code bug related to the source code that seems to be outdated for recent ocaml versions. So to have camomile recent version to be compiled would require additional revision work for all libs and dune build system.
I just added to my overlay a camomile version that compiles with most recent version of ocaml. I also needed to update additional ebuilds as shown in the commit. My goal was to build all necessary dependencies for opencv and libguestfs for use flag ocaml. I avoid to compile opam package manager, since it requires many dependencies that I choose to avoid (keep it simple). https://cgit.gentoo.org/repo/user/ssnb.git/commit/?id=d47b7a507ab34622004a7ca5aa87a029c3631a5b I would be glad with your feedback.
Thanks! It works ... mostly. dev-ml/ocaml-fileutils has to be be emerged before ocaml-gettext, presumably because of a missing dependency.
Thanks Jean-Francois Ostiguy. You're right, dev-ml/ocaml-fileutils need to be a RDEPEND maybe in gettext... I will review the dependency tree to see if it should be placed in another gettext dependency. Compiling in another machine from scratch I found another dependency bug that I need to review: * Package: dev-ml/ocaml-gettext-0.4.1 * Repository: ssnb * USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU * FEATURES: ccache compressdebug network-sandbox preserve-libs sandbox splitdebug userpriv usersandbox dune build @install ocamlyacc src/lib/gettext/base/gettextMo_parser.{ml,mli} 14 shift/reduce conflicts. File "src/tools/discover-stub/discover.ml", line 1: Error: /usr/lib64/ocaml/dune/configurator/configurator.cmi is not a compiled interface for this version of OCaml. It seems to be for an older version of OCaml. ocamlyacc src/lib/gettext/extension/gettextPo_parser.{ml,mli} 12 shift/reduce conflicts. File "src/lib/gettext/extension/gettextDomain.ml", line 1: Error: /usr/lib64/ocaml/fileutils/FilePath.cmi is not a compiled interface for this version of OCaml. It seems to be for an older version of OCaml. I hope to look into this during next weekend.
I ran into this myself on a different machine yesterday. It looks like ocaml-gettext should depend on dune. Updating dune replaces the file /usr/lib64/ocaml/dune/configurator/configurator.cmi ocaml-gettext then emerges without a hitch.
I ran into another problem with ocaml-gettext: * Package: dev-ml/ocaml-gettext-0.4.1 * Repository: ssnb ... >>> Compiling source in /var/portage/tmp/portage/dev-ml/ocaml-gettext-0.4.1/work/ocaml-gettext-0.4.1 ... make -j4 -j1 build dune build @install File "src/tools/discover-stub/dune", line 3, characters 12-29: 3 | (libraries dune.configurator)) ^^^^^^^^^^^^^^^^^ Error: Library "dune.configurator" not found. dev-ml/dune-2.1.0::gentoo does not install these files, but with dev-ml/dune-1.11.4::ssnb ocaml-gettext complains dune version is too old. Installing those additional packages from the dune repository makes ocaml-gettext compile.
Eugene Shalygin you pointed it right. There is a dependency also with < dune-2.0.0. I have installed dune-1.11.4.
Today I was struggling trying to compile camomile-0.8.5-r1 and noticed this issue! Making a little bit research I found that this error is caused by changes in ocaml (they made unmutable the data type "string"). I found that applying a little change in the Makefile, camomile compiles without issues, so, I made an user patch called "/etc/portage/patches/dev-ml/camomile-0.8.5-r1/unsafe_strings.patch" with this content: ---BOF----------Don't include this line in the file ----------- --- camomile-0.8.5/Makefile.in 2013-09-15 02:48:38.000000000 -0500 +++ camomile-0.8.5.new/Makefile.in 2020-07-03 00:43:13.639039206 -0500 @@ -48,8 +48,8 @@ OCAMLMKLIB = @OCAMLMKLIB@ # compiler options -BOPTIONS = @DEBUG@ @ASSERT@ -OOPTIONS = @COPTIONS@ @PROFILE@ @ASSERT@ +BOPTIONS =@DEBUG@ @ASSERT@ -unsafe-string +OOPTIONS =@COPTIONS@ @PROFILE@ @ASSERT@ -unsafe-string # PACKAGE = camomile ---EOF----------Don't include this line in the file ----------- The thing is that the camomile ebuild is EAPI 5, this version of ebuild don't call the function user_patch, so we have to patch the ebuild itselft. I created the a file called "/etc/portage/env/dev-ml/camomile-0.8.5-r1" with this content: ---BOF----------Don't include this line in the file ----------- src_prepare() { has_version '>=dev-lang/ocaml-4.05_beta' && epatch "${FILESDIR}/ocaml405.patch" epatch_user || die; } ---EOF----------Don't include this line in the file ----------- And voila! camomile compiled! Best regards :)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=74cf47dd94181c32254ce87aa89de3e360db6922 commit 74cf47dd94181c32254ce87aa89de3e360db6922 Author: Hank Leininger <hlein@korelogic.com> AuthorDate: 2020-08-02 22:21:40 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2020-08-14 23:23:32 +0000 dev-ml/camomile: ocaml-4.09 compat fixes Existing ebuild will not build with ocaml-4.09, only with older versions that have an outstanding GLSA (202007-48). ocaml-4.09 is being stabilized now. This commit just uses the existing workaround/fix in b.g.o and updates the ebuild to EAPI=7. Note that EAPI7 required modifying an existing patch so it will apply with -p1; should still work with the old ebuild that uses epatch. Updated to address feedback in https://github.com/gentoo/gentoo/pull/16964 Signed-off-by: Hank Leininger <hlein@korelogic.com> Closes: https://bugs.gentoo.org/704102 Bug: https://bugs.gentoo.org/708696 Package-Manager: Portage-3.0.0, Repoman-2.3.23 Closes: https://github.com/gentoo/gentoo/pull/16964 Signed-off-by: Sam James <sam@gentoo.org> dev-ml/camomile/camomile-0.8.5-r2.ebuild | 47 +++++++++++++++++++++++++ dev-ml/camomile/files/ocaml-unsafe-string.patch | 13 +++++++ dev-ml/camomile/files/ocaml405.patch | 12 +++---- 3 files changed, 66 insertions(+), 6 deletions(-)