[julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Julia User
Thanks to all: this worked...

adding


`ccall(jl_, Void, (Any,), Text)`

recompile



[julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Julia User
Thanks, nothing important just tried it to see if it would work.


On Thursday, March 19, 2015 at 4:30:07 PM UTC-3, Patrick O'Leary wrote:

 Since string.jl is part of the bootstrap, there are things that won't be 
 available yet when that part of the image is built. It looks like in this 
 case STDOUT, which is the default target for println, hasn't been defined 
 yet.

 What are you trying to do with this print? There may be another solution.


 


Re: [julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Isaiah Norton
`ccall(jl_, Void, (Ptr{Uint8},), Line 305)` will probably work. (beware
that YMMV as this is a debugging function that does not support all data
structures so you might end up needing to Ctrl^C the process if it tries to
display something too complicated and ends up spewing nonsense).

On Thu, Mar 19, 2015 at 3:43 PM, Julia User julia.user1...@gmail.com
wrote:

 Thanks, nothing important just tried it to see if it would work.


 On Thursday, March 19, 2015 at 4:30:07 PM UTC-3, Patrick O'Leary wrote:

 Since string.jl is part of the bootstrap, there are things that won't be
 available yet when that part of the image is built. It looks like in this
 case STDOUT, which is the default target for println, hasn't been defined
 yet.

 What are you trying to do with this print? There may be another solution.






[julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Patrick O'Leary
Since string.jl is part of the bootstrap, there are things that won't be 
available yet when that part of the image is built. It looks like in this 
case STDOUT, which is the default target for println, hasn't been defined 
yet.

What are you trying to do with this print? There may be another solution.

On Thursday, March 19, 2015 at 1:53:24 PM UTC-5, Julia User wrote:

 I added a print statement to a function in Base.string.jl

 something like:

 function searchindex(s::ByteString, t::ByteString, i::Integer=1)
 println(Line 305)
 if length(t) == 1
 search(s, t[1], i)
 else
 searchindex(s.data, t.data, i)
 end
 end



 When I recompile julia I get an Error: Is that suppose to happen ?

 CC ui/repl.o
 LINK usr/bin/julia
 JULIA usr/lib/julia/sys0.o
 exports.jl
 base.jl
 reflection.jl
 build_h.jl
 version_git.jl
 c.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
 rounding.jl
 float.jl
 complex.jl
 rational.jl
 abstractarray.jl
 subarray.jl
 array.jl
 subarray2.jl
 functors.jl
 bitarray.jl
 intset.jl
 dict.jl
 set.jl
 hashing.jl
 iterator.jl
 simdloop.jl
 reduce.jl
 inference.jl
 osutils.jl
 char.jl
 ascii.jl
 utf8.jl
 utf16.jl
 utf32.jl
 iobuffer.jl
 string.jl
 utf8proc.jl
 regex.jl
 pcre.jl
 base64.jl
 io.jl
 iostream.jl
 libc.jl
 libdl.jl
 env.jl
 path.jl
 intfuncs.jl
 nullable.jl
 task.jl
 show.jl
 stream.jl
 uv_constants.jl
 socket.jl
 stat.jl
 fs.jl
 process.jl
 multimedia.jl
 grisu.jl
 file.jl
 methodshow.jl
 floatfuncs.jl
 math.jl
 float16.jl
 cartesian.jl
 multidimensional.jl
 primes.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
 serialize.jl
 multi.jl
 managers.jl
 loading.jl
 poll.jl
 mmap.jl
 sharedarray.jl
 datafmt.jl
 deepcopy.jl
 interactiveutil.jl
 replutil.jl
 test.jl
 meta.jl
 i18n.jl
 help.jl
 Terminals.jl
 LineEdit.jl
 REPLCompletions.jl
 REPL.jl
 client.jl
 markdown/Markdown.jl
 docs.jl
 error during bootstrap:
 LoadError(at sysimg.jl line 233: LoadError(at docs.jl line 213: 
 UndefVarError(var=:STDOUT)))
 jl_throw at /julia_src/usr/bin/../lib/libjulia.so (unknown line)
 unknown function (ip: -296211804)
 unknown function (ip: -296145600)
 unknown function (ip: -296147390)
 unknown function (ip: -296144131)
 jl_load at /julia_src/usr/bin/../lib/libjulia.so (unknown line)
 include at boot.jl:250
 anonymous at sysimg.jl:151
 unknown function (ip: -296209515)
 unknown function (ip: -296215837)
 unknown function (ip: -296145600)
 unknown function (ip: -296147390)
 unknown function (ip: -296144131)
 jl_load at /julia_src/usr/bin/../lib/libjulia.so (unknown line)
 unknown function (ip: 4203722)
 unknown function (ip: 4203045)
 unknown function (ip: 4202790)
 __libc_start_main at /usr/lib/libc.so.6 (unknown line)
 unknown function (ip: 4199657)
 unknown function (ip: 0)

 Makefile:168: recipe for target '/julia_src/usr/lib/julia/sys0.o' failed
 make[1]: *** [/julia_src/usr/lib/julia/sys0.o] Error 1
 Makefile:82: recipe for target 'julia-sysimg-release' failed
 make: *** [julia-sysimg-release] Error 2
 ...



Re: [julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Julia User
I did try your suggestion (`ccall(jl_, Void, (Ptr{Uint8},), Line 305)` 
will probably work.) but got an other Error

libc.jl
libdl.jl
env.jl
error during bootstrap:
LoadError(at sysimg.jl line 106: LoadError(at env.jl line 110: 
UndefVarError(var=:Uint8)))


Thanks anyway - was just a try..


On Thursday, March 19, 2015 at 4:49:46 PM UTC-3, Isaiah wrote:

 `ccall(jl_, Void, (Ptr{Uint8},), Line 305)` will probably work.



Re: [julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Julia User
Yes a git checkout.

That worked so half way..

It compiled: got between a number of

!!! ERROR in jl_ -- ABORTING !!!

!!! ERROR in jl_ -- ABORTING !!!
precompile.jl
LINK usr/lib/julia/sys.so
[workerm@evo git_julia]$ 


But the problem is if I call something it will not output the text but `!!! 
ERROR in jl_ -- ABORTING !!! otherwise it seems ok.
`

julia searchindex(aadsd, d)

!!! ERROR in jl_ -- ABORTING !!!
3

julia 


The same happened before when I tested this in the REPL

julia function test()
   ccall(jl_, Void, (Ptr{UInt8 },), Line 2)
   end
test (generic function with 1 method)

julia test()

!!! ERROR in jl_ -- ABORTING !!!

julia 



Nevermind...


On Thursday, March 19, 2015 at 5:53:10 PM UTC-3, Mauro wrote:

 Are you on 0.4?  Then it should be UInt8 



Re: [julia-users] Re: Error or supposed to happen? compile

2015-03-19 Thread Jameson Nash
The argument to the jl_ function is of type Any not Ptr{Void}

It also now bails at a depth of 25 by printing •, so it should fail as
badly anymore on recursive types
On Thu, Mar 19, 2015 at 5:26 PM Julia User julia.user1...@gmail.com wrote:

 Yes a git checkout.

 That worked so half way..

 It compiled: got between a number of

 !!! ERROR in jl_ -- ABORTING !!!

 !!! ERROR in jl_ -- ABORTING !!!
 precompile.jl
 LINK usr/lib/julia/sys.so
 [workerm@evo git_julia]$


 But the problem is if I call something it will not output the text but `
 !!! ERROR in jl_ -- ABORTING !!! otherwise it seems ok.
 `

 julia searchindex(aadsd, d)

 !!! ERROR in jl_ -- ABORTING !!!
 3

 julia


 The same happened before when I tested this in the REPL

 julia function test()
ccall(jl_, Void, (Ptr{UInt8 },), Line 2)
end
 test (generic function with 1 method)

 julia test()

 !!! ERROR in jl_ -- ABORTING !!!

 julia



 Nevermind...


 On Thursday, March 19, 2015 at 5:53:10 PM UTC-3, Mauro wrote:

 Are you on 0.4?  Then it should be UInt8