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

ERROR: UndefVarError: build_executable not defined #67

Open
rezaeir opened this issue May 14, 2020 · 5 comments
Open

ERROR: UndefVarError: build_executable not defined #67

rezaeir opened this issue May 14, 2020 · 5 comments

Comments

@rezaeir
Copy link

rezaeir commented May 14, 2020

I'm trying to learn how to use ApplicationBuilder.jl to build a standalone fully independent application for windows. for example, the following function could be the code for the app:

function Hello()
    println("Hello World")
end

then based on the ApplicationBuilder documentation the whole thing should be wrapped around a main function like this:

include("helloexe.jl") #address of the file containing the above Hello() function
Base.@ccallable function julia_main(ARGS::Vector{String})::Cint
    return Hello()
end

When I run the

using ApplicationBuilder
build_app_bundle("D:\\Julia\\my_julia_main.jl", appname="Hello")

it gives me the following error:

build_app_bundle("D:\\Julia\\my_julia_main.jl", appname="Hello")
[ Info: Building at path D:\Julia\builddir\Hello
[ Info: Copying resources:
[ Info: Copying libraries
ERROR: UndefVarError: build_executable not defined
Stacktrace:
 [1] build_app_bundle(::String; resources::Array{String,1}, libraries::Array{String,1}, builddir::String, appname::String, create_installer::Bool) at C:\Users\Reza\.julia\packages\ApplicationBuilder\kMUzZ\src\bundle.jl:44
 [2] top-level scope at REPL[25]:1

What does 'build_executable not defined' mean and how can I fix it? I asked the question on StackOverflow and someone said it is a dependency problem with "PackageCompiler". Is it so?

@rezaeir
Copy link
Author

rezaeir commented May 14, 2020

@ZHIWEN-PING
Copy link

I have the exact issue too.

@anhinga
Copy link

anhinga commented May 26, 2020

I have this issue as well (trying to produce a self-contained application on Windows, and getting build_executable not defined error).

@alanrogers
Copy link

I'm having the same problem on MacOS, using the "hello.jl" example supplied with the package.

julia> using ApplicationBuilder
julia> build_app_bundle("/Users/rogers/.julia/packages/ApplicationBuilder/kMUzZ/examples/hello.jl", appname="HelloWorld", verbose=true);
Using calculated bundle_identifier: 'com.rogers.helloworld'

~~~~~~ Compiling a binary from '/Users/rogers/.julia/packages/ApplicationBuilder/kMUzZ/examples/hello.jl'... ~~~~~~~
  PackageCompiler.static_julia(...)
ERROR: UndefVarError: build_executable not defined
Stacktrace:
 [1] getproperty at ./Base.jl:26 [inlined]
 [2] (::ApplicationBuilder.var"#2#7"{String,Bool,String,String,String,String})() at /Users/rogers/.julia/packages/ApplicationBuilder/kMUzZ/src/ApplicationBuilder.jl:166
 [3] withenv(::ApplicationBuilder.var"#2#7"{String,Bool,String,String,String,String}, ::Pair{String,String}, ::Vararg{Pair{String,String},N} where N) at ./env.jl:161
 [4] build_app_bundle(::String; appname::String, builddir::String, binary_name::String, resources::Array{String,1}, libraries::Array{String,1}, verbose::Bool, bundle_identifier::Nothing, app_version::String, icns_file::Nothing, certificate::Nothing, entitlements_file::Nothing, snoopfile::Nothing, autosnoop::Bool, commandline_app::Bool, cpu_target::String) at /Users/rogers/.julia/packages/ApplicationBuilder/kMUzZ/src/ApplicationBuilder.jl:162
 [5] top-level scope at REPL[2]:1

@mpeters2
Copy link

Same here. Was this issue ever resolved?

MacOS 12.6

`build_app_bundle("my_julia_main.jl", appname="MyCode", verbose = true);
Using calculated bundle_identifier: 'com.mattpetersonsaccount.mycode'

~~~~~~ Compiling a binary from 'my_julia_main.jl'... ~~~~~~~
  PackageCompiler.static_julia(...)
ERROR: UndefVarError: build_executable not defined
Stacktrace:
 [1] getproperty
   @ ./Base.jl:31 [inlined]
 [2] (::ApplicationBuilder.var"#3#9"{String, Bool, String, String, String, String})()
   @ ApplicationBuilder ~/.julia/packages/ApplicationBuilder/kMUzZ/src/ApplicationBuilder.jl:166
 [3] withenv(::ApplicationBuilder.var"#3#9"{String, Bool, String, String, String, String}, ::Pair{String, String}, ::Vararg{Pair{String, String}})
   @ Base ./env.jl:172
 [4] build_app_bundle(juliaprog_main::String; appname::String, builddir::String, binary_name::String, resources::Vector{String}, libraries::Vector{String}, verbose::Bool, bundle_identifier::Nothing, app_version::String, icns_file::Nothing, certificate::Nothing, entitlements_file::Nothing, snoopfile::Nothing, autosnoop::Bool, commandline_app::Bool, cpu_target::String)
   @ ApplicationBuilder ~/.julia/packages/ApplicationBuilder/kMUzZ/src/ApplicationBuilder.jl:162
 [5] top-level scope
   @ REPL[12]:1`

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

5 participants