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

PreCompilation errors #228

Open
montyvesselinov opened this issue Jan 5, 2024 · 15 comments
Open

PreCompilation errors #228

montyvesselinov opened this issue Jan 5, 2024 · 15 comments

Comments

@montyvesselinov
Copy link

I get the following compilation errors with v 0.6.3. All works well wth 0.6.2.

This occurs under julia versions 1.9.2, 1.9.3, and 1.10.

[ Info: Precompiling BlackBoxOptimRealtimePlotServerExt [63f9f8bc-8213-5f4f-afc1-c0f12bbf518b]
ERROR: LoadError: UndefVarError: `serve!` not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base .\Base.jl:31
 [2] top-level scope
   @ C:\Users\monty\.julia\packages\BlackBoxOptim\lZtsr\ext\BlackBoxOptimRealtimePlotServerExt.jl:70
 [3] include
   @ .\Base.jl:457 [inlined]
 [4] 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, UInt128}}, source::Nothing)
   @ Base .\loading.jl:2049
 [5] top-level scope
   @ stdin:3
in expression starting at C:\Users\monty\.julia\packages\BlackBoxOptim\lZtsr\ext\BlackBoxOptimRealtimePlotServerExt.jl:1
in expression starting at stdin:3
┌ Error: Error during loading of extension BlackBoxOptimRealtimePlotServerExt of BlackBoxOptim, use `Base.retry_load_extensions()` to retry.```
@montyvesselinov montyvesselinov changed the title Compilation errors PreCompilation errors Jan 5, 2024
@montyvesselinov
Copy link
Author

The error impacts the precompilation every time Julia is restarted.

  Progress [====================================>    ]  16/18
  ✗ BlackBoxOptim → BlackBoxOptimRealtimePlotServerExt

Please fix.

Thank you!

@montyvesselinov
Copy link
Author

Are there plans to fix this? The error slows down the julia restarts big time. thank you!

@montyvesselinov
Copy link
Author

 ERROR: LoadError: UndefVarError: `serve!` not defined
│  Stacktrace:
│   [1] getproperty(x::Module, f::Symbol)
│     @ Base .\Base.jl:31
│   [2] top-level scope
│     @ C:\Users\monty\.julia\packages\BlackBoxOptim\lZtsr\ext\BlackBoxOptimRealtimePlotServerExt.jl:70
│   [3] include
│     @ Base .\Base.jl:495 [inlined]
│   [4] 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, UInt128}}, source::String)
│     @ Base .\loading.jl:2216
│   [5] top-level scope
│     @ stdin:3
│  in expression starting at C:\Users\monty\.julia\packages\BlackBoxOptim\lZtsr\ext\BlackBoxOptimRealtimePlotServerExt.jl:1
│  in expression starting at stdin:3
│  ┌ Error: Error during loading of extension BlackBoxOptimRealtimePlotServerExt of BlackBoxOptim, use `Base.retry_load_extensions()` to retry.
│  │   exception =
│  │    1-element ExceptionStack:
│  │    Failed to precompile BlackBoxOptimRealtimePlotServerExt [63f9f8bc-8213-5f4f-afc1-c0f12bbf518b] to "C:\\Users\\monty\\.julia\\compiled\\v1.10\\BlackBoxOptimRealtimePlotServerExt\\jl_C1F1.tmp".
│  │    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:2462
│  │      [3] compilecache
│  │        @ Base .\loading.jl:2334 [inlined]
│  │      [4] (::Base.var"#968#969"{Base.PkgId})()
│  │        @ Base .\loading.jl:1968
│  │      [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
│  │        @ FileWatching.Pidfile C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:93
│  │      [6] #mkpidlock#6
│  │        @ FileWatching.Pidfile C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:88 [inlined]
│  │      [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
│  │        @ FileWatching.Pidfile C:\Users\monty\.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:111
│  │      [8] #invokelatest#2
│  │        @ Base .\essentials.jl:889 [inlined]
│  │      [9] invokelatest
│  │        @ Base .\essentials.jl:884 [inlined]
│  │     [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
│  │        @ Base .\loading.jl:2977
│  │     [11] maybe_cachefile_lock
│  │        @ Base .\loading.jl:2974 [inlined]
│  │     [12] _require(pkg::Base.PkgId, env::Nothing)
│  │        @ Base .\loading.jl:1964
│  │     [13] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│  │        @ Base .\loading.jl:1806
│  │     [14] #invoke_in_world#3
│  │        @ Base .\essentials.jl:921 [inlined]
│  │     [15] invoke_in_world
│  │        @ Base .\essentials.jl:918 [inlined]
│  │     [16] _require_prelocked
│  │        @ Base .\loading.jl:1797 [inlined]
│  │     [17] _require_prelocked
│  │        @ Base .\loading.jl:1796 [inlined]
│  │     [18] run_extension_callbacks(extid::Base.ExtensionId)
│  │        @ Base .\loading.jl:1289
│  │     [19] run_extension_callbacks(pkgid::Base.PkgId)
│  │        @ Base .\loading.jl:1324
│  │     [20] run_package_callbacks(modkey::Base.PkgId)
│  │        @ Base .\loading.jl:1158
│  │     [21] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
│  │        @ Base .\loading.jl:1481
│  │     [22] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│  │        @ Base .\loading.jl:1568
│  │     [23] _require(pkg::Base.PkgId, env::String)
│  │        @ Base .\loading.jl:1932
│  │     [24] __require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base .\loading.jl:1806
│  │     [25] #invoke_in_world#3
│  │        @ Base .\essentials.jl:921 [inlined]
│  │     [26] invoke_in_world
│  │        @ Base .\essentials.jl:918 [inlined]
│  │     [27] _require_prelocked(uuidkey::Base.PkgId, env::String)
│  │        @ Base .\loading.jl:1797
│  │     [28] macro expansion
│  │        @ Base .\loading.jl:1784 [inlined]
│  │     [29] macro expansion
│  │        @ Base .\lock.jl:267 [inlined]
│  │     [30] __require(into::Module, mod::Symbol)
│  │        @ Base .\loading.jl:1747
│  │     [31] #invoke_in_world#3
│  │        @ Base .\essentials.jl:921 [inlined]
│  │     [32] invoke_in_world
│  │        @ Base .\essentials.jl:918 [inlined]
│  │     [33] require(into::Module, mod::Symbol)
│  │        @ Base .\loading.jl:1740
│  │     [34] include
│  │        @ Base .\Base.jl:495 [inlined]
│  │     [35] 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, UInt128}}, source::Nothing)
│  │        @ Base .\loading.jl:2216
│  │     [36] top-level scope
│  │        @ stdin:3
│  │     [37] eval
│  │        @ Core .\boot.jl:385 [inlined]
│  │     [38] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
│  │        @ Base .\loading.jl:2070
│  │     [39] include_string
│  │        @ Base .\loading.jl:2080 [inlined]
│  │     [40] exec_options(opts::Base.JLOptions)
│  │        @ Base .\client.jl:316
│  │     [41] _start()
│  │        @ Base .\client.jl:552
│  └ @ Base loading.jl:1295

@robertfeldt
Copy link
Owner

Thanks for the bug report. Unfortunately, this doesn't happen for me so hard to debug. I'll fix as soon as I can reproduce and debug. This seems to be in an old part of the code that is optional and probably not used by many/all so one option might be to just skip it.

@robertfeldt
Copy link
Owner

Tried also on a fresh install of Julia 1.10 now and no problems with the precompile there either. Hmm, I need some more info to delve deeper into this. If others are having problems, please share.

@robertfeldt
Copy link
Owner

@montyvesselinov can you rm your current BlackBoxOptim install and instead install current master and report back what happens during pre-compilation?

@montyvesselinov
Copy link
Author

i did removed. I did gc --all . I still get this and error above

✗ BlackBoxOptim → BlackBoxOptimRealtimePlotServerExt

@montyvesselinov
Copy link
Author

using the latest with dev BlackBoxOptim fixed it.

@montyvesselinov
Copy link
Author

actually it did not:

(@v1.10) pkg> build BlackBoxOptim
Precompiling project...
  Progress [=========>                               ]  2/9
  ✗ BlackBoxOptim → BlackBoxOptimRealtimePlotServerExt

@robertfeldt
Copy link
Owner

Hmm, strange one. Ok, I commented out the code loading the gui extension part so please try again with "dev BlackBoxOptim" and report back if you still get pre-compilation errors. Still no errors on my end neither with 1.9.5 nor with 1.10.

@montyvesselinov
Copy link
Author

montyvesselinov commented Feb 4, 2024 via email

@montyvesselinov
Copy link
Author

[a0f608ac] AffineInvariantMCMC v1.2.3 C:\Users\monty\.julia\dev\AffineInvariantMCMC
[fd9e7046] Anasol v1.0.1
[7f9c7709] BIGUQ v1.1.1
[159f3aea] Cairo v1.0.5
[a81c6b42] Compose v0.9.5
[8c3ed914] DPFEHM v0.1.1 C:\Users\monty\.julia\dev\DPFEHM
[a93c6f00] DataFrames v1.6.1
[864edb3b] DataStructures v0.18.16
[8bb1440f] DelimitedFiles v1.9.1
[e1f3b4f0] DocumentFunction v1.3.0
[5789e2e9] FileIO v1.16.2
[186bb1d3] Fontconfig v0.4.1
[6d17f829] GIMI v0.6.0 C:\Users\monty\.julia\dev\GIMI
[c91e804a] Gadfly v1.4.0
[46975ee9] GeoML v0.1.0 C:\Users\monty\.julia\dev\GeoML
[fae7f105] GeoTGo v0.1.0 C:\Users\monty\.julia\dev\GeoTGo
[acd30bff] GeostatInversion v1.0.0 C:\Users\monty\.julia\dev\GeostatInversion
⌅ [916415d5] Images v0.25.3
[b6b21f68] Ipopt v1.6.0
[4138dd39] JLD v0.13.4
[033835bb] JLD2 v0.4.45
[682c06a0] JSON v0.21.4
[98e50ef6] JuliaFormatter v1.0.45
[6133562b] Kriging v1.2.1
[2fda8390] LsqFit v0.15.0
[d6bdc55b] Mads v1.5.11 C:\Users\monty\.julia\dev\Mads
[b1909ce5] MetaProgTools v1.0.0
[e40cd9e2] NMFk v1.3.2 C:\Users\monty\.julia\dev\NMFk
[bac558e1] OrderedCollections v1.6.3
[92933f4c] ProgressMeter v1.9.0
[438e738f] PyCall v1.96.4
[d330b81b] PyPlot v2.11.2
[afbf81f7] ReusableFunctions v1.0.2
[295af30f] Revise v3.5.13
[27aeedcb] RobustPmap v1.0.2
[22bb73d7] SVR v1.4.0
[eb8b94b2] SmartML v1.0.1 C:\Users\monty\.julia\dev\SmartML
⌅ [4acbeb90] Stipple v0.24.5 ⚲
[009559a3] XGBoost v2.5.1
[fdbf4ff8] XLSX v0.10.1
[ddb6d928] YAML v0.4.9
[856f044c] MKL_jll v2024.0.0+0
⌃ [36c8627f] Pango_jll v1.42.4+10 ⚲
[10745b16] Statistics v1.10.0

@montyvesselinov
Copy link
Author

Error: Error during loading of extension BlackBoxOptimRealtimePlotServerExt of BlackBoxOptim, use Base.retry_load_extensions() to retry.
│ exception =
│ 1-element ExceptionStack:
│ Failed to precompile BlackBoxOptimRealtimePlotServerExt [63f9f8bc-8213-5f4f-afc1-c0f12bbf518b] to "C:\Users\monty\.julia\compiled\v1.10\BlackBoxOptimRealtimePlotServerExt\jl_8C61.tmp".
│ 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:2462
│ [3] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
│ @ Base .\loading.jl:2334 [inlined]
│ [4] (::Base.var"#968#969"{Base.PkgId})()
│ @ Base .\loading.jl:1968
│ [5] mkpidlock(f::Base.var"#968#969"{Base.PkgId}, at::String, pid::Int32; kwopts::@kwargs{stale_age::Int64, wait::Bool})
│ @ FileWatching.Pidfile C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:93
│ [6] #mkpidlock#6
│ @ FileWatching.Pidfile C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:88 [inlined]
│ [7] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@kwargs{stale_age::Int64})
│ @ FileWatching.Pidfile C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\FileWatching\src\pidfile.jl:111
│ [8] #invokelatest#2
│ @ Base .\essentials.jl:889 [inlined]
│ [9] invokelatest
│ @ Base .\essentials.jl:884 [inlined]
│ [10] maybe_cachefile_lock(f::Base.var"#968#969"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
│ @ Base .\loading.jl:2977
│ [11] maybe_cachefile_lock
│ @ Base .\loading.jl:2974 [inlined]
│ [12] _require(pkg::Base.PkgId, env::Nothing)
│ @ Base .\loading.jl:1964
│ [13] __require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│ @ Base .\loading.jl:1806
│ [14] #invoke_in_world#3
│ @ .\essentials.jl:921 [inlined]
│ [15] invoke_in_world
│ @ .\essentials.jl:918 [inlined]
│ [16] _require_prelocked
│ @ .\loading.jl:1797 [inlined]
│ [17] _require_prelocked
│ @ .\loading.jl:1796 [inlined]
│ [18] run_extension_callbacks(extid::Base.ExtensionId)
│ @ Base .\loading.jl:1289
│ [19] run_extension_callbacks(pkgid::Base.PkgId)
│ @ Base .\loading.jl:1324
│ [20] run_package_callbacks(modkey::Base.PkgId)
│ @ Base .\loading.jl:1158
│ [21] _tryrequire_from_serialized(modkey::Base.PkgId, path::String, ocachepath::String, sourcepath::String, depmods::Vector{Any})
│ @ Base .\loading.jl:1481
│ [22] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String, build_id::UInt128)
│ @ Base .\loading.jl:1568
│ [23] _require(pkg::Base.PkgId, env::String)
│ @ Base .\loading.jl:1932
│ [24] __require_prelocked(uuidkey::Base.PkgId, env::String)
│ @ Base .\loading.jl:1806
│ [25] #invoke_in_world#3
│ @ Base .\essentials.jl:921 [inlined]
│ [26] invoke_in_world
│ @ Base .\essentials.jl:918 [inlined]
│ [27] _require_prelocked(uuidkey::Base.PkgId, env::String)
│ @ Base .\loading.jl:1797
│ [28] macro expansion
│ @ Base .\loading.jl:1784 [inlined]
│ [29] macro expansion
│ @ Base .\lock.jl:267 [inlined]
│ [30] __require(into::Module, mod::Symbol)
│ @ Base .\loading.jl:1747
│ [31] #invoke_in_world#3
│ @ Base .\essentials.jl:921 [inlined]
│ [32] invoke_in_world
│ @ Base .\essentials.jl:918 [inlined]
│ [33] require(into::Module, mod::Symbol)
│ @ Base .\loading.jl:1740
│ [34] eval
│ @ Core .\boot.jl:385 [inlined]
│ [35] eval_user_input(ast::Any, backend::REPL.REPLBackend, mod::Module)
│ @ REPL C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\REPL\src\REPL.jl:150
│ [36] repl_backend_loop(backend::REPL.REPLBackend, get_module::Function)
│ @ REPL C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\REPL\src\REPL.jl:246
│ [37] start_repl_backend(backend::REPL.REPLBackend, consumer::Any; get_module::Function)
│ @ REPL C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\REPL\src\REPL.jl:231
│ [38] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool, backend::Any)
│ @ REPL C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\REPL\src\REPL.jl:389
│ [39] run_repl(repl::REPL.AbstractREPL, consumer::Any)
│ @ REPL C:\Users\monty.julia\juliaup\julia-1.10.0+0.x64.w64.mingw32\share\julia\stdlib\v1.10\REPL\src\REPL.jl:375
│ [40] (::Base.var"#1013#1015"{Bool, Bool, Bool})(REPL::Module)
│ @ Base .\client.jl:432
│ [41] #invokelatest#2
│ @ Base .\essentials.jl:887 [inlined]
│ [42] invokelatest
│ @ Base .\essentials.jl:884 [inlined]
│ [43] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
│ @ Base .\client.jl:416
│ [44] exec_options(opts::Base.JLOptions)
│ @ Base .\client.jl:333
│ [45] _start()
│ @ Base .\client.jl:552
└ @ Base loading.jl:1295

@robertfeldt
Copy link
Owner

Ok, I tried taking away the whole extensions now. Please try again but make sure BBO is totally removed from your Julia install and then install by giving the http url, i.e.:

add https://github.com/robertfeldt/BlackBoxOptim.jl

and see if the same problem happens.

@montyvesselinov
Copy link
Author

montyvesselinov commented Feb 4, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants