Giter Site home page Giter Site logo

Comments (3)

endragor avatar endragor commented on August 15, 2024

This may happen due to a mismatch between compiler package in your nimble repository versus the Nim version you used to compile the nakefile. Try to do the following:

  1. Run nimble install in Nim's folder.
  2. Run rm nakefile in the project's folder.
  3. Run nake build.

from godot-nim.

enthus1ast avatar enthus1ast commented on August 15, 2024

compiler for 0.18.1 was already satisfied so in addition i also did:
nimble install compiler@#head

This brought me one step further to this:

Generating audio_effect.nim...
Generating mesh_instance_2d.nim...
Generating editor_file_system.nim...
Generating audio_effect_stereo_enhance.nim...
Generating label.nim...
   Warning: Package 'stub' has an incorrect structure. The top level of the package source directory should contain at most one module, named 'stub.nim', but a file named 'fpscounter.nim' was found. This will be an error in the future.
      Hint: If this is the primary source file in the package, rename it to 'stub.nim'. If it's a source file required by the main module, or if it is one of several modules exposed by 'stub', then move it into a 'stub/' subdirectory. If it's a test file or otherwise not required to build the the package 'stub.nim', prevent its installation by adding `skipFiles = @["fpscounter.nim"]` to the .nimble file. See https://github.com/nim-lang/nimble#libraries for more info.
  Verifying dependencies for [email protected]
   Warning: No nimblemeta.json file found in /home/david/.nimble/pkgs/choosenim-0.2.2
   Warning: No .nimble or .nimble-link file found for /home/david/.nimble/pkgs/nimBrowserLoot-0.1.0
   Warning: No .nimble or .nimble-link file found for /home/david/.nimble/pkgs/protobuf-0.1.4
      Info: Dependency on godot@>= 0.7.11 already satisfied
  Verifying dependencies for [email protected]
      Info: Dependency on compiler@>= 0.17.3 already satisfied
  Verifying dependencies for compiler@#head
  Compiling ../src/stub.nim (from package stub) using c backend
Hint: used config file '/home/david/Nim/config/nim.cfg' [Conf]
Hint: used config file '/home/david/myproject/src/nim.cfg' [Conf]
Hint: used config file '/home/david/myproject/src/config.nims' [Conf]
Hint: system [Processing]
[...]
Hint: engine [Processing]
Hint: godottypes [Processing]
nim.nim(114)             nim
nim.nim(78)              handleCmdLine
main.nim(169)            mainCommand
main.nim(79)             commandCompileToC
modules.nim(141)         compileProject
modules.nim(78)          compileModule
passes.nim(238)          processModule
passes.nim(126)          processTopLevelStmt
sem.nim(583)             myProcess
sem.nim(551)             semStmtAndGenerateGenerics
semstmts.nim(1875)       semStmt
semexprs.nim(815)        semExprNoType
semexprs.nim(2464)       semExpr
importer.nim(189)        evalImport
importer.nim(166)        impMod
importer.nim(149)        myImportModule
modules.nim(102)         importModule
modules.nim(78)          compileModule
passes.nim(238)          processModule
passes.nim(126)          processTopLevelStmt
sem.nim(583)             myProcess
sem.nim(551)             semStmtAndGenerateGenerics
semstmts.nim(1875)       semStmt
semexprs.nim(815)        semExprNoType
semexprs.nim(2464)       semExpr
importer.nim(189)        evalImport
importer.nim(166)        impMod
importer.nim(149)        myImportModule
modules.nim(102)         importModule
modules.nim(78)          compileModule
passes.nim(238)          processModule
passes.nim(126)          processTopLevelStmt
sem.nim(583)             myProcess
sem.nim(551)             semStmtAndGenerateGenerics
semstmts.nim(1875)       semStmt
semexprs.nim(815)        semExprNoType
semexprs.nim(2464)       semExpr
importer.nim(189)        evalImport
importer.nim(166)        impMod
importer.nim(149)        myImportModule
modules.nim(102)         importModule
modules.nim(78)          compileModule
passes.nim(238)          processModule
passes.nim(126)          processTopLevelStmt
sem.nim(583)             myProcess
sem.nim(551)             semStmtAndGenerateGenerics
semstmts.nim(1875)       semStmt
semexprs.nim(815)        semExprNoType
semexprs.nim(2323)       semExpr
semexprs.nim(799)        semDirectOp
semexprs.nim(696)        afterCallActions
semexprs.nim(31)         semTemplateExpr
sem.nim(401)             semAfterMacroCall
semstmts.nim(1875)       semStmt
semexprs.nim(815)        semExprNoType
semexprs.nim(2431)       semExpr
semstmts.nim(1816)       semStmtList
semexprs.nim(2483)       semExpr
semstmts.nim(1772)       semStaticStmt
vm.nim(1722)             evalStaticStmt
vm.nim(1712)             evalConstExprAux
vm.nim(548)              rawExecute
system.nim(2843)         sysFatal
Error: unhandled exception: index out of bounds [IndexError]
       Tip: 13 messages have been suppressed, use --verbose to show them.
     Error: Execution failed with exit code 1
        ... Command: "/home/david/Nim/bin/nim" c --noNimblePath --path:"/home/david/.nimble/pkgs/godot-0.7.11" --path:"/home/david/.nimble/pkgs/compiler-#head" "-o:../_dlls/nim_linux_64.so"  "../src/stub.nim"

from godot-nim.

endragor avatar endragor commented on August 15, 2024

Where does the 6713e70d756c04dbd54d32feb78ae62eed6bda4e commit come from? It's not in the devel tree of Nim.

I've compiled godot-nim-stub successfully with latest devel commit - c12726d41e7df20bce452b6d7f8959d8b9e401a9.

Also, it's better not to use #head with nimble because of nim-lang/nimble#318. nimble install -y will reinstall the version even if it already exists, so you should use that after updating devel.

So I'd suggest to do this:

  1. Compile the latest Nim.
  2. Run nimble install -y in Nim's folder.
  3. Run nake clean in the project's folder.
  4. Run nake build.

Notice that even though the code compiles successfully, it doesn't run well due to a number of breaking changes and regressions introduced in latest Nim. I'll adapt godot-nim as soon as the bugs are fixed in Nim itself. For now I'd suggest to use a stable version.

from godot-nim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.