soegaard / sci

Racket libraries for scientific computing
18 stars 4 forks source link

sci install error on linux: cannot find libgfortran.so.3; unusable after install #16

Closed maueroats closed 10 months ago

maueroats commented 10 months ago

Using Racket 8.10 on a "Ubuntu 22.04.3 LTS" linux system with both libgfortran5 and libgfortran-11-dev installed.

It looks like processing manual-flomat.scrbl immediately preceeds the build error.

> raco pkg install sci                                                                                                                                                                        (base) 
Resolving "sci" via https://download.racket-lang.org/releases/8.10/catalog/
Resolving "sci" via https://pkgs.racket-lang.org
Using cached16992111111699211111096 for https://github.com/soegaard/sci.git
raco setup: version: 8.10
raco setup: platform: x86_64-linux [cs]
raco setup: target machine: ta6le
raco setup: installation name: 8.10
raco setup: variants: cs
raco setup: main collects: /usr/local/racket/collects/
raco setup: collects paths: 
raco setup:   /home/user/.local/share/racket/8.10/collects
raco setup:   /usr/local/racket/collects/
raco setup: main pkgs: /usr/local/racket/share/pkgs
raco setup: pkgs paths: 
raco setup:   /usr/local/racket/share/pkgs
raco setup:   /home/user/.local/share/racket/8.10/pkgs
raco setup: links files: 
raco setup:   /usr/local/racket/share/links.rktd
raco setup:   /home/user/.local/share/racket/8.10/links.rktd
raco setup: main docs: /usr/local/racket/doc
raco setup: --- updating info-domain tables ---                    [13:57:29]
raco setup: updating: /home/user/.local/share/racket/8.10/share/info-cache.rktd
raco setup: --- pre-installing collections ---                     [13:57:29]
raco setup: --- installing foreign libraries ---                   [13:57:29]
raco setup: --- installing shared files ---                        [13:57:29]
raco setup: --- compiling collections ---                          [13:57:29]
raco setup: --- parallel build using 8 jobs ---                    [13:57:29]
raco setup: 7 making: <pkgs>/sci/flomat
raco setup: 6 making: <pkgs>/sci/flomat-doc
raco setup: --- creating launchers ---                             [13:57:35]
raco setup: --- installing man pages ---                           [13:57:35]
raco setup: --- building documentation ---                         [13:57:35]
raco setup: 2 running: <pkgs>/sci/flomat-doc/manual-flomat.scrbl
ffi-lib: could not load foreign library
  path: libgfortran.so.3
  system error: libgfortran.so.3: cannot open shared object file: No such file or directory
  context...:
   /usr/local/racket/collects/ffi/unsafe.rkt:131:0: get-ffi-lib
   body of "/home/user/.local/share/racket/8.10/pkgs/sci/flomat/flomat.rkt"
   body of top-level
   /usr/local/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
   /usr/local/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:921:7
   /usr/local/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:891:2: user-process

  context...:
   /usr/local/racket/collects/setup/parallel-do.rkt:333:4: work-done method in list-queue%
   /usr/local/racket/collects/setup/parallel-do.rkt:283:17
   /usr/local/racket/collects/setup/parallel-do.rkt:237:4
   /usr/local/racket/share/pkgs/racket-index/setup/scribble.rkt:139:0: setup-scribblings
   /usr/local/racket/collects/setup/setup.rkt:78:3
   /usr/local/racket/collects/pkg/main.rkt:17:0: setup
   body of (submod "/usr/local/racket/collects/pkg/main.rkt" main)
   /usr/local/racket/collects/raco/raco.rkt:41:0
   body of "/usr/local/racket/collects/raco/raco.rkt"
   body of "/usr/local/racket/collects/raco/main.rkt"
raco setup: --- installing collections ---                         [13:57:41]
raco setup: --- post-installing collections ---                    [13:57:41]
raco setup: --- summary of errors ---                              [13:57:41]
raco setup: error: during building docs for <pkgs>/sci/flomat-doc/manual-flomat.scrbl
raco setup:   ffi-lib: could not load foreign library
raco setup:     path: libgfortran.so.3
raco setup:     system error: libgfortran.so.3: cannot open shared object file: No such file or directory
raco setup:     context...:
raco setup:      /usr/local/racket/collects/ffi/unsafe.rkt:131:0: get-ffi-lib
raco setup:      body of "/home/user/.local/share/racket/8.10/pkgs/sci/flomat/flomat.rkt"
raco setup:      body of top-level
raco setup:      /usr/local/racket/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization
raco setup:      /usr/local/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:921:7
raco setup:      /usr/local/racket/share/pkgs/sandbox-lib/racket/sandbox.rkt:891:2: user-process
raco setup:   
raco pkg install: packages installed, although setup reported errors

Attempting to require flomat demonstrates the problem is real:

> racket                                                                                                                                                                                      (base) 
Welcome to Racket v8.10 [cs].
> (require flomat)
ffi-lib: could not load foreign library
  path: libgfortran.so.3
  system error: libgfortran.so.3: cannot open shared object file: No such file or directory
 [,bt for context]
maueroats commented 10 months ago

Source of problem is: custom built kernel does not pass the "ubuntu" test.

maueroats commented 10 months ago

See PR #17 There is no need to condition the version numbers of libgfortran on the linux distribution.

soegaard commented 10 months ago

Closing. Thanks for PR #17