On May 23, 2016 10:30 AM, "Ján Adamčák" <[email protected]> wrote:
>
> Thanks @Jameson,
>
> Another error I'm getting while compiling c example is
>
> C://Users//Adam//AppData//Local//Julia-0.5.0-dev//start_func.c:111:
undefined reference to `__imp_jl_tls_states'
> collect2.exe: error: ld returned 1 exit status
>
> This error is caused by JL_GC_PUSH1(&x);
Looks like you are missing threading enabling macro while building your code
>
> Is there some workaround or is it just a bug?
>
> Thanks.
>
> Dňa pondelok, 23. mája 2016 4:56:52 UTC+2 Jameson napísal(-a):
>>
>> I tried building a new system image on v0.4 starting from an existing
sys.so library (as you tried below), and found that it failed with the same
"Task cannot be serialized" error. So I guess that use case must have been
fixed during v0.5 development. The workaround is to start with inference.ji
and load all of the extra code through userimg.jl. That worked for me (and
is just a bit slower for incremental development), so I didn't investigate
further.
>>
>>
>> On Tuesday, May 10, 2016 at 4:13:57 PM UTC-4, Jameson wrote:
>>>
>>> The compile-all flag is only partially functional on v0.4. I think it's
best to just leave it off. I tested on master and fixed a bug with emitting
`@ccallable`, but that's unrelated. From the command line below, it looks
like you are not adding any code to the system image (`--eval nothing`)
which would also means there are no `ccallable` declarations being emitted
into the current compile.
>>>
>>> Other than that, I don't see anything wrong with that command. You
shouldn't see that error unless you tried to make a Task or use `@async`
from the compile host. It's ambiguous how that would be serialized, so it's
simply an error and any parallel workers should be created / started by an
`__init__` method.
>>>
>>>
>>> On Tuesday, May 10, 2016 at 2:53:22 AM UTC-4, Ján Adamčák wrote:
>>>>
>>>> Hello guys,
>>>>
>>>> Thank you for your comments, though we were more optimistic...
>>>>
>>>>
>>>> Dňa piatok, 6. mája 2016 16:27:28 UTC+2 Ján Adamčák napísal(-a):
>>>>>
>>>>> Sorry, my fault.
>>>>>
>>>>> During last week I created build_sysimg2.jl from julia 0.4.5
build_sysimg.jl and when I run it, at line 86 (build_sysimg2.jl)
>>>>>
>>>>> run(`$julia -C $cpu_target --output-o sysimg_all.o --sysimage
$sysimg_path.$(Libdl.dlext) --startup-file=no --compile=all --eval nothing`)
>>>>>
>>>>> I got this error:
>>>>>
>>>>> fatal: error thrown and no exception handler available.
>>>>> ErrorException("Task cannot be serialized")
>>>>> jl_unprotect_stack at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_throw at C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll
(unknown line)
>>>>> jl_error at C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll
(unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_compress_ast at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_save_system_image_to_stream at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_create_system_image at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> jl_atexit_hook at
C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\libjulia.dll (unknown line)
>>>>> unknown function (ip: 00000000004028B5)
>>>>> unknown function (ip: 000000000040140C)
>>>>> unknown function (ip: 000000000040153B)
>>>>> BaseThreadInitThunk at C:\WINDOWS\system32\KERNEL32.DLL (unknown line)
>>>>> RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
>>>>> ERROR: LoadError: failed process:
Process(`'C:\Users\Adam\AppData\Local\Julia-0.4.5\bin\julia' -C native
--output-o sysimg_all.o --sysimage my_img.dll --startup-file=no
--compile=all --eval nothing`, ProcessExited(1)) [1]
>>>>> in run at process.jl:531
>>>>> while loading
c:\Users\Adam\AppData\Local\Julia-0.4.5\share\julia\build_sysimg2.jl, in
expression starting on line 191
>>>>>
>>>>> Before this error, julia wrote some warnings:
>>>>>
>>>>> WARNING: could not attach metadata for @simd loop.
>>>>>
>>>>> Same error I got on Ubuntu 16.04...
>>>>>
>>>>>
>>>>>
>>>>> Dňa piatok, 6. mája 2016 15:48:19 UTC+2 Jeff Bezanson napísal(-a):
>>>>>>
>>>>>> That command line in build_sysimg.jl:77 looks strange. Actually I
>>>>>> can't find that line anywhere; our build_sysimg and
BuildExecutable.jl
>>>>>> now have something slightly different.
>>>>>>
>>>>>> On Fri, May 6, 2016 at 9:25 AM, Tom Breloff <[email protected]>
wrote:
>>>>>> > Also, I think there's even fewer people that are experts on the
Windows
>>>>>> > build process. I think the community tends to be more linux/osx
focused.
>>>>>> >
>>>>>> > On Fri, May 6, 2016 at 4:08 AM, Andreas Lobinger <[email protected]>
>>>>>> > wrote:
>>>>>> >>
>>>>>> >> Hello colleague,
>>>>>> >>
>>>>>> >> this topic is still seen as experimental and not that many of
julia users
>>>>>> >> could be considered expert on this...
>>>>>> >> If the recipe given (long time ago i tried to follow this on a
linux
>>>>>> >> installation which i general has more tooling to get shared
libraries and
>>>>>> >> compilation working...) doesn't work, you could raise a concrete
issue on
>>>>>> >> github - there you get more audience with julia internal
know-how.
>>>>>> >>
>>>>>> >> Wishing a happy day,
>>>>>> >>
>>>>>> >> Andreas
>>>>>> >>
>>>>>> >>
>>>>>> >> On Friday, May 6, 2016 at 8:51:47 AM UTC+2, Ján Adamčák wrote:
>>>>>> >>>
>>>>>> >>> Nobody???
>>>>>> >>>
>>>>>> >>> Dňa pondelok, 2. mája 2016 11:30:11 UTC+2 Ján Adamčák
napísal(-a):
>>>>>> >>>>
>>>>>> >>>>
>>>>>> >>>> Hello,
>>>>>> >>>>
>>>>>> >>>> Trying to create an executable from Julia source, there are
questions
>>>>>> >>>> that raised... The process of exporting functions wasn't
successful,
>>>>>> >>>> function(s) was not exported to dll, and even the generated dll
cant be
>>>>>> >>>> loaded in c++ code. Below is the process explained in details:
>>>>>> >>>>
>>>>>> >>>> Can anybody bring more insight, how to build a standalone
executable
>>>>>> >>>> from Julia source?
>>>>>> >>>>
>>>>>> >