1

I'm following the steps here. So I used the following code to install dependencies,

  conda create -n polymer -c conda-forge mamba
  conda activate polymer
  mamba env update -f environment.yml

But in the next step, I couldn't download auxiliary data by,

make auxdata_all

Edit:

As suggested by @Musabbir Arrafi, I first installed make package and cd into the folder which ther is makefile in it. Then after uaing make auxdata_all command I get this error:

The syntax of the command is incorrect.
make: ***[makefile:68: directories] Error 1

I searches a lot for this exact error but with no result. Can you help me to fix this error?

Vitalizzare
  • 4,496
  • 7
  • 13
  • 32
Etemon
  • 53
  • 2
  • 11
  • Probably a duplicate of [How to install and use "make" in Windows?](https://stackoverflow.com/questions/32127524/how-to-install-and-use-make-in-windows) – Vitalizzare Sep 02 '23 at 18:20

2 Answers2

1

The correct steps are these:

  • First install make from your anaconda prompt, if you don't have it installed already
conda install -c anaconda make
  • Then install your dependencies
conda create -n polymer -c conda-forge mamba
conda activate polymer
mamba env update -f environment.yml
  • then make
make auxdata_all

You don't need to put $ before the command, the $ is a special character in shell script, you don't have to put that yourself.

Musabbir Arrafi
  • 744
  • 4
  • 18
  • Thanks! But this gives me ```'make' is not recognized as an internal or external command, operable program or batch file.``` – Etemon Aug 24 '23 at 18:05
  • you need to install make in your conda prompt, follow this: https://anaconda.org/anaconda/make – Musabbir Arrafi Aug 24 '23 at 18:07
  • I've added how you can install make in the answer. Let me know if you face anymore problems! – Musabbir Arrafi Aug 24 '23 at 18:29
  • Actually I faced a problem in installing make but managed to fix. But after running ```make auxdata_all``` It says ```make: *** No rule to make target 'auxdata_all'. Stop.``` – Etemon Aug 24 '23 at 18:34
  • Check if you're in the correct directory to where you installed your dependencies – Musabbir Arrafi Aug 24 '23 at 18:39
  • Sorry still couldn't fix. – Etemon Aug 24 '23 at 19:17
  • Hello, I tried installing the package on other PC I could manage to download make. Then I cd to Polymer file directory and wrote "make auxdata_all" but it gives this error: The syntax of the command is incprrect. make: **[makefile: 66: directories] Error1 – Etemon Aug 29 '23 at 09:27
  • It seems to be an error with the makefile now – Musabbir Arrafi Aug 29 '23 at 10:11
  • @MusabbirArrafi No, the `makefile` is okey, The problem is in the default command interpreter which is `cmd.exe` in case of MS Windows. – Vitalizzare Sep 02 '23 at 17:54
1

The makefile of the project you're interested in is written for POSIX-compliant shell. But the error you're experiencing indicates that you're on Windows, right? If so, then here's what happened.

When you execute conda install -c anaconda make, the GNU Make is installed, which in turn uses COMSPEC by default when choosing a shell in MS-Windows to run commands. Usually COMSPEC is equal to something like C:WINDOWS\system32\cmd.exe.

Now, when cmd.exe is trying to execute mkdir -p auxdata/common/ (the first action of the directories target in the makefile), you encounter the error "The syntax of the command is incorrect". This error occurs because cmd.exe requires the path with the backslash as a separator, sort of auxdata\common\ instead of auxdata/common/ (also keep in mind, that cmd.exe doesn't know any parameters in mkdir and is gonna treat -p as a name of a directory to create, which in itself is a silent problem).

To run make smoothly, you may need to install Windows Subsystem for Linux. For further guidance, check the answers to How to install and use "make" in Windows?

Vitalizzare
  • 4,496
  • 7
  • 13
  • 32