gcc "aarch64-linux-gnu" is not supported by julia package HDF5 - julia

i am trying to use HDF5 package in julia and i'm not succeeding,
i get the following error when trying to add it.
julia> Pkg.add("HDF5")
Updating registry at `~/.julia/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `~/.julia/environments/v1.0/Project.toml`
[no changes]
Updating `~/.julia/environments/v1.0/Manifest.toml`
[no changes]
and i get the following when building it.
julia> Pkg.build("HDF5")
Building CMake → `~/.julia/packages/CMake/nSK2r/deps/build.log`
Building Blosc → `~/.julia/packages/Blosc/lzFr0/deps/build.log`
Building HDF5 ─→ `~/.julia/packages/HDF5/Y9Znv/deps/build.log`
┌ Error: Error building `HDF5`:
│ ERROR: LoadError: Your platform ("aarch64-linux-gnu", parsed as "aarch64-linux-gnu-gcc4-cxx11") is not supported by this package!
│ Stacktrace:
│ [1] error(::String) at ./error.jl:33
│ [2] top-level scope at /home/nvidia/.julia/packages/HDF5/Y9Znv/deps/build.jl:35
│ [3] include at ./boot.jl:317 [inlined]
│ [4] include_relative(::Module, ::String) at ./loading.jl:1038
│ [5] include(::Module, ::String) at ./sysimg.jl:29
│ [6] include(::String) at ./client.jl:388
│ [7] top-level scope at none:0
│ in expression starting at /home/nvidia/.julia/packages/HDF5/Y9Znv/deps/build.jl:31
└ # Pkg.Operations ~/julia/usr/share/julia/stdlib/v1.0/Pkg/src/Operations.jl:1068
this is the gcc installed.
nvidia#tegra-ubuntu:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-linux-gnu/5/lto-wrapper
Target: aarch64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-5 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-arm64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-arm64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-arm64 --with-arch-directory=aarch64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-multiarch --enable-fix-cortex-a53-843419 --disable-werror --enable-checking=release --build=aarch64-linux-gnu --host=aarch64-linux-gnu --target=aarch64-linux-gnu
Thread model: posix
gcc version 5.4.0 20160609 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.11)
thanks for your help.

I had the same horrible trouble with Julia built on ARM. It seems that this dependence on custom binaries has been introduced in HDF5 v0.12. So for me it worked to force an older version of HDF5:
pkg> add HDF5#0.11.1
pkg> pin HDF5#0.11.1
Before, I have installed (in Debian/armhf) hdf5-tools, libhdf5-dev.
Hope this helps. But I think we shall inform the developers, as the HDF5 is a very important pkg (being used by JLD, without which the Julia is hardly usable), and restricting to a very small set of supported architectures is just stupid.

Related

Julia Can't Test User Packages

I have a Julia package I developed locally, let's call it mypack, and I can't automatically test it with Julia in pkg mode. Running pkg>test mypack gives me the following error:
(v1.3) pkg> test mypack
Updating registry at `~/.julia/environments/v1.3/registries/General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Testing mypack
Resolving package versions...
[ Info: No changes
Status `/tmp/jl_m6URie/Manifest.toml`
[4e168b6d] mypack v0.1.0 [`~/Documents/mypack`]
ERROR: LoadError: ArgumentError: Package Test not found in current path:
- Run `import Pkg; Pkg.add("Test")` to install the Test package.
Stacktrace:
[1] require(::Module, ::Symbol) at ./loading.jl:887
[2] include at ./boot.jl:328 [inlined]
[3] include_relative(::Module, ::String) at ./loading.jl:1105
[4] include(::Module, ::String) at ./Base.jl:31
[5] include(::String) at ./client.jl:424
[6] top-level scope at none:6
in expression starting at /home/myname/Documents/mypack/test/runtests.jl:1
ERROR: Package mypack errored during testing
My mypack project has the expected structure where there's a root directory with a Project.toml and Manifest.toml generated using ]generate mypack. /test/runtests.jl is just the line
using Test
This works on two machines that I've tested it on, one of which was using Julia 1.1 and one which was using Julia 1.2. The errors are happening on a new install of Julia 1.3.
I am able to test other packages (such as Statistics just fine, which I did to make sure Test was working). I have a more complicated project which brought this to my attention, but this mypack MWE is also broken.
When you run Pkg.test, Pkg creates a test environment. This environment consists of direct dependencies and test dependencies. Any dependency which is imported by test/runtests.jl needs to be in this test environment.
Because your test/runtests.jl imports the Test standard library, you need to add it as a test dependency. You can add test dependencies using this method: https://julialang.github.io/Pkg.jl/v1/creating-packages/#Test-specific-dependencies-in-Julia-1.0-and-1.1-1.

How to get Pkg in Julia 0.5? ("ERROR: unknown package Pkg")

I need to run a code written in Julia 0.5.
I installed this version on macOS and when I run
using Pkg
It returns the error:
ERROR: ArgumentError: Module Pkg not found in current path.
Run `Pkg.add("Pkg")` to install the Pkg package.
in require(::Symbol) at ./loading.jl:365
in require(::Symbol) at /Applications/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
When I run
Pkg.add("Pkg")
It returns
INFO: Initializing package repository /Users/henrique/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: unknown package Pkg
in macro expansion at ./pkg/entry.jl:53 [inlined]
in (::Base.Pkg.Entry.##2#5{String,Base.Pkg.Types.VersionSet})() at ./task.jl:360
in sync_end() at ./task.jl:311
in macro expansion at ./task.jl:327 [inlined]
in add(::String, ::Base.Pkg.Types.VersionSet) at ./pkg/entry.jl:51
in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}})() at ./pkg/dir.jl:31
in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#add,Tuple{String}}, ::String) at ./file.jl:59
in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31
How to get Pkg in Julia 0.5 then?
That is a very old version of Julia. It is strongly recommended to use a recent version, see the downloads page: https://julialang.org/downloads/. In 0.5 the Pkg module was available by default, so I'm not sure how using Pkg doesn't work. In general, if you're following recent instructions, they're not going to work on such an old version of the language.

How to use julia's PackageCompiler to build a quick launch environment for PlotStats?

I want to use 'DataFrames,CSV,StatsPlots' packages without waiting time after reboot machine, I'm trying to use PackageCompiler, but the README or help is hard to understand.
using using PackageCompiler
syso, sys = compile_incremental(:DataFrames,:CSV,:StatsPlots)
Well, I'm afraid to destroy the system image, so, at first, I don't use the 'force=true' option. It shows error messages:
...
Resolving package versions...
ERROR: LoadError: Unsatisfiable requirements detected for package WinRPM [c17dfb99]:
WinRPM [c17dfb99] log:
├─possible versions are: [0.3.3, 0.4.0-0.4.3] or uninstalled
├─restricted by compatibility requirements with PackageCompiler [9b87118b] to versions: [0.3.3, 0.4.0-0.4.3]
│ └─PackageCompiler [9b87118b] log:
│ ├─possible versions are: [0.5.0-0.5.1, 0.6.0-0.6.5] or uninstalled
│ └─restricted to versions * by an explicit requirement, leaving only versions [0.5.0-0.5.1, 0.6.0-0.6.5]
├─restricted by compatibility requirements with Compat [34da2185] to versions: 0.4.3 or uninstalled, leaving only versions: 0.4.3
│ └─Compat [34da2185] log:
│ ├─possible versions are: [1.0.0-1.0.1, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0-1.5.1, 2.0.0, 2.1.0, 2.2.0, 3.0.0, 3.1.0, 3.2.0] or uninstalled
│ └─restricted to versions 3.2.0 by an explicit requirement, leaving only versions 3.2.0
└─restricted by compatibility requirements with HTTPClient [0862f596] to versions: uninstalled — no versions left
└─HTTPClient [0862f596] log:
├─possible versions are: 0.2.1 or uninstalled
└─restricted by compatibility requirements with Compat [34da2185] to versions: uninstalled
└─Compat [34da2185] log: see above
It seems workable by PackageCompilerX. At first, the package's version is very sensitive, it require correct version to let everything work.
Here are two of my testing environment for julia 1.3.1
debian: apt -t unstable install julia libjulia-dev
archlinux: pacman -S julia
check Julia's version(PackageCompilerX only work after 1.3.1)
julia> versioninfo()
Julia Version 1.3.1
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Xeon(R) CPU # 2.20GHz
Add PackageCompilerX and all package which you want to plot to repository
pkg> add https://github.com/KristofferC/PackageCompilerX.jl
pkg> status
Status `~/.julia/environments/v1.3/Project.toml`
...
Copy system's Project.toml to current directory for customize your development environment, use editor(here vim) to remove some package which can't compile or not required.
shell> rm Project.toml
shell> cp ~/.julia/environments/v1.3/Project.toml .
shell> vim Project.toml
activate local package environment
julia> using PackageCompilerX
pkg> activate .
pkg> status # double check all package which you want have installed
Status `~/prj/julia/Project.toml`
[336ed68f] CSV v0.5.22
[a93c6f00] DataFrames v0.20.0
...
generated sybmol array automatically in julia prompt
s=split(read("Project.toml", String),"\n")
pkgs=Symbol[]
for i in s
if (length(i) > 0) && !(i[1] in ['[','#'])
push!(pkgs, Symbol(split(i," ")[1]))
end
end
show pkgs
julia> pkgs
10-element Array{Symbol,1}:
:CSV
:DataFrames
...
compile it and output to "dev.so" by
julia> create_sysimage(pkgs, sysimage_path="dev.so")
exit julia, and re-launch julia by
julia -J dev.so
Benchmark these two launch method and result:
time julia -q -e 'using Plots,UnicodePlots; unicodeplots(); display(plot(sin))'
# result: 35.175s
time julia -J dev.so -q -e 'using Plots,UnicodePlots; unicodeplots(); display(plot(sin))'
# result: 15.2365s

PowerModels and JuMP version conflict: Unsatisfiable requirements

I'm new to Julia. I wanted to test out some basic function calls in the PowerModels package with Julia 1.1.0 (it passed the Pkg.test()) so I wrote a few lines according to their tutorial:
using PowerModels
using Ipopt
using JuMP # example didn't have this line
run_ac_opf("case5.m", JuMP.with_optimizer(Ipopt.Optimizer))
I saved it as test1.jl, ran it on REPL with include("test1.jl") and got the following error:
julia> include("test1.jl")
ERROR: LoadError: UndefVarError: with_optimizer not defined
Stacktrace:
[1] include at .\boot.jl:326 [inlined]
[2] include_relative(::Module, ::String) at .\loading.jl:1038
[3] include(::Module, ::String) at .\sysimg.jl:29
[4] include(::String) at .\client.jl:403
[5] top-level scope at none:0
I'm not sure what's the cause for this error since when I tried both deleting the using JuMP and changing to using JuMP.with_optimizer, I still get the UndefVarError.
UPDATE
I tried ] rm JuMP and ] rm PowerModels, and added the latest v0.19.1 JuMP (I tried only removing my v0.18.5 JuMP but it conflicted with my installed PowerModels package. However, now when I try ] add PowerModels, it gives me the following error:
(v1.1) pkg> add PowerModels
Resolving package versions...
ERROR: Unsatisfiable requirements detected for package JuMP [4076af6c]:
JuMP [4076af6c] log:
├─possible versions are: 0.19.1 or uninstalled
├─JuMP [4076af6c] is fixed to version 0.19.1
└─found to have no compatible versions left with PowerModels [c36e90e8]
└─PowerModels [c36e90e8] log:
├─possible versions are: [0.1.0, 0.2.0-0.2.3, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.1, 0.6.0-0.6.1, 0.7.0-0.7.2, 0.8.0-0.8.8, 0.9.0-0.9.6] or uninstalled
└─restricted to versions * by an explicit requirement, leaving only versions [0.1.0, 0.2.0-0.2.3, 0.3.0-0.3.4, 0.4.0, 0.5.0-0.5.1, 0.6.0-0.6.1, 0.7.0-0.7.2, 0.8.0-0.8.8, 0.9.0-0.9.6]
This is what ] status gives me:
(v1.1) pkg> status
Status `C:\Users\me\.juliapro\JuliaPro_v1.1.0.1\environments\v1.1\Project.toml`
[c52e3926] Atom v0.8.5
[7073ff75] IJulia v1.18.1
[916415d5] Images v0.18.0
[4076af6c] JuMP v0.19.1 [`C:\Users\me\.julia\dev\JuMP`]
[e5e0dc1b] Juno v0.7.0
[91a5bcdd] Plots v0.24.0
[438e738f] PyCall v1.91.2
[d330b81b] PyPlot v2.8.1+ [`C:\Users\me\.julia\dev\PyPlot`]
Seems like I can only use v0.9.6 PowerModels, but according to its github page the stable release is now v0.10.0. Any suggestions?
SOLVED
JuliaPro was the problem. I installed the standalone Julia and was able to use both JuMP and PowerModels.

Dead kernel error when opening a notebook

I had to reinstall a newer version of Julia because the earlier version got broke. Having installed a newer version of Julia, I upgraded to the newer kernel on Jupyter; unfortunately, when I open an existing Julia notebook, the kernel automatically dies.
Following a suggestion from this link I issued this command
conda remove ipykernel
to resolve the problem; because I don't have sudo rights the following error was thrown:
CondaIOError: Missing write permissions in ...
Is there is a way to resolve this issue without creating a virtual environment?
Following your #xiaodai and #Przemyslaw Szufel suggestions, I'm halted by this error
using IJulia
[ Info: Precompiling IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a]
ERROR: LoadError: ArgumentError: Package ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
Stacktrace:
[1] _require(::Base.PkgId) at ./loading.jl:929
[2] require(::Base.PkgId) at ./loading.jl:858
[3] require(::Module, ::Symbol) at ./loading.jl:853
[4] include at ./boot.jl:326 [inlined]
[5] include_relative(::Module, ::String) at ./loading.jl:1038
[6] include(::Module, ::String) at ./sysimg.jl:29
[7] top-level scope at none:2
[8] eval at ./boot.jl:328 [inlined]
[9] eval(::Expr) at ./client.jl:404
[10] top-level scope at ./none:3
in expression starting at /storage/home/julia_depot/packages/IJulia/9ajf8/src/IJulia.jl:36
ERROR: Failed to precompile IJulia [7073ff75-c697-5162-941a-fcdaad2a7d2a] to /storage/home/julia_depot/compiled/v1.1/IJu
lia/nfu7T.ji.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1197
[3] _require(::Base.PkgId) at ./loading.jl:960
[4] require(::Base.PkgId) at ./loading.jl:858
[5] require(::Module, ::Symbol) at ./loading.jl:853
I have as suggested by the error message issued
Pkg.instantiate()
Also, I have tried
using ZMQ
ERROR: ArgumentError: Package ZMQ [c2297ded-f4af-51ae-bb23-16f91089e4e1] is required but does not seem to be installed:
- Run `Pkg.instantiate()` to install all recorded dependencies.
Although, ZMQ has been installed.
I have this happen to me often. You can try to follow #Przemyslaw's advice and remove the folders or try this
]update
]build IJulia
using IJulia
notebook()
Typically add builds the IJulia, but I find that sometimes after updating, running build manually can help resolve the dead kernel issue.
Use the Anaconda built-into Julia to start the jupyter notebook. In this way you will not have administrative rights nor configure virtual env to manage your Python installation.
julia> ]
(v1.0) pkg> add IJulia
julia> using IJulia
julia> notebook()
Actually you can also run the Julia Jupyter notebook outside of Julia console!
Windows (note that paths on your system might be different):
C:\> %userprofile%\.julia\packages\Conda\hsaaN\deps\usr\Scripts\jupyter-notebook
Linux (note that paths on your system might be different, this should also work on OSX):
$ ~/.julia/packages/Conda/hsaaN/deps/usr/bin/jupyter notebook

Resources