JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.43k stars 5.45k forks source link

Make install creates broken links in /usr/lib/julia/ #908

Closed jmarino closed 12 years ago

jmarino commented 12 years ago

In my Arch linux box julia is installed with 2 broken links:

$ ls -l /usr/lib/julia/{base,extras} lrwxrwxrwx 1 root root 48 May 30 14:18 base -> /tmp/yaourt-tmp-jos/aur-julia-git/src/julia/base lrwxrwxrwx 1 root root 50 May 30 14:18 extras -> /tmp/yaourt-tmp-jos/aur-julia-git/src/julia/extras

The folder /tmp/yaourt-tmp-jos/aur-julia-git/ is a temporary folder where julia was built from source.

The broken links are copied by "make install", which copies the contens of lib/julia with cp -r. Adding a -L option to the cp command would fix the issue.

(edit: deleted patch, I couldn't get it to format properly)

jmarino commented 12 years ago

After a quick review of the markdown format, here's the patch:

--- Makefile.orig   2012-06-01 14:14:25.369748683 -0400
+++ Makefile    2012-06-01 14:14:53.311746761 -0400
@@ -41,7 +41,7 @@
    mkdir -p $(PREFIX)/{sbin,bin,etc,lib/julia,share/julia}
    cp $(BUILD)/bin/*julia* $(PREFIX)/bin
    cd $(PREFIX)/bin && ln -s julia-release-$(DEFAULT_REPL) julia
-   cp -r $(BUILD)/lib/julia/* $(PREFIX)/lib/julia
+   cp -rL $(BUILD)/lib/julia/* $(PREFIX)/lib/julia
    -cp $(BUILD)/lib/lib{Rmath,amd,amos,arpack,cholmod,colamd,fdm,fftw3,fftw3f,fftw3_threads,fftw3f_threads,glpk,glpk_wrapper,gmp,gmp_wrapper,grisu,history,julia-release,openblas,pcre,random,readline,suitesparse_wrapper,umfpack}.$(SHLIB_EXT) $(PREFIX)/lib
 # Web-REPL stuff
    -cp $(BUILD)/lib/mod* $(PREFIX)/lib