-
Notifications
You must be signed in to change notification settings - Fork 30
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
GZip doesn't load on Mac OS X 10.9 #10
Comments
Hi Tobias, I haven't been able to reproduce the bug on my mac. I'm wondering if maybe julia is finding an old/broken version of libz. Can you run the following code (adapted from JuliaLang/julia#4925 ): function shlib_list()
dynamic_libraries = Array(String,0)
numImages = ccall( cglobal("_dyld_image_count"), Cint, (), )
# start at 1 instead of 0 to skip self
for i in 1:numImages-1
name = bytestring(ccall( cglobal("_dyld_get_image_name"), Ptr{Uint8}, (Uint32,), uint32(i)))
push!(dynamic_libraries, name)
end
dynamic_libraries
end
shlib_list() |> x->filter(y->contains(y,"libz"), x) This should give the location of the "libz" found by julia. If that is the same as the one you found above, try dlopen("/usr/lib/libz.dylib") |
Ok. This results in:
However this fails:
Could it be that it wants the full path or something? |
I think that when I ran this on a Mac, I got "/usr/lib/libz.dylib", although I was on 10.7 (and I have to double check). @staticfloat, do you have any thoughts by chance? You're running Mavericks, right?
That shouldn't be the issue, Can you try a few more things: _zlib=dlopen("/usr/lib/libz.1.dylib")
bytestring(ccall((:zlibVersion, _zlib), Ptr{Uint8}, ()))
_zlib=dlopen("libz.1.dylib")
bytestring(ccall((:zlibVersion, _zlib), Ptr{Uint8}, ()))
_zlib=dlopen("libz.1")
bytestring(ccall((:zlibVersion, _zlib), Ptr{Uint8}, ())) I'm guessing that all of these will work, and I can check in a workaround, at least. |
Just one of them seemed to work.
|
Okay, I forgot that _zlib needed to be const. Can you verify that const _zlib=dlopen("/usr/lib/libz.1.dylib")
bytestring(ccall((:zlibVersion, _zlib), Ptr{Uint8}, ())) returns the zlib version number? |
No, ignore that. What I meant is const _zlib="/usr/lib/libz.1.dylib"
bytestring(ccall((:zlibVersion, _zlib), Ptr{Uint8}, ())) |
I've posted a message on julia-dev asking for some help: https://groups.google.com/forum/#!topic/julia-dev/_VjU63VTTSo |
Your last version outputs the version number.
|
@tfar Where is your |
@staticfloat it's from homebrew. |
Please try |
Ok. Did the update and reinstalled it with
|
@staticfloat, could llvm also be linking against libz, and could this be an issue? I think I saw something about that on a recent thread, though I don't remember the details. @tfar, assuming you just want to get work done, a simple workaround is to edit zlib_h.jl and set |
@tfar your In terminal 1, start up julia:
In terminal 2, after julia is started up, start intercepting julia's syscalls:
In terminal 1 again, tell julia to dlopen
In terminal 2 again, take a look at the output to see exactly what files julia is trying to open:
As you can see, in my case, |
@staticfloat this is what i get:
The last one appears to be fallback path I've set up, so it digs up LLVM runtime needed for some debugging tools.
If I unset this variable it finds Sorry for the inconvenience, and probably false bug report. |
That's really strange. I'm not sure why that would get rid of the defaults.
|
Some googling yielded http://stackoverflow.com/questions/3146274/is-it-ok-to-use-dyld-library-path-on-mac-os-x-and-whats-the-dynamic-library-s. The second comment under the accepted answer points to the Mac dlopen man page:
So it seems that when setting DYLD_FALLBACK_LIBRARY_PATH, you should include Cheers! Closing... |
or just GZip:
However libz is surely there:
The text was updated successfully, but these errors were encountered: