Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Precompiling Oscar InitError: GAP variable _JULIAINTERFACE_ERROR_BUFFER not bound #1955

Closed
JuanCaGC opened this issue Feb 17, 2023 · 10 comments
Labels
bug Something isn't working

Comments

@JuanCaGC
Copy link

JuanCaGC commented Feb 17, 2023

Hello, first of all the module is the best.
I was trying to install everything on a new computer and I found this error.
I have done the basics of updating. I have also deleted everything and reinstalled, and I am still having the same error. I would appreciate any solution.

[ Info: Precompiling Oscar [f1435218-dba5-11e9-1e4d-f1a5fab5fc13]
Error, <str> must not contain '\' or ':' at /home/juancgc14/.julia/artifacts/b5c2f0f824457e5c391fb24916f94d5d91c62c4f/\
share/gap/lib/files.gi:53 called from
func( C[i] 
 ) at /home/juancgc14/.julia/artifacts/b5c2f0f824457e5c391fb24916f94d5d91c62c4\
f/share/gap/lib/coll.gi:663 called from
List( GAPInfo.DirectoriesSystemPrograms, Directory 
 ) at /home/juancgc14/.julia/artifacts/b5c2f0f824457e5c391fb24916f94d5d91c62c4\
f/share/gap/lib/files.gd:422 called from
<function "DirectoriesSystemPrograms">( <arguments> )
 called from read-eval loop at /home/juancgc14/.julia/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/g\
ap_2909523886970917404_1.8/pkg/alnuth/defs.g:10
ERROR: LoadError: InitError: GAP variable _JULIAINTERFACE_ERROR_BUFFER not bound
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] getproperty(#unused#::GAP.GlobalsType, name::Symbol)
    @ GAP ~/.julia/packages/GAP/RFTng/src/globals.jl:42
  [3] error_handler()
    @ GAP ~/.julia/packages/GAP/RFTng/src/GAP.jl:71
  [4] initialize(argv::Vector{String})
    @ GAP ~/.julia/packages/GAP/RFTng/src/GAP.jl:153
  [5] #4
    @ ~/.julia/packages/GAP/RFTng/src/GAP.jl:298 [inlined]
  [6] withenv(f::GAP.var"#4#8"{Vector{String}}, keyvals::Pair{String, String})
    @ Base ./env.jl:172
  [7] __init__()
    @ GAP ~/.julia/packages/GAP/RFTng/src/GAP.jl:297
  [8] _include_from_serialized(pkg::Base.PkgId, path::String, depmods::Vector{Any})
    @ Base ./loading.jl:831
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt64)
    @ Base ./loading.jl:1039
 [10] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1315
 [11] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
 [12] macro expansion
    @ ./loading.jl:1180 [inlined]
 [13] macro expansion
    @ ./lock.jl:223 [inlined]
 [14] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
 [15] include(mod::Module, _path::String)
    @ Base ./Base.jl:419
 [16] include(x::String)
    @ Oscar ~/.julia/packages/Oscar/Iei9b/src/Oscar.jl:20
 [17] top-level scope
    @ ~/.julia/packages/Oscar/Iei9b/src/Oscar.jl:24
 [18] include
    @ ./Base.jl:419 [inlined]
 [19] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1554
 [20] top-level scope
    @ stdin:1
during initialization of module GAP
in expression starting at /home/juancgc14/.julia/packages/Oscar/Iei9b/src/imports.jl:11
in expression starting at /home/juancgc14/.julia/packages/Oscar/Iei9b/src/Oscar.jl:1
in expression starting at stdin:1
ERROR: Failed to precompile Oscar [f1435218-dba5-11e9-1e4d-f1a5fab5fc13] to /home/juancgc14/.julia/compiled/v1.8/Oscar/jl_4RyBFb.
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
    @ Base ./loading.jl:1707
  [3] compilecache
    @ ./loading.jl:1651 [inlined]
  [4] _require(pkg::Base.PkgId)
    @ Base ./loading.jl:1337
  [5] _require_prelocked(uuidkey::Base.PkgId)
    @ Base ./loading.jl:1200
  [6] macro expansion
    @ ./loading.jl:1180 [inlined]
  [7] macro expansion
    @ ./lock.jl:223 [inlined]
  [8] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1144
  [9] eval
    @ ./boot.jl:368 [inlined]
 [10] eval
    @ ./Base.jl:65 [inlined]
 [11] repleval(m::Module, code::Expr, #unused#::String)
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:222
 [12] (::VSCodeServer.var"#107#109"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:186
 [13] with_logstate(f::Function, logstate::Any)
    @ Base.CoreLogging ./logging.jl:511
 [14] with_logger
    @ ./logging.jl:623 [inlined]
 [15] (::VSCodeServer.var"#106#108"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
    @ VSCodeServer ~/.vscode-server/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/repl.jl:187
 [16] #invokelatest#2
    @ ./essentials.jl:729 [inlined]
 [17] invokelatest(::Any)
    @ Base ./essentials.jl:726
 [18] macro expansion
    @ ~/.vscode-server/extensions/julialang.language-julia-1.38.2/scripts/packages/VSCodeServer/src/eval.jl:34 [inlined]
 [19] (::VSCodeServer.var"#61#62")()
    @ VSCodeServer ./task.jl:484**
@JuanCaGC JuanCaGC added the bug Something isn't working label Feb 17, 2023
@fingolfin
Copy link
Member

Please report the output of Oscar.versioninfo(full=true).

Are you using WSL by chance?

@benlorenz
Copy link
Member

Oscar.versioninfo() will probably not work, but julias versioninfo(verbose=true) would be good, together with using Pkg; Pkg.status().

@JuanCaGC
Copy link
Author

Are you using WSL by chance?
Yes, I am using a WSL
Oscar.versioninfo() didn't work

versioninfo(verbose=true) show

Status `~/.julia/environments/v1.8/Project.toml`
  [c863536a] GAP v0.9.3
  [7073ff75] IJulia v1.24.0
  [2edaba10] Nemo v0.32.7
  [f1435218] Oscar v0.11.2
⌅ [d720cf60] Polymake v0.8.3
⌅ [bcd08a7b] Singular v0.14.0
Info Packages marked with ⌅ have new versions available but compatibility constraints restrict them from upgrading. To see why use `status --outdated`

and using Pkg; Pkg.status()

Julia Version 1.8.5
Commit 17cfb8e65ea (2023-01-08 06:45 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.1 LTS
  uname: Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64
  CPU: AMD Ryzen 5 3600 6-Core Processor: 
                 speed         user         nice          sys         idle          irq
       #1-12  3600 MHz        517 s         18 s         73 s       8785 s          0 s
  Memory: 7.743824005126953 GB (6407.0 MB free)
  Uptime: 78.81 sec
  Load Avg:  0.4  0.17  0.06
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, znver2)
  Threads: 1 on 12 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 
  HOME = /home/juancgc14
  TERM = xterm-256color
  PATH = /home/juancgc14/.vscode-server/bin/441438abd1ac652551dbe4d408dfcec8a499b8bf/bin/remote-cli:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/mnt/c/Users/oipli/AppData/Local/Programs/Python/Python311:/mnt/c/Users/oipli/AppData/Local/Programs/Python/Python311/Scripts:/mnt/c/ProgramData/Oracle/Java/javapath:/mnt/c/Program Files (x86)/Razer/ChromaBroadcast/bin:/mnt/c/Program Files/Razer/ChromaBroadcast/bin:/mnt/c/Program Files (x86)/Razer Chroma SDK/bin:/mnt/c/Program Files/Razer Chroma SDK/bin:/mnt/c/program files (x86)/common files/oracle/java/javapath:/mnt/c/programdata/oracle/java/javapath:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/system32/wbem:/mnt/c/windows/system32/windowspowershell/v1.0/:/mnt/c/windows/system32/openssh/:/mnt/c/program files/nvidia corporation/nvidia nvdlisr:/mnt/c/users/oipli/appdata/local/microsoft/windowsapps:/mnt/c/program files (x86)/java/jdk1.8.0_112/bin:/mnt/c/program files (x86)/java/jre1.8.0_112/bin:/mnt/c/Windows/system32/config/systemprofile/AppData/Local/Microsoft/WindowsApps:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files (x86)/Pulse Secure/VC142.CRT/X64/:/mnt/c/Program Files (x86)/Pulse Secure/VC142.CRT/X86/:/mnt/c/Users/oipli/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/oipli/AppData/Local/Programs/Microsoft VS Code/bin:/mnt/c/Program Files (x86)/Java/jdk1.8.0_112/bin:/mnt/c/Program Files (x86)/Java/jre1.8.0_112/bin:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/Program Files/PuTTY/:/mnt/c/Program Files/PostgreSQL/15/bin:/mnt/c/Program Files/PostgreSQL/15/lib:/mnt/c/Users/oipli/AppData/Local/Programs/Python/Python311/Scripts/:/mnt/c/Users/oipli/AppData/Local/Programs/Python/Python311/:/mnt/c/Users/oipli/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/oipli/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin:C:\Users\oipli\AppData\Local\Programs\Julia-1.8.5\bin

@fingolfin
Copy link
Member

The problem is caused by the Windows path C:\Users\oipli\AppData\Local\Programs\Julia-1.8.5\bin being in your Unix PATH environment variable. That confuses GAP when it tries to parse PATH. It may confuse other tools, too (the : is used as separator, so it will be parsed as two entries, C and \Users\oipli\AppData\Local\Programs\Julia-1.8.5\bin).

@JuanCaGC
Copy link
Author

JuanCaGC commented Feb 19, 2023

it worked thank you

@orebas
Copy link

orebas commented Mar 27, 2024

Hi there, what is the fix for this? WSL seems to stick a bunch of windows directories into the PATH environment variable by default. So it seems like GAP will be broken on any WSL (btw, I have not noticed any other packages breaking.)

@orebas
Copy link

orebas commented Mar 27, 2024

I was able to change the default path setting on WSL (leaving this here in case this issues shows up in a search). One can add
the below to the file /etc/wsl.conf
[interop] enabled=true appendWindowsPath=false

as documented here: https://learn.microsoft.com/en-us/windows/wsl/wsl-config

@orebas
Copy link

orebas commented Mar 27, 2024

However, I am still getting an error. Here is the error:

julia> using GAP
 ┌───────┐   GAP 4.12.2 of 2022-12-18
 │  GAP  │   https://www.gap-system.org
 └───────┘   Architecture: x86_64-pc-linux-gnu-julia1.10-64-kv8
 Configuration:  gmp 6.2.1, Julia GC, Julia 1.10.2, readline
 Loading the library Error, IS_SUBSET_FLAGS: <flags1> must be a flags list (not a plain list) in
  IS_SUBSET_FLAGS( imp2[1], imp[2]
 ) at /home/orebas/.julia/artifacts/b5c2f0f824457e5c391fb24916f94d5d91c62c4f/share/gap/lib/filter.g:151 called from
InstallTrueMethodNewFilter( tofilt, from
 ); at /home/orebas/.julia/artifacts/b5c2f0f824457e5c391fb24916f94d5d91c62c4f/share/gap/lib/filter.g:298 called from
<function "InstallTrueMethod">( <arguments> )
 called from read-eval loop at /home/orebas/.julia/artifacts/b5c2f0f824457e5c391fb24916f94d5d91c62c4f/share/gap/lib/pcgsspec.gd:253
ERROR: InitError: GAP variable _JULIAINTERFACE_ERROR_BUFFER not bound
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [2] getproperty(::GAP.GlobalsType, name::Symbol)
    @ GAP ~/.julia/packages/GAP/gliHT/src/globals.jl:42
  [3] error_handler()
    @ GAP ~/.julia/packages/GAP/gliHT/src/GAP.jl:71
  [4] initialize(argv::Vector{String})
    @ GAP ~/.julia/packages/GAP/gliHT/src/GAP.jl:153
  [5] __init__()
    @ GAP ~/.julia/packages/GAP/gliHT/src/GAP.jl:293
  [6] run_module_init(mod::Module, i::Int64)
    @ Base ./loading.jl:1134
  [7] register_restored_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)
    @ Base ./loading.jl:1122
  [8] _include_from_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any})
    @ Base ./loading.jl:1067
  [9] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
    @ Base ./loading.jl:1581
 [10] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:1938
 [11] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1812
 [12] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
 [13] invoke_in_world
    @ ./essentials.jl:923 [inlined]
 [14] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:1803
 [15] macro expansion
    @ ./loading.jl:1790 [inlined]
 [16] macro expansion
    @ ./lock.jl:267 [inlined]
 [17] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1753
 [18] #invoke_in_world#3
    @ ./essentials.jl:926 [inlined]
 [19] invoke_in_world
    @ ./essentials.jl:923 [inlined]
 [20] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:1746
during initialization of module GAP

@orebas
Copy link

orebas commented Mar 27, 2024

here is versioninfo(verbose=true)

Julia Version 1.10.2
Commit bd47eca2c8a (2024-03-01 10:14 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
      Ubuntu 22.04.4 LTS
  uname: Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64
  CPU: 13th Gen Intel(R) Core(TM) i5-1335U:
                 speed         user         nice          sys         idle          irq
       #1-12  2495 MHz        449 s          0 s        162 s      54909 s          0 s
  Memory: 7.598865509033203 GB (6727.2734375 MB free)
  Uptime: 463.79 sec
  Load Avg:  0.01  0.07  0.04
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, goldmont)
Threads: 8 default, 0 interactive, 4 GC (on 12 virtual cores)
Environment:
  JULIA_NUM_THREADS = 8
  HOME = /home/orebas
  TERM = xterm-256color
  PATH = /home/orebas/.juliaup/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/lib/wsl/lib:/snap/bin

@benlorenz
Copy link
Member

benlorenz commented Mar 27, 2024

Threads: 8 default, 0 interactive, 4 GC (on 12 virtual cores)

You might be hitting a different issue now, see oscar-system/GAP.jl#960. You can try --gcthreads=1 as a workaround.
Julia default should be 1 thread and not 8.

For me GAP loads fine in WSL.

Edit: I also have plenty of /mnt/c/Program Files... paths in my PATH there and that doesn't seem to hurt. I guess as long there is no real windows path with \ in there it should be fine, I don't really know how that one ended up there for you. (Manually adding C:\something breaks GAP)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants