SciNim / getting-started

Getting started with Nim for Scientific Computing
https://scinim.github.io/getting-started/
Creative Commons Zero v1.0 Universal
60 stars 6 forks source link

Errors at building a book #54

Open olegmikul opened 11 months ago

olegmikul commented 11 months ago

Have several errors in my arch linux environment, including: 1) could not import cblas_* , while modules exist in libcblas.so 2) /home/username/getting-started/book/numerical_methods/interpolation.nim(108, 38) Error: undeclared identifier: 'Edge' 3) /home/username/.choosenim/toolchains/nim-1.6.14/lib/pure/strutils.nim(1073, 5) Error: unhandled exception: invalid integer: 0-DEV [ValueError]

Output file is attached.

Please help,

Thanks

book_out.txt

HugoGranstrom commented 11 months ago
  1. This looks similar to this issue? Can you try running the specific files using -d:blas=cblas?
  2. You need the newest version of numericalnim for it to work. We should fix the version in the nimble file.
  3. This looks like an error with the Julia pages. Have you set up Julia correctly? (see nimjl
olegmikul commented 11 months ago

Thanks. It helps.

  1. After removing cblas and using -d:blas=cblas these errors are gone
  2. After installing the newest version of numericalnim that error is gone
  3. Still have Julia integration errors. I switched from development Julia version 1.11.dev to stable 1.9 with my package manager. Now I have different errors: "copy relocation against non-copyable protected symbol `jl_main_module' in /usr/lib/libjulia.so"
HugoGranstrom commented 11 months ago

Good that those were solved. For Julia, @Clonkk is the one with the most experience.

Clonkk commented 11 months ago

Thanks. It helps.

  1. After removing cblas and using -d:blas=cblas these errors are gone
  2. After installing the newest version of numericalnim that error is gone
  3. Still have Julia integration errors. I switched from development Julia version 1.11.dev to stable 1.9 with my package manager. Now I have different errors: "copy relocation against non-copyable protected symbol `jl_main_module' in /usr/lib/libjulia.so"

I haven't tested Julia devel yet I am still on 1.9.x if they changed the way they build theur binaries it is possible they introduce regression in the C API (it has happened before).

Have you tried building julia from source by curiosity ?

olegmikul commented 11 months ago

I've compiled julia-dev from source, while installed julia 1.9 by my package manager. I've found similar C-API problems mentioned on the web. What can you suggest? Like 2 ways: 1) Switch to Julia 1.7.x (but loose some performance) 2) Compile 1.9.x from source (but without proof of success) ?

Clonkk commented 11 months ago

1.9.2 do not work ? That is strange. Julia 1.9.2 works on Ubuntu with Nimjl, as well as 1.8.X

Could it be a settings on arch causing this ? i haven't used arch since 2016

olegmikul commented 11 months ago

Yes if you comment the nimjl example, you won't have any issues

HugoGranstrom commented 11 months ago

Can I generate a book and everything without interface to julia?

That's basically what you are currently doing. It will generate all pages of the book that don't error. They will still be in the sidebar but if you don't plan on reading them it doesn't matter.

olegmikul commented 11 months ago

Ok, after commenting nimjl I have all docs generated properly. Thanks!

HugoGranstrom commented 11 months ago

Nice! Out of curiosity, why do you want to generate the book? Local documentation? Or are you planning on contributing a tutorial? 😉

olegmikul commented 11 months ago

Just nice local documentation, kind of perfectionism ;)

HugoGranstrom commented 11 months ago

Ok nice 😁