PROBLEMS WITH BuildExecutable in linux ubuntu


#1

There is a problem with missing <julia.h> file when running
build_executable(“test”,file_main,taget,“natove”,force=true)

The file exist in the /julia/src/ folder
yet the command (through the file start_func.c)
look for the file in the folder where the file located,
/tmp/tmp_folder_specific

the error message
" running: gcc -g `` -I/usr/include/julia -I/src -I/src/support -I/usr/include /tmp/tmpqG1ttJ/start_func.c -o /usr/bin/test -Wl,-rpath,/usr/lib/x86_64-linux-gnu/julia -L/usr/lib/x86_64-linux-gnu/julia -ljulia -ltest

/tmp/tmpqG1ttJ/start_func.c:1:19: fatal error: julia.h: No such file or directory
compilation terminated.

ERROR: failed process: Process(setenv(`gcc -g -I/usr/include/julia -I/src -I/src/support -I/usr/include /tmp/tmpqG1ttJ/start_func.c -o /usr/bin/test -Wl,-rpath,/usr/lib/x86_64-linux-gnu/julia -Wl,-rpath,/usr/lib/x86_64-linux-gnu/julia/julia -L/usr/lib/x86_64-linux-gnu/julia -ljulia -ltest`,Union{ASCIIString,UTF8String}["LC_PAPER=he_IL.UTF-8","LC_ADDRESS=he_IL.UTF-8","LC_MONETARY=he_IL.UTF-8","SHELL=/bin/bash","TERM=xterm-256color","LC_NUMERIC=he_IL.UTF-8","USER=root","LC_TELEPHONE=he_IL.UTF-8","LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:","SUDO_USER=ophir74","SUDO_UID=1000","USERNAME=root","MAIL=/var/mail/root","PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin","LC_IDENTIFICATION=he_IL.UTF-8","PWD=/home/ophir74","LANG=en_US.UTF-8","LC_MEASUREMENT=he_IL.UTF-8","SHLVL=1","SUDO_COMMAND=/bin/bash","HOME=/home/ophir74","LANGUAGE=en_US","LOGNAME=root","LESSOPEN=| /usr/bin/lesspipe %s","SUDO_GID=1000","DISPLAY=:0","LESSCLOSE=/usr/bin/lesspipe %s %s","LC_TIME=he_IL.UTF-8","XAUTHORITY=/home/ophir74/.Xauthority","LC_NAME=he_IL.UTF-8","_=/usr/bin/julia","OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
 in build_executable at /home/ophir74/.julia/v0.4/BuildExecutable/src/BuildExecutable.jl:143"

#2

You may have better luck with a newer version, and please don’t post the same thing in multiple places:


#3

thanks, i always ask in various places
The poeple there are not the poeple in this website

That’s site about julia
yet also in other places, poeple might help

about the reply
"You may have better luck with a newer version,"
The commnad in julia 0.6 also did not work

There, also the problem is with the paths
There the error is a bit different
The issue just appeared with build-exectuable, where other packages worked (Roots, NLopt, etc)

The error
"running: /media/ophir74/unix/julia/julia_2040/bin/julia /home/ophir74/.julia/v0.6/BuildExecutable/src/build_sysimg.jl /media/ophir74/unix/julia/julia_2040/lib/libtest native /tmp/tmpTZ3Z1b/userimg.jl --force
ERROR: LoadError: 
UndefVarError: @unix_only not defined
Stacktrace:



include_from_node1(::String) at ./loading.jl:569
 [2] include(::String) at ./sysimg.jl:14
 [3] process_options(::Base.JLOptions) at ./client.jl:305
 [4] _start() at ./client.jl:371
while loading /home/ophir74/.julia/v0.6/BuildExecutable/src/build_sysimg.jl, in expression starting on line 8
  
failed process: Process(setenv(`/media/ophir74/unix/julia/julia_2040/bin/julia /home/ophir74/.julia/v0.6/BuildExecutable/src/build_sysimg.jl /media/ophir74/unix/julia/julia_2040/lib/libtest native /tmp/tmpTZ3Z1b/userimg.jl --force`,String["ATOM_HOME=/home/ophir74/.atom", "NODE_PATH=/media/ophir74/unix/usr/share/atom/resources/app/exports", "NODE_ENV=production", "LC_PAPER=he_IL.UTF-8", "XDG_VTNR=7", "LC_ADDRESS=he_IL.UTF-8", "XDG_SESSION_ID=c2", "CLUTTER_IM_MODULE=xim", "XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/ophir74", "LC_MONETARY=he_IL.UTF-8", "GIO_LAUNCHED_DESKTOP_FILE_PID=2173", "SESSION=ubuntu", "GPG_AGENT_INFO=/home/ophir74/.gnupg/S.gpg-agent:0:1", "XDG_MENU_PREFIX=gnome-", "SHELL=/bin/bash", "QT_LINUX_ACCESSIBILITY_ALWAYS_ON=1", "LC_NUMERIC=he_IL.UTF-8", "UPSTART_SESSION=unix:abstract=/com/ubuntu/upstart-session/1000/1764", "GNOME_KEYRING_CONTROL=", "GTK_MODULES=gail:atk-bridge:unity-gtk-module", "USER=ophir74", "LS_COLORS=", "QT_ACCESSIBILITY=1", "LC_TELEPHONE=he_IL.UTF-8", "XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0", "XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0", "SSH_AUTH_SOCK=/run/user/1000/keyring/ssh", "SESSION_MANAGER=local/ophir74-Aspire-V5-561G:@/tmp/.ICE-unix/2012,unix/ophir74-Aspire-V5-561G:/tmp/.ICE-unix/2012", "DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path", "GIO_LAUNCHED_DESKTOP_FILE=/etc/xdg/autostart/nautilus-autostart.desktop", "XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg", "GOOGLE_API_KEY=AIzaSyAQfxPJiounkhOjODEO5ZieffeBv6yft2Q", "PATH=/home/ophir74/bin:/home/ophir74/.local/bin:/home/ophir74/bin:/home/ophir74/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/snap/bin", "DESKTOP_SESSION=ubuntu", "QT_IM_MODULE=ibus", "QT_QPA_PLATFORMTHEME=appmenu-qt5", "LC_IDENTIFICATION=he_IL.UTF-8", "JOB=dbus", "PWD=/media/ophir74/unix/usr/share/atom", "XDG_SESSION_TYPE=x11", "XMODIFIERS=@im=ibus", "LANG=en_US.UTF-8", "GNOME_KEYRING_PID=", "GDM_LANG=en_US", "MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path", "LC_MEASUREMENT=he_IL.UTF-8", "IM_CONFIG_PHASE=1", "COMPIZ_CONFIG_PROFILE=ubuntu", "GDMSESSION=ubuntu", "GTK2_MODULES=overlay-scrollbar", "SESSIONTYPE=gnome-session", "HOME=/home/ophir74", "SHLVL=1", "XDG_SEAT=seat0", "LANGUAGE=en_US", "GNOME_DESKTOP_SESSION_ID=this-is-deprecated", "LIBGL_ALWAYS_SOFTWARE=1", "XDG_SESSION_DESKTOP=ubuntu", "LOGNAME=ophir74", "XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/:/var/lib/snapd/desktop", "DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-m4ppilflKH", "QT4_IM_MODULE=xim", "LESSOPEN=| /usr/bin/lesspipe %s", "INSTANCE=", "DISPLAY=:0", "XDG_RUNTIME_DIR=/run/user/1000", "XDG_CURRENT_DESKTOP=Unity", "GTK_IM_MODULE=ibus", "LESSCLOSE=/usr/bin/lesspipe %s %s", "LC_TIME=he_IL.UTF-8", "LC_NAME=he_IL.UTF-8", "XAUTHORITY=/home/ophir74/.Xauthority", "_=/usr/bin/env", "JULIA_NUM_THREADS=1", "OPENBLAS_MAIN_FREE=1"]), ProcessExited(1)) [1]
pipeline_error(::Base.Process) at process.jl:682
run(::Cmd) at process.jl:651
#build_executable#1(::Bool, ::Bool, ::Function, ::String, ::String, ::String, ::String) at BuildExecutable.jl:137
build_executable(::String, ::String, ::String, ::String) at BuildExecutable.jl:57
include_string(::String, ::String) at loading.jl:515
eval(::Module, ::Any) at boot.jl:235
(::Atom.##61#64)() at eval.jl:102
withpath(::Atom.##61#64, ::Void) at utils.jl:30
withpath(::Function, ::Void) at eval.jl:38
macro expansion at eval.jl:101 [inlined]
(::Atom.##60#63{Dict{String,Any}})() at task.jl:80"

#4

That’s not true. The people answering julia-lang questions on StackOverflow are almost all active here as well. It is annoying to see the question twice and unproductive to have two separate threads of discussion. Please pick one.

Also, quote code and logs using ``` (triple backtick)

UndefVarError: @unix_only not defined

Try Pkg.checkout("BuildExecutable")


#5

THANKS, the result from the
Pkg.checkout("BuildExecutable")

in checkout at base/pkg/pkg.jl:188
in #checkout#1 at base/pkg/pkg.jl:188
in #cd#1 at base/pkg/dir.jl:36
in cd at base/file.jl:70
in #4 at base/pkg/dir.jl:36
in checkout at base/pkg/entry.jl:226
in with at base/libgit2/types.jl:608
in transact at base/libgit2/libgit2.jl:882
in #16 at base/pkg/entry.jl:228```

where the ```Pkg.status()``` showed
```6 required packages:
 - Atom                          0.6.0
 - BuildExecutable               0.1.2              e0de9f63 (dirty)
 - NLopt                         0.3.4
 - PolynomialRoots               0.1.0
 - ReadWriteDlm2                 0.5.0
 - Roots                         0.4.0
52 additional packages:
 - ASTInterpreter                0.0.4
 - AbstractTrees                 0.0.4
 - ArgParse                      0.5.0
 - BinDeps                       0.6.0
 - Blink                         0.5.3
 - COFF                          0.0.2
 - CRC                           1.2.0
 - CodeTools                     0.4.6
 - Codecs                        0.3.0
 - ColorTypes                    0.5.1
 - Colors                        0.7.3
 - CommonSubexpressions          0.0.1
 - Compat                        0.26.0
 - DWARF                         0.1.0
 - DataStructures                0.5.3
 - DiffBase                      0.2.0
 - ELF                           0.1.0
 - FileIO                        0.4.1
 - FixedPointNumbers             0.3.8
 - ForwardDiff                   0.5.0
 - Gallium                       0.0.4
 - Hiccup                        0.1.1
 - HttpCommon                    0.2.7
 - HttpParser                    0.2.0
 - HttpServer                    0.2.0
 - JSON                          0.12.0
 - JuliaParser                   0.7.4
 - Juno                          0.3.0
 - LNR                           0.0.2
 - Lazy                          0.11.7
 - MachO                         0.0.4
 - MacroTools                    0.3.7
 - MathProgBase                  0.6.4
 - MbedTLS                       0.4.5
 - Media                         0.3.0
 - Mustache                      0.1.4
 - Mux                           0.2.3
 - NaNMath                       0.2.5
 - ObjFileBase                   0.0.4
 - Reactive                      0.5.2
 - RealInterface                 0.0.2
 - Reexport                      0.0.3
 - SHA                           0.3.3
 - SpecialFunctions              0.1.1
 - StaticArrays                  0.5.1
 - StructIO                      0.0.2
 - TerminalUI                    0.0.2
 - TextWrap                      0.2.0
 - Tokenize                      0.1.8
 - URIParser                     0.1.8
 - VT100                         0.1.0
 - WebSockets                    0.2.3  ```

about the "where to work",
working in various places just increase the applicability  
of the software (stack overflow is much larger site yet this is more professional on julia issues)
*** i will write on thread that solved the problem in the other thread
*** my goal is to work with the build_exectuable with unix (it worked on windows) rather than to ask questions on different sites

#6

If you do that, then at the minimum you should mention that you posted in two different places, and give the link to the other post so that people can check what has already been said. But really, this is strongly discouraged in most forums.


#7

I solved the problem. it was problem of permissions that got messier. and it was problem that in ubuntu the julia version doesn’t upgrade through the regular command: sudo apt-get dist-upgrade julia and that build_executable work just on recent julia versions

The solution (1) uninstall ubuntu (2) re install ubutu (3) download julia from the website , rather than through the terminal (that presented just the 0.4.5 julia version and doesn’t upgrade) (4) open terminal in the folder of the extracted julia, enter the full path of the folder and then continue to the “bin/julia” and press enter to work with the 0.6.0 version (5) Pkg.add(“BuildExectuable”)

Just what i tried from the list with many (that might help others, the valubale issues were) (1) Pkg.checkout(“BuildExecutable”) showed that there is problem with paths (2) Pkg.free(“BuildExecutable”) Pkg.rm(“BuildExecutable”) did progress a bit the issue showing that the problem is with the version of Julia (3) after various steps the disk showed full. all the clean commands including fsck -P in recovery mode after boot did not work, and I unistall ubuntu