Package Details: gapi-ocaml 0.4.8-2

Git Clone URL: https://aur.archlinux.org/gapi-ocaml.git (read-only, click to copy)
Package Base: gapi-ocaml
Description: A simple OCaml client for Google Services.
Upstream URL: https://astrada.github.io/gapi-ocaml/
Keywords: api gapi google ocaml
Licenses: MIT
Submitter: whynothugo
Maintainer: pricechrispy
Last Packager: pricechrispy
Votes: 45
Popularity: 0.000000
First Submitted: 2013-07-08 03:56 (UTC)
Last Updated: 2026-01-31 21:15 (UTC)

Pinned Comments

nerflad commented on 2019-09-10 10:13 (UTC)

@caseyjp1 It's not a problem with the build. Read the error message. You have updated ocaml since the last time you compiled this package so you need to recompile all the dependencies. Use "pacman -Qo [.cmi filename]" to find which packages to rebuild. Or if you're brave, pacman -Rsc gapi-ocaml && pacman -Sc and start from scratch.

Latest Comments

1 2 3 4 5 6 .. 9 Next › Last »

AngelSherry commented on 2026-02-11 23:40 (UTC) (edited on 2026-02-11 23:55 (UTC) by AngelSherry)

@daemonspudguy

I also got the error. I found that ocaml-curl installs its files in /usr/lib/curl/. However, ocamlfind only searches for packages in /usr/lib/ocaml/ by default.

There are two relatively straightforward methods to resolve this issue.

The first method involves modifying the build() function in gapi-ocaml's PKGBUILD as follows:

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"

export OCAMLPATH="/usr/lib:/usr/lib/ocaml"

    dune build -p "$pkgname"

    sed -i '/doc:\s\[/,$d' _build/default/gapi-ocaml.install
}

However, this requires manually modifying the build() section after every gapi-ocaml update until the packager fixes the PKGBUILD.

The second method is to manually create symbolic links so ocamlfind can find what it needs:

sudo ln -s /usr/lib/curl /usr/lib/ocaml/curl

sudo ln -s /usr/lib/ocurl /usr/lib/ocaml/ocurl

sudo ln -s /usr/lib/curl_lwt /usr/lib/ocaml/curl_lwt

This is the safest approach, preventing ocamlfind from scanning the entire /usr/lib directory.

daemonspudguy commented on 2026-02-11 19:50 (UTC) (edited on 2026-02-11 19:55 (UTC) by daemonspudguy)

Anyone else getting this:

File "src/gapi/dune", line 5, characters 71-75:
5 |  (libraries gapi-ocaml.netsys-local threads gapi-ocaml.netstring-local curl str cryptokit yojson)
                                                                           ^^^^
Error: Library "curl" not found.
-> required by library "gapi-ocaml" in _build/default/src/gapi
-> required by _build/default/META.gapi-ocaml
-> required by _build/install/default/lib/gapi-ocaml/META
-> required by _build/default/gapi-ocaml.install
-> required by alias install
make: *** [Makefile:4: build] Fout 1

AngelSherry commented on 2026-01-24 17:11 (UTC)

For those encountering the following error while building gapi-ocaml, you can manually edit the version in the PKGBUILD of ocaml-cryptokitin AUR to 1.20 or below.

Starting build()...
(cd _build/default && /usr/bin/ocamlc.opt -w -40 -w -23-27-32-33 -g -bin-annot -bin-annot-occurrences -I src/g
api/.gapi_ocaml.objs/byte -I /usr/lib/ocaml/camlp-streams -I /usr/lib/ocaml/cryptokit -I /usr/lib/ocaml/curl -
I /usr/lib/ocaml/str -I /usr/lib/ocaml/threads -I /usr/lib/ocaml/unix -I /usr/lib/ocaml/yojson -I /usr/lib/oca
ml/zarith -I src/netstring/.netstring_local.objs/byte -I src/netsys/.netsys_local.objs/byte -no-alias-deps -o
src/gapi/.gapi_ocaml.objs/byte/gapiJwtServiceAccount.cmi -c -intf src/gapi/gapiJwtServiceAccount.mli)
File “src/gapi/gapiJwtServiceAccount.mli”, line 23, characters 34-51:
23 | val parse_private_key : string -> Cryptokit.RSA.key
^^^^^^^^^^^^^^^^^
Error: Unbound type constructor Cryptokit.RSA.key
==> Error: build() encountered failure.
Aborting...

This is because Cryptokit 1.21 introduced an RSA change that broke the RSA functionality required by gapi-ocaml. This PR migrates Cryptokit's big-number arithmetic core from the legacy Numerix library to Zarith. This means: if the build environment fails to correctly detect Zarith, Cryptokit may either omit compiling the RSA module entirely (since RSA relies on big-number arithmetic) or produce a broken interface.

3xploiton3 commented on 2024-04-20 12:16 (UTC)

==> ERROR: Could not resolve all dependencies.
 -> error making: ocaml-ppx_let-exit status 8
 -> Failed to install the following packages. Manual intervention is required:
ocaml-ppx_here - exit status 4
gapi-ocaml - exit status 8
ocaml-curl - exit status 8
ocaml-ounit - exit status 8
ocaml-lwt - exit status 8
ocaml-ppx_let - exit status 8

cedricroijakkers commented on 2023-03-30 08:55 (UTC) (edited on 2023-03-30 08:55 (UTC) by cedricroijakkers)

Please fix the dependency, remove: 'ocaml-yojson<2.0.0' and replace it with: 'ocaml-yojson'.

Version 0.4.3 supports yojson 2.0.0 and up, see this closed issue: https://github.com/astrada/gapi-ocaml/issues/43

Also, about ocaml-cryptokit, see my last comment on https://aur.archlinux.org/packages/ocaml-cryptokit. This can also be fixed, but you need to modify the PKGBUILD yourself, since the maintainer is not responding.

<deleted-account> commented on 2023-03-24 21:42 (UTC)

I do : Or if you're brave, pacman -Rsc gapi-ocaml && pacman -Sc and start from scratch.

It don't result.


 -> Error:
    ocaml-yojson<2.0.0 (Need: gapi-ocaml)

Can we do it? I think no.


'ocaml-yojson>=1.6.0'
'ocaml-yojson<2.0.0'

and aur has only ocaml-cryptokit < 1.3

Sorry. I don't know how do it right.

cedricroijakkers commented on 2023-03-15 07:58 (UTC)

If you are experiencing problems with upgrading because of ocaml-yojson which is already version 2.x in the AUR, and this package still requires a version < 2.0, you can upgrade to 0.4.3 which fixes this problem. The following PKGBUILD works just fine:

# Maintainer: Christopher Price <pricechrispy at gmail dot com>
# Contributor: nerflad (nerflad@gmail.com)
pkgname=gapi-ocaml
pkgver=0.4.3
pkgrel=1
pkgdesc='A simple OCaml client for Google Services.'
arch=('x86_64')
url='https://astrada.github.io/gapi-ocaml/'
license=('MIT')
depends=(
'ocaml>=4.02.3'
'ocaml-findlib>=1.2.7'
'ocamlnet>=4.1.4'
'ocaml-curl>=0.5.3'
'ocaml-cryptokit>=1.3.14'
'ocaml-yojson>=2.0.0'
)
makedepends=(
'dune'
'ocaml-ounit'
)
options=('!strip' 'staticlibs')
source=("$pkgname-$pkgver.tar.gz::https://github.com/astrada/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('d8d551fae40494e0042bf25335e04fee57df38f490a0e4e8f6ec189fbfdada0d')

build() {
    cd "${srcdir}/${pkgname}-${pkgver}"

    export OCAMLPATH="$(ocamlfind printconf destdir)"

    dune build -p "$pkgname"

    sed -i '/doc:\s\[/,$d' _build/default/gapi-ocaml.install
}

package() {
    cd "${srcdir}/${pkgname}-${pkgver}"

    dune install "$pkgname" --destdir="${pkgdir}" --prefix="/usr" --libdir="$(ocamlfind printconf destdir)"

    install -dm755 "${pkgdir}/usr/share/"

    #mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
}

bordam commented on 2022-09-27 15:44 (UTC)

Working PKGBUILD:

pkgname=gapi-ocaml
pkgver=0.4.2
pkgrel=2
pkgdesc="A simple OCaml client for Google Services."
arch=("x86_64" "i686" "armv7h")
url="https://astrada.github.io/gapi-ocaml/"
license=('MIT')
makedepends=('dune' 'ocaml-ounit>=1.1.0')
depends=(
'ocaml>=4.02.3'
'ocaml-findlib>=1.2.7'
'ocamlnet>=4.1.4'
'ocaml-curl>=0.5.3'
'ocaml-cryptokit>=1.3.14'
'ocaml-yojson>=1.6.0'
'ocaml-xmlm>=1.0.2'
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/astrada/$pkgname/archive/v$pkgver.tar.gz")
options=('!strip' 'staticlibs')
sha256sums=('9c4c6dfa43443675d2ac0a14ec6ff5a105e274dc8bb4cdef657fb5f6e0af5b2a')

build() {
  cd $pkgname-$pkgver
  dune build @install
  sed -i '/doc:\s\[/,$d' _build/default/gapi-ocaml.install
}

package() {
  cd $pkgname-$pkgver
  DESTDIR="${pkgdir}" dune install --prefix "/usr"
  install -dm755 "${pkgdir}/usr/share/"
}

hectorconte commented on 2022-07-23 18:37 (UTC) (edited on 2022-07-23 18:38 (UTC) by hectorconte)

@Glitchyme I changed the ocaml lib ownership but I also had to modify the PKGBUILD package() cause 'dune' kept asking for dir definitions, so I changed it from this:


package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  export OCAMLFIND_DESTDIR="$pkgdir/$(ocamlfind printconf destdir)"
  install -dm755 "$OCAMLFIND_DESTDIR"

  dune install 
}
To this:


package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  export OCAMLFIND_DESTDIR="$pkgdir/$(ocamlfind printconf destdir)"
  install -dm755 "$OCAMLFIND_DESTDIR"

  dune install --mandir /usr/share/man --docdir=/usr/share/doc --etcdir=/etc --datadir=/usr/data --sbindir=/usr/sbin --bindir=/usr/bin
}

Since I use 'yay' to manage aur packages, it was tricky to modify the PKGBUILD (if anyone knows how I would be grateful), but after all, that worked.

Glitchyme commented on 2022-05-21 21:27 (UTC) (edited on 2022-05-21 21:31 (UTC) by Glitchyme)

@webdawg does installing through opam work in the meantime? opam install gapi-ocaml

If not you can get around it the same way I did (though probably not recommended):

sudo chown -R user:user /usr/lib/ocaml # temporarily own for your user
yay -S gapi-ocaml
sudo chown -R root:root /usr/lib/ocaml # set back to root