Error: undeclared identifier: 'expr'
majj opened this issue · comments
MA Jianjun commented
for Nim 0.18.1:
.nimble\pkgs\libsodium-0.3.0\libsodium\sodium.nim(31, 31) Error: undeclared identifier: 'expr'
Federico Ceratto commented
@majj there's no 0.18.1 release. Do you mean devel?
MA Jianjun commented
yes,clone Nim 0.18.1 from github.
make it works by change expr to untyped
template cpt(target: string): untyped = cast[ptr cuchar](cstring(target))
Juan Carlos commented
This still happens with Stable now.
Error:
... ../../../home/juan/.nimble/pkgs/libsodium-0.3.0/libsodium/sodium.nim(31, 31) Error: undeclared identifier: 'expr'
Full error:
$ nimble install httpauth
Downloading https://github.com/FedericoCeratto/nim-httpauth using git
Verifying dependencies for httpauth@0.1.0
Installing libsodium@any version
Downloading https://github.com/FedericoCeratto/nim-libsodium using git
Verifying dependencies for libsodium@0.3.0
Installing libsodium@0.3.0
Success: libsodium installed successfully.
Installing httpauth@0.1.0
Building httpauth/httpauth using c backend
Prompt: Build failed for 'httpauth@0.1.0', would you like to try installing 'httpauth@#head' (latest unstable)? [y/N]
Answer: y
Downloading https://github.com/FedericoCeratto/nim-httpauth using git
Verifying dependencies for httpauth@#head
Info: Dependency on libsodium@any version already satisfied
Verifying dependencies for libsodium@0.3.0
Installing httpauth@#head
Building httpauth/httpauth using c backend
Tip: 20 messages have been suppressed, use --verbose to show them.
Error: Build failed for package: httpauth
... Details:
... Execution failed with exit code 1
... Command: "/home/juan/.nimble/bin/nim" c --noBabelPath -d:release --path:"/home/juan/.nimble/pkgs/libsodium-0.3.0" -o:"/tmp/nimble_23101/githubcom_FedericoCerattonimhttpauth_#head/httpauth" "/tmp/nimble_23101/githubcom_FedericoCerattonimhttpauth_#head/httpauth.nim"
... Output: Hint: used config file '/home/juan/.choosenim/toolchains/nim-#devel/config/nim.cfg' [Conf]
... Hint: system [Processing]
... Hint: httpauth [Processing]
... Hint: asyncdispatch [Processing]
... Hint: os [Processing]
... Hint: strutils [Processing]
... Hint: parseutils [Processing]
... Hint: math [Processing]
... Hint: bitops [Processing]
... Hint: algorithm [Processing]
... Hint: unicode [Processing]
... Hint: times [Processing]
... Hint: options [Processing]
... Hint: typetraits [Processing]
... Hint: strformat [Processing]
... Hint: macros [Processing]
... Hint: posix [Processing]
... Hint: ospaths [Processing]
... Hint: tables [Processing]
... Hint: hashes [Processing]
... Hint: heapqueue [Processing]
... Hint: lists [Processing]
... Hint: asyncstreams [Processing]
... Hint: asyncfutures [Processing]
... Hint: deques [Processing]
... Hint: cstrutils [Processing]
... Hint: nativesockets [Processing]
... Hint: net [Processing]
... Hint: sets [Processing]
... Hint: selectors [Processing]
... Hint: epoll [Processing]
... Hint: cookies [Processing]
... Hint: strtabs [Processing]
... Hint: logging [Processing]
... Hint: httpcore [Processing]
... Hint: json [Processing]
... Hint: lexbase [Processing]
... Hint: streams [Processing]
... Hint: parsejson [Processing]
... Hint: subexes [Processing]
... httpauth.nim(22, 17) Warning: using '.' instead of '/' in import paths is deprecated [Deprecated]
... Hint: sodium [Processing]
... Hint: sodium_sizes [Processing]
... ../../../home/juan/.nimble/pkgs/libsodium-0.3.0/libsodium/sodium.nim(31, 31) Error: undeclared identifier: 'expr'