Updating Package to 0.7 and issue with Libdl


#1

Hi all, I am trying to update some of the Mongo related packages, specifically the LibBSON one, and I am pretty confused as to how to deal with importing packages into my julia environment.

I have added the package from the package command prompt with add https://github.com/pazzo83/LibBSON.jl

This seems to add and build the package fine, however, when I go to load it in my julia prompt (i.e. using LibBSON), I get this error:

ERROR: LoadError: LoadError: ArgumentError: Package LibBSON does not have Libdl in its dependencies:
 - If you have LibBSON checked out for development and have
   added Libdl as a dependency but haven't updated your primary
   environment's manifest file, try `Pkg.resolve()`.
 - Otherwise you may need to report an issue with LibBSON.

Following the prompt, I run Pkg.resolve(), and this seemed to deal with that. However, as I push new commits to that repo (which i added earlier), upon running up LibBSON from the package command, it does not pick up the changes.
What am I doing wrong here?


#2

I think you meant to use dev instead of add? The docs say this about adding local packages:

The changes would have to be committed and the packages updated in order to pull in the changes.


#3

I do push the changes to the package, but maybe they won’t pick up updates to master even if you use add with the git url?


#4

they won’t pick up updates to master even if you use add with the git url?

I’m pretty sure that is the case (having to do with reproducibility and such). I’m not 100% sure.
I would try to explicitly update the package (using pkg> up <package_name>) and see if that fixes your issue. If it does fix your issue, then perhaps dev is more appropriate.


#5

ok i will give that a try - thanks!!


#6

Here is variation on the problem raised by the initial poster:

I seem to be having trouble with precompilation of packages having
Libdl as a dependency, under Julia 0.7. The problem occurs on my
mac. On my Ubuntu machine I have no problem.

For example, consider DataFrames; it depends on CodecZlib, which
in turn depends on Libdl. After a fresh 0.7 installation I do the following (session output appears below):

  1. Add CodecZlib succesfully but with a warning like the one in the original post.

  2. Add DataFrames without problems (but I think the warnings are now
    being supressed).

  3. using DataFrames triggers precompilation, which is apparently
    successful (ditto warnings).

  4. Restart the REPL and attempt using DataFrames but this time get
    the original warning and β€œβ€¦compilecache failed to create a usable
    precompiled cache file for DataFrames.”

  5. In every session using triggers re-precompilation on both
    DataFrames and CodecZlib and on anything involving Libdl, as
    far as I can tell.

While I don’t actually get errors, the forced precompilation of many
of my commonly used packages makes 0.7 unuseable from my point of
view.

julia> VERSION
v"0.7.0"

julia> Sys.MACHINE
"x86_64-apple-darwin14.5.0"

(v0.7) pkg> add CodecZlib
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [944b1d66] + CodecZlib v0.4.3
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [b99e7846] + BinaryProvider v0.4.0
  [944b1d66] + CodecZlib v0.4.3
  [34da2185] + Compat v1.0.1
  [3bb67fe8] + TranscodingStreams v0.5.4
  [2a0f44e3] + Base64 
  [ade2ca70] + Dates 
  [8bb1440f] + DelimitedFiles 
  [8ba89e20] + Distributed 
  [b77e0a4c] + InteractiveUtils 
  [76f85450] + LibGit2 
  [8f399da3] + Libdl 
  [37e2e46d] + LinearAlgebra 
  [56ddb016] + Logging 
  [d6f4376e] + Markdown 
  [a63ad114] + Mmap 
  [44cfe95a] + Pkg 
  [de0858da] + Printf 
  [3fa0cd96] + REPL 
  [9a3f8284] + Random 
  [ea8e919c] + SHA 
  [9e88b42a] + Serialization 
  [1a1011a3] + SharedArrays 
  [6462fe0b] + Sockets 
  [2f01184e] + SparseArrays 
  [10745b16] + Statistics 
  [8dfed614] + Test 
  [cf7118a7] + UUIDs 
  [4ec0a83e] + Unicode 

julia> using CodecZlib
[ Info: Recompiling stale cache file /Users/anthony/.julia/compiled/v0.7/CodecZlib/1TI30.ji for CodecZlib [944b1d66-785c-5afd-91f1-9de20f533193]
β”Œ Warning: Package CodecZlib does not have Libdl in its dependencies:
β”‚ - If you have CodecZlib checked out for development and have
β”‚   added Libdl as a dependency but haven't updated your primary
β”‚   environment's manifest file, try `Pkg.resolve()`.
β”‚ - Otherwise you may need to report an issue with CodecZlib
β”” Loading Libdl into CodecZlib from project dependency, future warnings for CodecZlib are suppressed.

(v0.7) pkg> add DataFrames
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [a93c6f00] + DataFrames v0.13.0
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [324d7699] + CategoricalArrays v0.3.13
  [a93c6f00] + DataFrames v0.13.0
  [9a8bc11e] + DataStreams v0.4.0
  [864edb3b] + DataStructures v0.11.0
  [682c06a0] + JSON v0.19.0
  [e1d29d7a] + Missings v0.2.10
  [189a3867] + Reexport v0.2.0
  [a2af1166] + SortingAlgorithms v0.3.1
  [2913bbd2] + StatsBase v0.25.0
  [ea10d353] + WeakRefStrings v0.5.1
  [9fa8497b] + Future 

julia> using DataFrames
[ Info: Recompiling stale cache file /Users/anthony/.julia/compiled/v0.7/DataFrames/AR9oZ.ji for DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]

julia> DataFrame()
0Γ—0 DataFrame

Now restarting the REPL:

julia> using DataFrames
[ Info: Recompiling stale cache file /Users/anthony/.julia/compiled/v0.7/DataFrames/AR9oZ.ji for DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
β”Œ Warning: Package CodecZlib does not have Libdl in its dependencies:
β”‚ - If you have CodecZlib checked out for development and have
β”‚   added Libdl as a dependency but haven't updated your primary
β”‚   environment's manifest file, try `Pkg.resolve()`.
β”‚ - Otherwise you may need to report an issue with CodecZlib
β”” Loading Libdl into CodecZlib from project dependency, future warnings for CodecZlib are suppressed.
β”Œ Warning: The call to compilecache failed to create a usable precompiled cache file for DataFrames [a93c6f00-e57d-5684-b7b6-d8193f3e46c0]
β”‚   exception = Required dependency CodecZlib [944b1d66-785c-5afd-91f1-9de20f533193] failed to load from a cache file.
β”” @ Base loading.jl:963
[ Info: Recompiling stale cache file /Users/anthony/.julia/compiled/v0.7/CodecZlib/1TI30.ji for CodecZlib [944b1d66-785c-5afd-91f1-9de20f533193]
β”Œ Warning: Package CodecZlib does not have Libdl in its dependencies:
β”‚ - If you have CodecZlib checked out for development and have
β”‚   added Libdl as a dependency but haven't updated your primary
β”‚   environment's manifest file, try `Pkg.resolve()`.
β”‚ - Otherwise you may need to report an issue with CodecZlib
β”” Loading Libdl into CodecZlib from project dependency, future warnings for CodecZlib are suppressed.

julia> 

#7

CodecZlib can do https://github.com/JuliaLinearAlgebra/Arpack.jl/pull/28 to fix this issue (edit: https://github.com/bicycle1885/CodecZlib.jl/pull/26).


#8

I’m not sure I understand what you did, but after updating my packages, everything is now working! Thanks!!!