GLPK + Homebrew erros - Not properly installed / Key "10.14" not found / Build errors

Hi,

I am using Julia for my Operations Research studies, but have struggled for over 3 months getting it running locally and have to use the online JuliaBox service. I have now managed to finally get the atom-integration to run, but am now getting errors with “using GLPKMathProgInterface”. I am running on a Macbook Pro and have not been able to resolve the issue looking at other posts. See errors below:

I wrongly posted this to github issues and got the following response from odow:

Hi [@miqlliot]

Sorry to hear that you can’t install GLPK. I haven’t used JuliaPro, but try opening a new Julia REPL (from Atom: Packages>Julia>Open Terminal ). Then run Pkg.rm("GLPKMathProgInterface"); Pkg.add("GLPKMathProgInterface") .

If it doesn’t work, try downloading the standard version of Julia 0.6: https://julialang.org/downloads/oldreleases.html and see if Pkg.add("GLPKMathProgInterface") works.

I tried the first but got similar issues, then I tried to install an older version of Julia but then ran into ERROR: SystemError (with /Users/Lehmann/.julia/v0.6): mkdir: Permission denied when trying to add GLPKMathProgInterface.

Below are my original errors when I run Julia in the Atom interface:

Press Enter to start Julia. Starting Julia... _ _ _ _(_)_ | A fresh approach to technical computing (_) | (_) (_) | Documentation: https://docs.julialang.org _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _ | |
| | || | | | (| | | Version 0.6.2 (2017-12-13 18:08 UTC)
/ |_'|||_'_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin14.5.0
julia> 1+1
2
INFO: Precompiling module GLPK.
ERROR: LoadError: GLPK not properly installed. Please run Pkg.build("GLPK")
Stacktrace:
[1] error(::String) at ./error.jl:21
[2] include_from_node1(::String) at ./loading.jl:576
[3] include(::String) at ./sysimg.jl:14
[4] anonymous at ./:2
while loading /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/src/GLPK.jl, in expression starting on line 198
ERROR: LoadError: LoadError: LoadError: Failed to precompile GLPK to /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/lib/v0.6/GLPK.ji.
Stacktrace:
[1] (::Atom.##110#114{String,String})() at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/eval.jl:104
[2] withpath(::Atom.##110#114{String,String}, ::Void) at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/CodeTools/src/utils.jl:30
[3] withpath(::Function, ::String) at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/eval.jl:38
[4] hideprompt(::Atom.##109#113{String,String}) at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/repl.jl:65
[5] macro expansion at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/eval.jl:99 [inlined]
[6] (::Atom.##108#112{Dict{String,Any}})() at ./task.jl:80
while loading /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPKMathProgInterface/src/GLPKInterfaceBase.jl, inexpression starting on line 4
while loading /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPKMathProgInterface/src/GLPKMathProgInterface.jl, in expression starting on line 9
while loading untitled-4269eba7dfaf169855b6722bdc3ee139, in expression starting on line 2
julia> Pkg.build("GLPK")
INFO: Building Homebrew
Updated 1 tap (homebrew/core).
==> New Formulae
gitmoji healpix
==> Updated Formulae
python  libgosu
sqlite  liblcf
abyss libpqxx
akamai libqalculate
ansifilter libtensorflow
ark libtiff
awscli libtorrent-rasterbar
azure-cli libxlsxwriter
azure-storage-cpp libxml2
babel logstash
bdw-gc lumo
binutils lxc
bison metaproxy
bitcoin mitie
bitwarden-cli mkvtoolnix
boost mmseqs2
boost-bcp monero
boost-build mosquitto
boost-mpi mps-youtube
boost-python mpv
boost-python3 nanomsg
botan nasm
bowtie2 ncmpcpp
btfs netdata
buildifier netpbm
bundletool nginx
c10t odpi
calc open-scene-graph
cargo-completion openimageio
cclive opusfile
chakra osquery
checkstyle osrm-backend
chicken paket
chronograf pangomm
cling passenger
cmark-gfm pcl
confluent-oss pdal
convox pdftoedn
cpprestsdk php
cucumber-cpp php@7.1
dartsim pike
dash pipenv
dbhash pktanon
dmd pmd
docfx prettier
docker primesieve
docker-completion prometheus
docker-ls pulumi
doitlive py2cairo
dub py3cairo
duc quicktype
elasticsearch redis
emscripten rmlint
eslint ruby-build
exploitdb rust
fbi-servefiles scalaenv
ffmpeg scrcpy
firebase-cli selenium-server-standalone
folly sfcgal
fq shfmt
fswatch simple-amqp-client
gitversion sip
glslang skaffold
gnupg sngrep
gnuradio sops
golang-migrate source-highlight
goreleaser spotbugs
gowsdl sqldiff
gr-osmosdr sqlite-analyzer
graph-tool sqlmap
gtkmm3 sslscan
harfbuzz swimat
httpd sync_gateway
hugo syncthing
i2pd tectonic
influxdb termrec
inspircd tinyproxy
ios-webkit-debug-proxy tinyxml2
jabba tippecanoe
jdupes tmuxinator-completion
juju topgrade
kibana tox
kompose traefik
krakend tunnel
kubeless uhd
kubernetes-service-catalog-client upscaledb
landscaper vala
ledger vim@7.4
lgogdownloader vips
libbitcoin vnu
libbitcoin-blockchain wartremover
libbitcoin-client webpack
libbitcoin-database wesnoth
libbitcoin-explorer widelands
libbitcoin-network wskdeploy
libbitcoin-node xtensor
libbitcoin-protocol yank
libbitcoin-server yarn
libdill yle-dl
liberasurecode youtube-dl
libfabric
Uninstalling python... (3,593 files, 56.3MB)
===========================================================[ ERROR: Homebrew ]===========================================================

LoadError: KeyError: key "10.14" not found
while loading /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Homebrew/deps/build.jl, in expression starting on line 2

=========================================================================================================================================
INFO: Building GLPK
INFO: Attempting to create directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/downloads
INFO: Directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/downloads already exists
INFO: Downloading file http://ftp.gnu.org/gnu/glpk/glpk-4.61.tar.gz
INFO: Done downloading file http://ftp.gnu.org/gnu/glpk/glpk-4.61.tar.gz
INFO: Attempting to create directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/src
INFO: Directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/src already exists
INFO: Attempting to create directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps
INFO: Directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps already exists
INFO: Path /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/src/glpk-4.61 already exists
INFO: Attempting to create directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/builds/libglpk
INFO: Directory /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/builds/libglpk already exists
INFO: Changing directory to /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/builds/libglpk
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/src/glpk-4.61/install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking build system type... x86_64-apple-darwin18.0.0
checking host system type... x86_64-apple-darwin18.0.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin18.0.0 file names to x86_64-apple-darwin18.0.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin18.0.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @file support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... no
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... no
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin18.0.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for exp in -lm... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for gettimeofday... yes
checking gmp.h usability... no
checking gmp.h presence... no
checking for gmp.h... no
configure: error: gmp.h header not found
=============================================================[ ERROR: GLPK ]=============================================================

LoadError: failed process: Process(setenv(/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/src/glpk-4.61/configure --with-gmp --prefix=/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/usr,String["XPC_FLAGS=0x0", "PYTHON=/usr/bin/python", "PATH=/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/usr/bin:/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Homebrew/deps/usr/bin:/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Homebrew/deps/usr/sbin:/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/julia/Contents/Resources/julia/bin:/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/julia/Contents/Resources/julia/bin:/usr/bin:/bin:/usr/sbin:/sbin", "PWD=/", "NODE_PATH=/Applications/JuliaPro-0.6.2.2.app/Contents/MacOS/JuliaPro-Juno-0.6.2.2.app/Contents/Resources/JuliaPro-Juno-0.6.2.2/Contents/Resources/app.asar/exports", "JULIA_PKGDIR=/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2", "XPC_SERVICE_NAME=0", "JUPYTER=/Users/Lehmann/Library/Python/2.7/bin/jupyter", "SHELL=/bin/bash", "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0", "NODE_ENV=production", "TMPDIR=/var/folders/3z/jqrxjnrs415d6mt2w7t3s9680000gn/T/", "TK_LIBRARY=/System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Scripts", "HOMEBREW_CACHE=/Users/Lehmann/Library/Caches/Homebrew.jl/", "GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q", "FONTCONFIG_PATH=/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/julia/Contents/Resources/julia/etc/fonts", "CPPFLAGS= -I/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/usr/include -I/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/julia/Contents/Resources/julia//include", "LDFLAGS= -L/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/usr/lib -L/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/julia/Contents/Resources/julia//lib -Wl,-rpath -Wl,/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/usr/lib", "SHLVL=2", "LOGNAME=Lehmann", "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.OhZ4VfDIGd/Listeners", "ATOM_HOME=/Applications/JuliaPro-0.6.2.2.app/Contents/MacOS/../MacOS/JuliaPro-Juno-0.6.2.2.app/Contents/Resources/julia_atom_0.6.2.2", "PKG_CONFIG_PATH=/Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/usr/lib/pkgconfig", "_=/Applications/JuliaPro-0.6.2.2.app/Contents/MacOS/../MacOS/JuliaPro-Juno-0.6.2.2.app/Contents/Resources/JuliaPro-Juno-0.6.2.2/Contents/MacOS/Atom", "GADFLY_THEME=dark", "Apple_PubSub_Socket_Render=/private/tmp/com.apple.launchd.FLXMdY4qL5/Render", "USER=Lehmann", "JULIA_EDITOR=atom -a", "HOMEBREW_NO_AUTO_UPDATE=1", "HOME=/Users/Lehmann", "TERM=xterm", "JULIA_NUM_THREADS=2", "OPENBLAS_MAIN_FREE=1", "HOMEBREW_NO_ANALYTICS=1"]), ProcessExited(1)) [1]
while loading /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/GLPK/deps/build.jl, in expression starting on line54

=========================================================================================================================================

============================================================[ BUILD ERRORS ]=============================================================

WARNING: GLPK and Homebrew had build errors.

packages with build errors remain installed in /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6
build the package(s) and all dependencies with Pkg.build("GLPK", "Homebrew")
build a single package by running its deps/build.jl script
=========================================================================================================================================

ERROR: LoadError: UndefVarError: GLPKSolverLP not defined
Stacktrace:
[1] (::Atom.##110#114{String,String})() at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/eval.jl:104
[2] withpath(::Atom.##110#114{String,String}, ::Void) at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/CodeTools/src/utils.jl:30
[3] withpath(::Function, ::String) at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/eval.jl:38
[4] hideprompt(::Atom.##109#113{String,String}) at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/repl.jl:65
[5] macro expansion at /Applications/JuliaPro-0.6.2.2.app/Contents/Resources/pkgs-0.6.2.2/v0.6/Atom/src/eval.jl:99 [inlined]
[6] (::Atom.##108#112{Dict{String,Any}})() at ./task.jl:80
while loading untitled-4269eba7dfaf169855b6722bdc3ee139, in expression starting on line 18
julia>

That’s an alarming error. It sounds like something on your computer is in a very unusual state.

Try also Julia 1.0.

Hi Miles,

That is wierd, I can easily run other programming languages, i.e. python, R, LaTeX etc. And have never really experienced any problems with anything on my computer (Macbook). Only Julia keeps bugging on me.

Do you have any suggestions?

It install fine of my osx with v0.7.

The first error you get is when Homebrew try to build, so maybe try to run Pkg.build("Homebrew"), you might get a more detailed error message.

The Homebrew system is quite fragile, depending on what you installed before hand it might crash for several reasons.

One solution might be to install v0.7 and install GLPKMathProgInterface from that clean install, if it doesn’t work I would suspect something is strange with your system.

GLPK.jl no longer depends on Homebrew as of v0.8.0 (released two months ago). Not sure why an old version is getting picked up. It may be a JuliaPro issue.