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

Unable to perform static compilation of TimeZones.jl #32

Closed
bmharsha opened this issue Aug 18, 2016 · 7 comments
Closed

Unable to perform static compilation of TimeZones.jl #32

bmharsha opened this issue Aug 18, 2016 · 7 comments
Assignees

Comments

@bmharsha
Copy link

I’m trying to create a system image of Julia with TimeZones.jl embedded, I encountered following error while building Julia (using release-0.5 branch).

julia@stat-comp1:~/mybuild_julia__bug/julia|cede539
â  make -j 4
    JULIA usr/lib/julia/inference.ji
essentials.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
abstractarray.jl
array.jl
hashing.jl
nofloat_hashing.jl
reduce.jl
intset.jl
dict.jl
iterator.jl
docs/core.jl
inference.jl
    JULIA usr/lib/julia/sys.o
coreio.jl
exports.jl
essentials.jl
base.jl
generator.jl
reflection.jl
options.jl
promotion.jl
tuple.jl
range.jl
expr.jl
error.jl
bool.jl
number.jl
int.jl
operators.jl
pointer.jl
refpointer.jl
WARNING: Method definition (::Type{#T<:Any})(Any) in module Inference at coreimg.jl:39 overwritten in module Base at sysimg.jl:53.
checked.jl
abstractarray.jl
subarray.jl
array.jl
hashing.jl
rounding.jl
float.jl
complex.jl
rational.jl
multinverses.jl
abstractarraymath.jl
arraymath.jl
float16.jl
simdloop.jl
reduce.jl
reshapedarray.jl
bitarray.jl
intset.jl
dict.jl
set.jl
iterator.jl
build_h.jl
version_git.jl
osutils.jl
c.jl
sysinfo.jl
io.jl
iostream.jl
iobuffer.jl
char.jl
intfuncs.jl
strings/strings.jl
strings/errors.jl
strings/string.jl
strings/types.jl
strings/basic.jl
strings/search.jl
strings/util.jl
strings/io.jl
strings/utf8proc.jl
parse.jl
shell.jl
regex.jl
pcre.jl
show.jl
base64.jl
libc.jl
libdl.jl
env.jl
nullable.jl
libuv.jl
uv_constants.jl
event.jl
task.jl
lock.jl
stream.jl
socket.jl
filesystem.jl
process.jl
multimedia.jl
grisu/grisu.jl
methodshow.jl
floatfuncs.jl
math.jl
cartesian.jl
multidimensional.jl
permuteddimsarray.jl
reducedim.jl
ordering.jl
collections.jl
sort.jl
version.jl
gmp.jl
mpfr.jl
combinatorics.jl
hashing2.jl
dSFMT.jl
random.jl
printf.jl
meta.jl
Enums.jl
serialize.jl
channels.jl
clusterserialize.jl
multi.jl
workerpool.jl
pmap.jl
managers.jl
asyncmap.jl
loading.jl
mmap.jl
sharedarray.jl
datafmt.jl
deepcopy.jl
interactiveutil.jl
replutil.jl
test.jl
i18n.jl
initdefs.jl
Terminals.jl
LineEdit.jl
REPLCompletions.jl
REPL.jl
client.jl
util.jl
linalg/linalg.jl
broadcast.jl
statistics.jl
irrationals.jl
dft.jl
dsp.jl
quadgk.jl
fastmath.jl
libgit2/libgit2.jl
pkg/pkg.jl
stacktraces.jl
profile.jl
dates/Dates.jl
sparse/sparse.jl
threads.jl
threadcall.jl
deprecated.jl
docs/helpdb.jl
docs/helpdb/Base.jl
docs/basedocs.jl
markdown/Markdown.jl
docs/Docs.jl
/home/julia/mybuild_julia__bug/julia/base/precompile.jl
LoadError("sysimg.jl",380,LoadError("/home/julia/mybuild_julia__bug/julia/base/userimg.jl",1,LoadError("/home/julia/delete_this_folder/v0.5/TimeZones/src/TimeZones.jl",55,LoadError("/home/julia/delete_this_folder/v0.5/TimeZones/src/timezones/local.jl",6,ErrorException("syntax: unhandled expr (error #<julia: UndefVarError(var=:ENABLED)>)")))))
*** This error is usually fixed by running `make clean`. If the error persists, try `make cleanall`. ***
make[1]: *** [/home/julia/mybuild_julia__bug/julia/usr/lib/julia/sys.o] Error 1
make: *** [julia-sysimg-release] Error 2
julia@stat-comp1:~/mybuild_julia__bug/julia|cede539
â                                                                                               

I encountered similar error when I tried using Julia master

docs/helpdb.jl
docs/helpdb/Base.jl
docs/basedocs.jl
markdown/Markdown.jl
docs/Docs.jl
/home/julia/julia_timezone_bug/julia_no_change/julia/base/precompile.jl
LoadError("sysimg.jl",380,LoadError("/home/julia/julia_timezone_bug/julia_no_change/julia/base/userimg.jl",1,LoadError("/home/julia/delete_this_folder/v0.6/TimeZones/src/TimeZones.jl",55,LoadError("/home/julia/delete_this_folder/v0.6/TimeZones/src/timezones/local.jl",6,ErrorException("syntax: unhandled expr (error #<julia: UndefVarError(var=:ENABLED)>)")))))
*** This error is usually fixed by running `make clean`. If the error persists, try `make cleanall`. ***
make[1]: *** [/home/julia/julia_timezone_bug/julia_no_change/julia/usr/lib/julia/sys.o] Error 1
make: *** [julia-sysimg-release] Error 2

OS = Ubuntu 14.04
TimeZones version = 0.2.2

@omus
Copy link
Member

omus commented Aug 18, 2016

Thanks for reporting this issue. I'll look into it today.

@omus omus self-assigned this Aug 18, 2016
@aviks
Copy link

aviks commented Aug 18, 2016

Does this package work correctly in standard precompile mode?

@omus
Copy link
Member

omus commented Aug 18, 2016

TimeZones.jl does work with precompile. The UndefVarErroris coming from Mocking.jl. There seems to be something strange going on with static compilation and globals. Looking into it.

@omus
Copy link
Member

omus commented Aug 18, 2016

Static compiliation may not respect the __init__ function (JuliaLang/julia#18115). I have a work around which I'll apply to Mocking.jl.

@omus
Copy link
Member

omus commented Aug 18, 2016

__init__ works as intended with static compilation. I had a faulty impression with how I thought it worked. Fixing the issue in JuliaTesting/Mocking.jl#6

@omus
Copy link
Member

omus commented Aug 18, 2016

@bmharsha can you verify that TimeZones.jl is can now be statically compiled? You'll need to use the latest version of Mocking.jl (v0.2.2) which should be published shortly:

Pkg.add("Mocking")
Pkg.checkout("Mocking", "master")

@bmharsha
Copy link
Author

I just checked this fix on both Julia master and release-0.5, I was able to perform static compilation of TimeZones.jl, thank you very much for the quick fix @omus

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

3 participants