getting-started icon indicating copy to clipboard operation
getting-started copied to clipboard

Errors at building a book

Open olegmikul opened this issue 2 years ago • 12 comments

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

olegmikul avatar Jul 20 '23 00:07 olegmikul

  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

HugoGranstrom avatar Jul 20 '23 07:07 HugoGranstrom

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"

olegmikul avatar Jul 20 '23 17:07 olegmikul

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

HugoGranstrom avatar Jul 20 '23 17:07 HugoGranstrom

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 ?

Clonkk avatar Jul 20 '23 17:07 Clonkk

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) ?

olegmikul avatar Jul 20 '23 18:07 olegmikul

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

Clonkk avatar Jul 20 '23 19:07 Clonkk

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

olegmikul avatar Jul 20 '23 20:07 olegmikul

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.

HugoGranstrom avatar Jul 20 '23 20:07 HugoGranstrom

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

olegmikul avatar Jul 20 '23 20:07 olegmikul

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

HugoGranstrom avatar Jul 20 '23 20:07 HugoGranstrom

Just nice local documentation, kind of perfectionism ;)

olegmikul avatar Jul 20 '23 21:07 olegmikul

Ok nice 😁

HugoGranstrom avatar Jul 21 '23 06:07 HugoGranstrom