Skip to content
Discussions/App Development/Cant build da-marketplace on Windows : modules not found, probably issue with soft linksForum ↗

Cant build da-marketplace on Windows : modules not found, probably issue with soft links

App Development7 posts468 views2 likesLast activity Jan 2022
SI
Simon_AlexeOP
Jan 2022

Dear daml forum,

I am trying to build da-marketplace but I face a lot of “module not found” errors:

Compiling da-marketplace to a DAR.
File:     daml/Common.daml
Hidden:   no
Range:    4:8-4:24
Source:   not found
Severity: DsError
Message:
  Could not find module `DA.Finance.Asset'
  It is not a module in the current program, or in any known package.
File:     daml/Common.daml
Hidden:   no
Range:    5:8-5:24
Source:   not found
Severity: DsError
Message:
  Could not find module `DA.Finance.Types'
  It is not a module in the current program, or in any known package.
File:     daml/Common.daml
Hidden:   no
Range:    8:8-8:30
Source:   not found
Severity: DsError
Message:
  Could not find module `ContingentClaims.Claim'
  It is not a module in the current program, or in any known package.

(...)

Using git submodule update --init --recursive did not help.

I think it is linked to the way the dependencies are set, not in the daml.yaml but using soft link inside /daml, example /daml/ContingentClaims :

../contingent-claims/daml/ContingentClaims

Any idea how to solve this?

Thank you

LU
Luciano
Jan 2022

Hi Simon, I believe you’re right and we’ve run into this problem previously and has something to do with the way symlinks are handled in Windows.

The first thing you need to check when installing git is that it has the permissions to create these (I recall you are prompted for this during the official git installation). @georg will know more - he’s had this problem before.

SI
Simon_Alexe
Jan 2022
Simon_Alexe:

git submodule update --init --recursive

To better explain my situation, this git line successfully created the submodules yet daml is still failing with the “modules not found” error, so I don’t think this is an issue with git.

LU
Luciano
Jan 2022

No, it’s as you say, because the softlinks are missing.

But these are typically generated by git when you check-out the source-code.

From memory there are a bunch of symlinks like daml/Daml/{Control, Data}, daml/ContingentClaims, daml/DA/Finance if I remember correctly, that point to directories inside the submodules in the root directory. It seems Git hasn’t created these during the checkout.

GE
georg
Jan 2022

I’ve had the same issue. What resolved it for me:

  • Make sure to have Git for Windows use Windows symlinks (it’s a flag to be selected when installing it)
  • Clone the repo and run git submodule update --init --recursive as administrator
  • Delete the symlinks and restore them again using eg. git co . (also as administrator)

Not sure why that last step is needed but somehow git doesn’t create the symlinks correctly on the first go. Administrator rights are needed to create symlinks iirc. You should be able to verify the symlinks have been created correctly by looking at them in Windows Explorer. They should be displayed as links you can follow into the respective directories.

SI
Simon_Alexe
Jan 2022

This worked for me. Thank you very much for the quick response and exhaustive explanation.

For step 3.a “Delete the symlinks”, as they were only a few of them I did it manually, but any idea on how to do that as a command or more efficient way? Trying a windows search for “*.symlinks” did not work.

GE
georg
Jan 2022

There’s probably some command line magic you could do to automate, but I don’t know from the top of my head how. But since this is only a one-time action per repo it should be acceptable to do manually.

← Back to Discussions