Closed cpunion closed 7 years ago
I have a similar issue in Ubuntu 15.04 with GCC 4.9.2/nim 0.11.2. I can confirm that the posted workaround works for me.
$ nim c -r src/nimble install
config/nim.cfg(53, 3) Hint: added path: '/home/chris/.babel/pkgs/' [Path]
config/nim.cfg(54, 3) Hint: added path: '/home/chris/.nimble/pkgs/' [Path]
Hint: used config file '/home/chris/bin/Nim/config/nim.cfg' [Conf]
Warning: src/nimble.nimrod.cfg is deprecated [Deprecated]
Hint: used config file 'src/nimble.nimrod.cfg' [Conf]
Hint: system [Processing]
Hint: nimble [Processing]
Hint: httpclient [Processing]
Hint: net [Processing]
Hint: rawsockets [Processi1ng]
Hint: unsigned [Processing]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: times [Processing]
Hint: posix [Processing]
Hint: openssl [Processing]
lib/wrappers/openssl.nim(560, 46) Hint: 'IOError' is declared but not used [XDeclaredButNotUsed]
Hint: uri [Processing]
Hint: strtabs [Processing]
Hint: hashes [Processing]
Hint: base64 [Processing]
Hint: mimetypes [Processing]
Hint: math [Processing]
Hint: asyncnet [Processing]
Hint: asyncdispatch [Processing]
Hint: oids [Processing]
Hint: endians [Processing]
Hint: tables [Processing]
Hint: macros [Processing]
Hint: selectors [Processing]
Hint: epoll [Processing]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvLine as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing sendPendingSslData as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing appeaseSsl as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing connect as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recv as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing send as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvLineInto as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvLine as an async proc. [User]
lib/pure/asyncnet.nim(405, 12) Hint: 'addNLIfEmpty' is declared but not used [XDeclaredButNotUsed]
lib/pure/httpclient.nim(338, 10) Hint: 'dir' is declared but not used [XDeclaredButNotUsed]
lib/pure/httpclient.nim(619, 39) Hint: conversion from SslContext to itself is pointless [ConvFromXtoItselfNotNeeded]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvFull as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing parseChunks as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing parseBody as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing parseResponse as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing newConnection as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing request as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing get as an async proc. [User]
Hint: parseopt [Processing]
lib/pure/parseopt.nim(59, 35) Warning: quoteIfContainsWhite is deprecated [Deprecated]
Hint: osproc [Processing]
Hint: streams [Processing]
Hint: cpuinfo [Processing]
Hint: linux [Processing]
lib/pure/osproc.nim(779, 7) Warning: raiseOSError is deprecated [Deprecated]
lib/pure/osproc.nim(701, 10) Hint: 'osproc.startProcessAuxSpawn(data: TStartProcessData)' is declared but not used [XDeclaredButNotUsed]
Hint: pegs [Processing]
Hint: unicode [Processing]
Hint: json [Processing]
Hint: lexbase [Processing]
Hint: algorithm [Processing]
Hint: sets [Processing]
Hint: sequtils [Processing]
Hint: packageinfo [Processing]
Hint: parsecfg [Processing]
Hint: version [Processing]
Hint: tools [Processing]
Hint: nimbletypes [Processing]
Hint: download [Processing]
nimble/src/nimblepkg/download.nim(31, 6) Hint: 'download.doPull(meth: DownloadMethod, downloadDir: string)' is declared but not used [XDeclaredButNotUsed]
nimble/src/nimblepkg/download.nim(12, 6) Hint: 'download.getSpecificDir(meth: DownloadMethod)' is declared but not used [XDeclaredButNotUsed]
Hint: config [Processing]
Hint: publish [Processing]
Hint: rdstdin [Processing]
Hint: readline [Processing]
Hint: rltypedefs [Processing]
Hint: history [Processing]
Hint: termios [Processing]
Hint: browsers [Processing]
nimble/src/nimble.nim(254, 5) Warning: renameBabelToNimble is deprecated [Deprecated]
nimble/src/nimble.nim(730, 7) Hint: 'realDir' is declared but not used [XDeclaredButNotUsed]
CC: nimble_nimble
CC: stdlib_system
CC: stdlib_httpclient
CC: stdlib_net
CC: stdlib_rawsockets
CC: stdlib_unsigned
CC: stdlib_os
CC: stdlib_strutils
CC: stdlib_parseutils
CC: stdlib_times
CC: stdlib_posix
CC: stdlib_openssl
CC: stdlib_uri
CC: stdlib_strtabs
CC: stdlib_hashes
CC: stdlib_base64
CC: stdlib_mimetypes
CC: stdlib_math
CC: stdlib_asyncnet
CC: stdlib_asyncdispatch
CC: stdlib_oids
CC: stdlib_endians
CC: stdlib_tables
CC: stdlib_macros
CC: stdlib_selectors
CC: stdlib_epoll
CC: stdlib_parseopt
CC: stdlib_osproc
CC: stdlib_streams
CC: stdlib_cpuinfo
CC: stdlib_linux
CC: stdlib_pegs
CC: stdlib_unicode
CC: stdlib_json
CC: stdlib_lexbase
CC: stdlib_algorithm
CC: stdlib_sets
CC: stdlib_sequtils
CC: nimble_packageinfo
CC: stdlib_parsecfg
CC: nimble_version
CC: nimble_tools
CC: nimble_nimbletypes
CC: nimble_download
CC: nimble_config
CC: nimble_publish
CC: stdlib_rdstdin
CC: stdlib_readline
CC: stdlib_rltypedefs
CC: stdlib_history
CC: stdlib_termios
CC: stdlib_browsers
[Linking]
Hint: operation successful (41741 lines compiled; 4.092 sec total; 92.947MB; Debug Build) [SuccessX]
./src/nimble install
Installing nimble-0.6.2
Building nimble/nimble using c backend...
Hint: used config file '/home/chris/bin/Nim/config/nim.cfg' [Conf]
Warning: /home/chris/bin/Nim/nimble/src/nimble.nimrod.cfg is deprecated [Deprecated]
Hint: used config file '/home/chris/bin/Nim/nimble/src/nimble.nimrod.cfg' [Conf]
Hint: system [Processing]
Hint: nimble [Processing]
Hint: httpclient [Processing]
Hint: net [Processing]
Hint: rawsockets [Processing]
Hint: unsigned [Processing]
Hint: os [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: times [Processing]
Hint: posix [Processing]
Hint: openssl [Processing]
lib/wrappers/openssl.nim(560, 46) Hint: 'IOError' is declared but not used [XDeclaredButNotUsed]
Hint: uri [Processing]
Hint: strtabs [Processing]
Hint: hashes [Processing]
Hint: base64 [Processing]
Hint: mimetypes [Processing]
Hint: math [Processing]
Hint: asyncnet [Processing]
Hint: asyncdispatch [Processing]
Hint: oids [Processing]
Hint: endians [Processing]
Hint: tables [Processing]
Hint: macros [Processing]
Hint: selectors [Processing]
Hint: epoll [Processing]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvLine as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing sendPendingSslData as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing appeaseSsl as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing connect as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recv as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing send as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvLineInto as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvLine as an async proc. [User]
lib/pure/asyncnet.nim(405, 12) Hint: 'addNLIfEmpty' is declared but not used [XDeclaredButNotUsed]
lib/pure/httpclient.nim(338, 10) Hint: 'dir' is declared but not used [XDeclaredButNotUsed]
lib/pure/httpclient.nim(619, 39) Hint: conversion from SslContext to itself is pointless [ConvFromXtoItselfNotNeeded]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing recvFull as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing parseChunks as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing parseBody as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing parseResponse as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing newConnection as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing request as an async proc. [User]
lib/pure/asyncdispatch.nim(1410, 7) Hint: Processing get as an async proc. [User]
Hint: parseopt [Processing]
lib/pure/parseopt.nim(59, 35) Warning: quoteIfContainsWhite is deprecated [Deprecated]
Hint: osproc [Processing]
Hint: streams [Processing]
Hint: cpuinfo [Processing]
Hint: linux [Processing]
lib/pure/osproc.nim(779, 7) Warning: raiseOSError is deprecated [Deprecated]
lib/pure/osproc.nim(701, 10) Hint: 'osproc.startProcessAuxSpawn(data: TStartProcessData)' is declared but not used [XDeclaredButNotUsed]
Hint: pegs [Processing]
Hint: unicode [Processing]
Hint: json [Processing]
Hint: lexbase [Processing]
Hint: algorithm [Processing]
Hint: sets [Processing]
Hint: sequtils [Processing]
Hint: packageinfo [Processing]
Hint: parsecfg [Processing]
Hint: version [Processing]
Hint: tools [Processing]
Hint: nimbletypes [Processing]
Hint: download [Processing]
nimble/src/nimblepkg/download.nim(31, 6) Hint: 'download.doPull(meth: DownloadMethod, downloadDir: string)' is declared but not used [XDeclaredButNotUsed]
nimble/src/nimblepkg/download.nim(12, 6) Hint: 'download.getSpecificDir(meth: DownloadMethod)' is declared but not used [XDeclaredButNotUsed]
Hint: config [Processing]
Hint: publish [Processing]
Hint: rdstdin [Processing]
Hint: readline [Processing]
Hint: rltypedefs [Processing]
Hint: history [Processing]
Hint: termios [Processing]
Hint: browsers [Processing]
nimble/src/nimble.nim(254, 5) Warning: renameBabelToNimble is deprecated [Deprecated]
nimble/src/nimble.nim(730, 7) Hint: 'realDir' is declared but not used [XDeclaredButNotUsed]
CC: nimble_nimble
CC: stdlib_system
CC: stdlib_httpclient
CC: stdlib_net
CC: stdlib_rawsockets
CC: stdlib_unsigned
CC: stdlib_os
CC: stdlib_strutils
CC: stdlib_parseutils
CC: stdlib_times
CC: stdlib_posix
CC: stdlib_openssl
CC: stdlib_uri
CC: stdlib_strtabs
CC: stdlib_hashes
CC: stdlib_base64
CC: stdlib_mimetypes
CC: stdlib_math
CC: stdlib_asyncnet
CC: stdlib_asyncdispatch
CC: stdlib_oids
CC: stdlib_endians
CC: stdlib_tables
CC: stdlib_macros
CC: stdlib_selectors
CC: stdlib_epoll
CC: stdlib_parseopt
CC: stdlib_osproc
CC: stdlib_streams
CC: stdlib_cpuinfo
CC: stdlib_linux
CC: stdlib_pegs
CC: stdlib_unicode
CC: stdlib_json
CC: stdlib_lexbase
CC: stdlib_algorithm
CC: stdlib_sets
CC: stdlib_sequtils
CC: nimble_packageinfo
CC: stdlib_parsecfg
CC: nimble_version
CC: nimble_tools
CC: nimble_nimbletypes
CC: nimble_download
CC: nimble_config
CC: nimble_publish
CC: stdlib_rdstdin
CC: stdlib_readline
CC: stdlib_rltypedefs
CC: stdlib_history
CC: stdlib_termios
CC: stdlib_browsers
[Linking]
/usr/bin/ld: cannot open output file /home/chris/bin/Nim/nimble/nimble: Is a directory
collect2: error: ld returned 1 exit status
Error: execution of an external program failed
Traceback (most recent call last)
nimble.nim(990) nimble
nimble.nim(959) doAction
nimble.nim(685) install
nimble.nim(550) installFromDir
nimble.nim(498) buildFromDir
Error: unhandled exception: Build failed for package: nimble [BuildFailed]
Error: execution of an external program failed
Same issue on Ubuntu 14.04. The suggested fix works.
Same issue for Ubuntu 15.10 x64, the fix did not work for me.
> lib/nim/impure/rdstdin.nim(103, 10) Error: cannot open 'readline'
...
blake@bwv-desktop:~/nimble
- $ nim --version
Nim Compiler Version 0.11.2 (2015-08-09) [Linux: amd64]
Copyright (c) 2006-2015 by Andreas Rumpf
Can you try with 0.12.0?
I have a very different error on Debian, but basically the problem is the same, can't compile:
[master] $ nim c -r src/nimble install
Warning: src/nimble.nimrod.cfg is deprecated [Deprecated]
Hint: system [Processing]
Error: cannot open '/servers/krag/hdd-home3/doering/lib/system.nim'
that's all output my version of nim is a self built source package from the nim website:
$nim --version
Nim Compiler Version 0.12.0 (2015-10-27) [Linux: amd64]
Copyright (c) 2006-2015 by Andreas Rumpf
git hash: b186493f0143fa8d977b4815e2ecda9f16a43b63
active boot switches: -d:release
@krux02 can you compile other Nim source code files?
@dom96 I haven't tried it, because I needed nimble to complie my source files. At the moment I am at another computer, I guess I can test it tomorrow again.
After re-reading the different messages it seems that everybody is having slightly different issues with the installation of Nim.
@cpunion's issue I cannot reproduce. Running nim c -r src/nimble install
works on my machine (Mac OS X).
@christetreault's (and @honewatson's too?) issue is odd. I would need to know more about what is inside /home/chris/bin/Nim/
I think.
@blakev's seems like a completely different issue too. Same with @krux02's.
I'm going to give you guys a chance to give me some more feedback. But if I do not reproduce this issue eventually I will have to close this issue.
~/bin/Nim
contains all the stuff that you get when you build Nim from source. If you think it'd be particularly helpful to pick through it, I can zip it up and put it online somewhere. I'd need some time to sort through it and make sure there's no PII in there or anything.
For me, the main takeaway from my post is that the workaround given by OP works for this issue as well.
@christetreault Hrm. That makes sense. I assume you then cloned nimble into the same directory right?
/usr/bin/ld: cannot open output file /home/chris/bin/Nim/nimble/nimble: Is a directory
The error seems to suggest that /home/chris/bin/Nim/nimble
has a nimble
directory. Is that the case? If so, what's in it and how was it created?
Here's what's in there:
~/bin/Nim/nimble/nimble/src/nimcache$ ls
nimble_config.c stdlib_history.o stdlib_rawsockets.c
nimble_config.o stdlib_httpclient.c stdlib_rawsockets.o
nimble_download.c stdlib_httpclient.o stdlib_rdstdin.c
nimble_download.o stdlib_json.c stdlib_rdstdin.o
nimble_nimble.c stdlib_json.o stdlib_readline.c
nimble_nimble.o stdlib_lexbase.c stdlib_readline.o
nimble_nimbletypes.c stdlib_lexbase.o stdlib_rltypedefs.c
nimble_nimbletypes.o stdlib_linux.c stdlib_rltypedefs.o
nimble_packageinfo.c stdlib_linux.o stdlib_selectors.c
nimble_packageinfo.o stdlib_macros.c stdlib_selectors.o
nimble_publish.c stdlib_macros.o stdlib_sequtils.c
nimble_publish.o stdlib_math.c stdlib_sequtils.o
nimble_tools.c stdlib_math.o stdlib_sets.c
nimble_tools.o stdlib_mimetypes.c stdlib_sets.o
nimble_version.c stdlib_mimetypes.o stdlib_streams.c
nimble_version.o stdlib_net.c stdlib_streams.o
stdlib_algorithm.c stdlib_net.o stdlib_strtabs.c
stdlib_algorithm.o stdlib_oids.c stdlib_strtabs.o
stdlib_asyncdispatch.c stdlib_oids.o stdlib_strutils.c
stdlib_asyncdispatch.o stdlib_openssl.c stdlib_strutils.o
stdlib_asyncnet.c stdlib_openssl.o stdlib_system.c
stdlib_asyncnet.o stdlib_os.c stdlib_system.o
stdlib_base64.c stdlib_os.o stdlib_tables.c
stdlib_base64.o stdlib_osproc.c stdlib_tables.o
stdlib_browsers.c stdlib_osproc.o stdlib_termios.c
stdlib_browsers.o stdlib_parsecfg.c stdlib_termios.o
stdlib_cpuinfo.c stdlib_parsecfg.o stdlib_times.c
stdlib_cpuinfo.o stdlib_parseopt.c stdlib_times.o
stdlib_endians.c stdlib_parseopt.o stdlib_unicode.c
stdlib_endians.o stdlib_parseutils.c stdlib_unicode.o
stdlib_epoll.c stdlib_parseutils.o stdlib_unsigned.c
stdlib_epoll.o stdlib_pegs.c stdlib_unsigned.o
stdlib_hashes.c stdlib_pegs.o stdlib_uri.c
stdlib_hashes.o stdlib_posix.c stdlib_uri.o
stdlib_history.c stdlib_posix.o
higher levels are empty
@christetreault please run tree
inside ~/bin/Nim
, then gist the output.
@christetreault Yeah, the problem is that you have a nimble
directory inside nimble
(https://gist.github.com/christetreault/76f5923602c85ecfaf7f#file-tree-bin-nim-L3669)
The newest errors:
.......... too many messages about deprecated identifiers
/Users/lijie/.nimble/pkgs/compiler-0.10.3/compiler/treetab.nim(97, 10) Warning: use Hash instead; THash is deprecated [Deprecated]
Hint: vmdef [Processing]
Hint: lookups [Processing]
Hint: prettybase [Processing]
/Users/lijie/.nimble/pkgs/compiler-0.10.3/compiler/nimfix/prettybase.nim(10, 8) Error: cannot open 'ast'
lijie@lijiedeMacBook-Pro:~/source/nim-lang/nimble|master
⇒ nim --version
Nim Compiler Version 0.11.3 (2015-09-14) [MacOSX: amd64]
Copyright (c) 2006-2015 by Andreas Rumpf
git hash: 4eeaf7a22bf5720a3f489992cd16de2d5d92bbcc
active boot switches: -d:release
Seems the old compiler can't compile newer code. At the first post of this threads, my Nim compiler's version is 0.11.2, and it's 0.11.3 now. I haven't used Nim for months. (sorry)
@cpunion What are you running to compile/install Nimble?
@dom96 I run nim c -r src/nimble install
in nimble source root directory.
@dom96 Full commands and ouputs was too long, I pasted at https://gist.github.com/cpunion/37f02cdcc1f27cae1e65
@cpunion Are you compiling latest Nimble? Did you remember to git pull
?
The issue is that you need Nim 0.12.1 to compile latest Nimble. But Nimble should tell you that! So i'm not sure what's happening (Unless you don't quite have the latest Nimble)
Edit: Oh. Right. You're compiling Nimble first with Nim, of course. That makes sense. Well, you need 0.12.1 Nim anyway.
@dom96 Sure.
⇒ git rev-parse HEAD
80a418e68063eeb32f311341573567bf545dc8d9
lijie@lijiedeMacBook-Pro:~/source/nim-lang/nimble|master
⇒ git pull
Already up-to-date.
lijie@lijiedeMacBook-Pro:~/source/nim-lang/nimble|master
⇒ git rev-parse HEAD
80a418e68063eeb32f311341573567bf545dc8d9
@dom96 Sounds reasonable, thanks for looking into it. My plate's pretty full, so I'm not really super concerned about resolving this right now. Just wanted to submit feedback somewhere.
I got a error on lib/system.nim
too:
...
CC: stdlib_linenoise
CC: stdlib_browsers
CC: clinenoise
Hint: [Link]
Hint: operation successful (92975 lines compiled; 14.300 sec total; 334.342MB; Debug Build) [SuccessX]
Traceback (most recent call last)
nimble.nim(962) nimble
nimble.nim(887) doAction
nimble.nim(869) execHook
packageparser.nim(230) readPackageInfo
Error: unhandled exception: Could not read package info file in /Users/chen/repo/gist/nimble/nimble.nimble;
Reading as ini file failed with:
Invalid section: .
Evaluating as NimScript file failed with:
Error: cannot open '/Users/chen/repo/gist/nimble/lib/system.nim'. [NimbleError]
Error: execution of an external program failed: '/Users/chen/repo/gist/nimble/src/nimble install'
And there's not even a lib/
directory here:
changelog.markdown nimble.nimble tests/
license.txt readme.markdown todo.markdown
nimble.bash-completion src/ vendor/
Update:
and it's funny I fixed the error by adding a soft link:
=>> ln -s vendor/nim/lib lib
@jiyinyiyong how did you install Nim?
On Saturday, 23 January 2016, 题叶 notifications@github.com wrote:
I got a error on lib/system.nim too:
... CC: stdlib_linenoise CC: stdlib_browsers CC: clinenoise Hint: [Link] Hint: operation successful (92975 lines compiled; 14.300 sec total; 334.342MB; Debug Build) [SuccessX] Traceback (most recent call last) nimble.nim(962) nimble nimble.nim(887) doAction nimble.nim(869) execHook packageparser.nim(230) readPackageInfo Error: unhandled exception: Could not read package info file in /Users/chen/repo/gist/nimble/nimble.nimble; Reading as ini file failed with: Invalid section: . Evaluating as NimScript file failed with: Error: cannot open '/Users/chen/repo/gist/nimble/lib/system.nim'. [NimbleError] Error: execution of an external program failed: '/Users/chen/repo/gist/nimble/src/nimble install'
And there's not even a lib/ directory here:
changelog.markdown nimble.nimble tests/ license.txt readme.markdown todo.markdown nimble.bash-completion src/ vendor/
— Reply to this email directly or view it on GitHub https://github.com/nim-lang/nimble/issues/145#issuecomment-174113172.
@jiyinyiyong looks like this is your issue: https://github.com/nim-lang/nimble/issues/203
I'm hoping that the recent improvements Nimble's installation and the fact that it's bundled with Nim have now resolved these issues. Let me know if you still cannot compile/install Nimble.
Seems cannot run
nim c -r src/nimble install
to install nimble self. I had fixed with those steps: