Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libRmath-julia is not being installed in $JULIA_HOME./usr/lib #3

Closed
dmbates opened this issue Feb 10, 2014 · 19 comments · Fixed by JuliaLang/julia#6093
Closed

libRmath-julia is not being installed in $JULIA_HOME./usr/lib #3

dmbates opened this issue Feb 10, 2014 · 19 comments · Fixed by JuliaLang/julia#6093

Comments

@dmbates
Copy link

dmbates commented Feb 10, 2014

This may be a problem with the makefiles in the julia/deps directory and not with Rmath per se. After the change to the name libRmath-julia the shared object does not seem to be installed in the julia/usr/lib directory when compiling a clean version of julia. If I run

make install-Rmath

in the deps directory the file becomes available.

Check the Travis reports for the Distributions package for the error.

@dmbates
Copy link
Author

dmbates commented Feb 10, 2014

Perhaps the problem is more subtle. It seems that in julia/deps

make install-Rmath

installs the library in julia/usr/lib and then

make clean-Rmath

deletes it.

@ViralBShah
Copy link
Contributor

Isn't that the correct behaviour for clean-Rmath? I will try a clean build.

@dmbates
Copy link
Author

dmbates commented Feb 11, 2014

Perhaps I was wrong about make clean-Rmath being the culprit. In any case libRmath-julia.so is not in usr/lib after the build finishes on Ubuntu at least. As a result the Travis testing is failing for any package that uses a function in Distributions that relies on Rmath functions. See, e.g., StatsBase.jl

@ViralBShah
Copy link
Contributor

Are you using USE_SYSTEM_RMATH by any chance? Perhaps that is what is happening on travis. The library is certainly getting installed in usr/lib.

Cc: @staticfloat

@ViralBShah
Copy link
Contributor

There was a Makefile bug, I believe. Also, I am removing USE_SYSTEM_RMATH, as we use a patched Rmath.

@ViralBShah
Copy link
Contributor

Please reopen if still not addressed.

@ViralBShah
Copy link
Contributor

@staticfloat You may need to package libRmath-julia for travis.

@ViralBShah ViralBShah reopened this Feb 12, 2014
@staticfloat
Copy link

@ViralBShah Removing USE_SYSTEM_RMATH means that I can't package libRmath-julia. :P

That flag was only ever there to install our own version of librmath that was packaged via the julia-deps repo. I will update the package on the repo now, however, as it's a long-overdue update.

@staticfloat
Copy link

@ViralBShah In julia-deps, there is now a librmath-julia package. We should transition Julia to using this in the docs and such so that we can close JuliaLang/julia#4341

@ViralBShah
Copy link
Contributor

How about renaming USE_SYSTEM_RMATH to USE_SYSTEM_RMATH_JULIA or something so that people don't mistake it for the Rmath provided by R?

@staticfloat
Copy link

Sure, that could work.
-E

On Thu, Feb 13, 2014 at 6:00 PM, Viral B. Shah notifications@github.comwrote:

How about renaming USE_SYSTEM_RMATH to USE_SYSTEM_RMATH_JULIA or something
so that people don't mistake it for the Rmath provided by R?

Reply to this email directly or view it on GitHubhttps://github.com//issues/3#issuecomment-35048748
.

@sbos
Copy link

sbos commented Mar 7, 2014

I'm not sure if this is a right place for my problem, but my installation of Julia (fresh built by homebrew on osx) misses libRmath-julia and I get expected errors like

ERROR: error compiling rand: error compiling rand!: could not load module libRmath-julia: dlopen(libRmath-julia.dylib, 1): image not found

@ViralBShah
Copy link
Contributor

@staticfloat Perhaps we can avoid using system Rmath for homebrew builds?

@alyst
Copy link
Member

alyst commented Mar 15, 2014

I'm getting the same error as @sbos.
Please correct me, I believe it's because when Julia switched to not using system Rmath (see JuliaLang/julia@606b32ff), the conditional inclusion of Rmath-julia into JL_PRIVATE_LIBS was removed, but no unconditional inclusion was added. I've opened pull request JuliaLang/julia/pull/6093 to fix that. Is there a chance to merge it?

@staticfloat
Copy link

Hey there, sorry I've been incommunicado. I just did a fresh build of Homebrew julia and normal julia, and both worked fine, on a fresh OSX machine. How can I trigger this error?

@sbos
Copy link

sbos commented Mar 31, 2014

Right now, homebrew build is broken for me. When julia starts I see the message

Warning: error initializing module LinAlg:
ErrorException("could not load module libopenblas: dlopen(libopenblas.dylib, 1): image not found")

But the error mentioned here is triggered by running

using Distributions
rand(Binomial(3, 0.5))
ERROR: error compiling rand: could not load module libRmath-julia: dlopen(libRmath-julia.dylib, 1): image not found

@staticfloat
Copy link

Can you type otool -L /usr/local/lib/libopenblas.dylib? I'm assuming your homebrew installation is in /usr/local/, but if it's not, feel free to modify that line to get the output we're looking for. That command should print out the libraries that libopenblas wants to load, and we can then track down the reason we're not loading them.

@sbos
Copy link

sbos commented Apr 2, 2014

On my system, the only libopenblas found is the only one that had been installed by homebrew (is this a problem BTW?). It is located at /usr/local/Cellar/openblas64-julia/0.2.8/lib/libopenblas.dylib.

The output of otool is

/usr/local/Cellar/openblas64-julia/0.2.8/lib/libopenblas.dylib:
    /usr/local/opt/openblas64-julia/lib/libopenblas_sandybridgep-r0.2.8.dylib (compatibility version 0.0.0, current version 0.0.0)
    /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)
    /usr/local/Cellar/gfortran/4.8.2/gfortran/lib/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 2577.0.0)

@staticfloat
Copy link

@sbos I think I've managed to fix this problem. Please reinstall julia and try again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants