Error when performing daml build

Hi Team,

I am doing daml build on the da-marketplace (GitHub - digital-asset/da-marketplace). Daml sdk 1.17.1 is used.

The build is successful in my Mac, but fails when it is done on Ubuntu 20.04. The error message is like this.

ghc-pkg: "the input" (line 1, column 1):
unexpected character in input '\NUL'
expecting field or section name

damlc: callProcess: /home/ubuntu/.daml/sdk/1.17.1/damlc/lib/resources/ghc-pkg "recache" "--global-package-db=.daml/package-database/1.14/package.conf.d" "--expand-pkgroot" (exit 1): failed

Kindly advise how to get rid of this.

Many thanks in advance.

kc

Hi KC

Are you getting this on a clean project? I suspect the issue may come from generating some files before, perhaps on your Mac. Saw similar errors when tried to build files having UTF-16 encoding by accident instead of the UTF-8 that was expected

Hi Mate,

Very likely. We clone the da-marketplace and add some new templates for testing. We code this in Mac and it works well in Mac, but fails in using this in Ubuntu (with daml build). Any suggestion that we can get it through? Thanks again.

kc

Hi @kctam, I tried cloning the marketplace repo and ran daml build on Ubuntu 20.04 without any issues.

I’ve never seen this issue before so maybe it is a corrupt SDK installation. Try daml install 1.17.1 --force.

Hi @cocreature Thanks for this. I also did the same and found no problems. Now I narrow this down to the Mac we are using vs. Ubuntu, as Mate has suggested whether it is on the UTF encoding problem.

Will let the team know once we identify it’s the UTF encoding problem.

kc