# Updating Package to 0.7 and issue with Libdl

**URL:** <https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071>\
**Category:** Internals & Design\
**Created:** [June 29, 2018, 6:21pm UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071 "2018-06-29T18:21:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pazzo83](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pazzo83/32/232_2.png) [@pazzo83](https://discourse.julialang.org/u/pazzo83)\
**Post date:** [June 29, 2018, 6:21pm UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/1 "2018-06-29T18:21:48Z")

</div>

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:

```julia
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 `add`ed earlier), upon running `up LibBSON` from the package command, it does not pick up the changes.  
What am I doing wrong here?

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [June 29, 2018, 8:59pm UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/2 "2018-06-29T20:59:34Z")

</div>

I think you meant to use `dev` instead of `add`? The [docs](https://docs.julialang.org/en/latest/stdlib/Pkg/) say this about `add`ing local packages:

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

---

<div class="post-metadata">

**Author:** ![pazzo83](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pazzo83/32/232_2.png) [@pazzo83](https://discourse.julialang.org/u/pazzo83)\
**Post date:** [June 29, 2018, 9:11pm UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/3 "2018-06-29T21:11:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [June 29, 2018, 10:10pm UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/4 "2018-06-29T22:10:50Z")

</div>

> 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.

---

<div class="post-metadata">

**Author:** ![pazzo83](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/pazzo83/32/232_2.png) [@pazzo83](https://discourse.julialang.org/u/pazzo83)\
**Post date:** [June 29, 2018, 11:09pm UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/5 "2018-06-29T23:09:18Z")

</div>

ok i will give that a try - thanks!!

---

<div class="post-metadata">

**Author:** ![ablaom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ablaom/32/4889_2.png) [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Post date:** [August 9, 2018, 1:16am UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/6 "2018-08-09T01:16:51Z")

</div>

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
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
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> 

```

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [August 9, 2018, 1:26am UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/7 "2018-08-09T01:26:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ablaom](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ablaom/32/4889_2.png) [@ablaom](https://discourse.julialang.org/u/ablaom)\
**Post date:** [August 13, 2018, 7:09am UTC](https://discourse.julialang.org/t/updating-package-to-0-7-and-issue-with-libdl/12071/8 "2018-08-13T07:09:57Z")

</div>

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