Invalid SDK config file when running daml build

What could be causing the below error when running daml build on linux.
$ daml build --debug

Invalid SDK config file:YAML exception:
Yaml file not found: PROJECT_DIR/daml/sdk/sdk-2.3.2/sdk-config.yaml

The daml sdk is under:
/daml/bin (which is on the path and has a daml symlink to the below)


sdk-config.yaml - exists in the above directory but its trying to look for it in the project folder instead,

How did you install the SDK? It sounds like you tweaked some paths if it is installed in /daml.

Downloaded tar.gz to /daml/sdk, extracted it, ran it printed to add /daml/bin to path which I did. daml version prints fine. daml build gets the error. daml build is being run from the project directory.

Can you share the output of daml exec env? (filtering to variables starting with DAML_ is fine if you don’t wan to share everything)


Any specific reason why you’re running this as root and installed daml to /daml? (instead of the default ~/.daml)

This is the setting up of a daml build image. The location is arbitrary and can be changed.

If you’re talking Docker images, I’d recommend going for something along the lines of this:

FROM ubuntu:kinetic
RUN apt-get update \
 && apt-get install -y curl openjdk-11-jre-headless \
 && rm -rf /var/lib/apt/lists/*
# This is needed to get the DNS requests
# from Haskell binaries to succeed.
# Otherwise they fail to even resolve localhost.
RUN echo 'hosts: files dns' > /etc/nsswitch.conf
RUN addgroup --system daml && adduser --system --ingroup daml daml
USER daml
RUN curl | sh -s $VERSION \
    && printf "auto-install: false\nupdate-check: never\n" >> /home/daml/.daml/daml-config.yaml

ENV PATH="/home/daml/.daml/bin:${PATH}"
WORKDIR /home/daml

I there a version or guidance for if you can’t access the web i.e. from the tar.gz bundle

As a non-root user, this seems to work for me:

TEMP=$(mktemp -d)
cd $TEMP
tar xzf daml-sdk-2.4.0-linux.tar.gz
export PATH=$HOME/.daml/bin:$PATH
cd $(mktemp -d)
rm -rf $TEMP
daml new t
cd t
daml build
1 Like