jschlatow / taskopen

Tool for taking notes and open urls with taskwarrior
GNU General Public License v2.0
362 stars 31 forks source link

Installation error #152

Closed folofjc closed 2 years ago

folofjc commented 2 years ago

I am trying to install on Ubuntu 20.04.

$ make PREFIX=/usr                                                                                                                                                                                     nim c -d:versionGit -d:release -d:pathext:/usr/share/taskopen/scripts -d:editor:vi -d:open:run-mailcap --outdir:./ src/taskopen.nim
Hint: used config file '/etc/nim/nim.cfg' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: taskopen [Processing]
Hint: parseopt [Processing]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: macros [Processing]
Hint: algorithm [Processing]
Hint: unicode [Processing]
Hint: pathnorm [Processing]
Hint: osseps [Processing]
Hint: posix [Processing]
Hint: times [Processing]
Hint: options [Processing]
Hint: typetraits [Processing]
Hint: distros [Processing]
Hint: osproc [Processing]
Hint: strtabs [Processing]
Hint: hashes [Processing]
Hint: streams [Processing]
Hint: cpuinfo [Processing]
Hint: linux [Processing]
Hint: tables [Processing]
Hint: output [Processing]
Hint: terminal [Processing]
Hint: strformat [Processing]
Hint: colors [Processing]
Hint: termios [Processing]
Hint: json [Processing]
Hint: lexbase [Processing]
Hint: parsejson [Processing]
Hint: re [Processing]
Hint: pcre [Processing]
Hint: rtarrays [Processing]
Hint: types [Processing]
Hint: exec [Processing]
DIRPATH/taskopen/src/exec.nim(12, 19) Error: type mismatch: got <string, env: StringTableRef>
but expected one of: 
proc execCmdEx(command: string;
              options: set[ProcessOption] = {poStdErrToStdOut, poUsePath}): tuple[
    output: TaintedString, exitCode: int]
  first type mismatch at position: 2
  unknown named parameter: env

expression: execCmdEx(cmd, env = env)
make: *** [Makefile:28: taskopen] Error 1

My shell is bash.

jschlatow commented 2 years ago

@folofjc Could you please tell me your nim version (nim -v)?

folofjc commented 2 years ago
Nim Compiler Version 1.0.6 [Linux: amd64]
Compiled at 2020-02-27
Copyright (c) 2006-2019 by Andreas Rumpf

active boot switches: -d:release

I installed from sudo apt install nim, so this is probably the newest on Ubuntu 20.04

jschlatow commented 2 years ago

Unfortunately, your version does not support passing environment variables to execCmdEx. This feature has been introduced with nim version 1.4.

There are pre-built binaries available that you may try. Alternatively, you may try choosenim or using a docker container. See https://nim-lang.org/install_unix.html

folofjc commented 2 years ago

Okay, thanks. Could you update the README to specify this? Right now all it says is that nim is required, not that a certain version is required.

folofjc commented 2 years ago

Okay, I got past that error. When I try to do sudo make PREFIX=/usr install, I get an error that I need pandoc. Could you also add that to the dependencies in the README?

jschlatow commented 2 years ago

Okay, I got past that error. When I try to do sudo make PREFIX=/usr install, I get an error that I need pandoc. Could you also add that to the dependencies in the README?

pandoc is only required for updating the man pages. Normally, this is done by me but it can happen that timestamps change so that make tries to rebuilt the man pages. I am going to remove the pandoc dependency from the install target. In the meantime, you can remove the $(MANFILES) target from Makefile instead of installing pandoc.

folofjc commented 2 years ago

Got it, thanks!