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

ihaskell-inline-r: unhandled ELF relocation error on initialization #331

Open
MMesch opened this issue Jul 26, 2018 · 0 comments
Open

ihaskell-inline-r: unhandled ELF relocation error on initialization #331

MMesch opened this issue Jul 26, 2018 · 0 comments

Comments

@MMesch
Copy link

MMesch commented Jul 26, 2018

when this cell from the ihaskell-inline-r tutorial notebook

import qualified H.Prelude as H
H.initialize H.defaultConfig

is executed, the kernel crashes with an unhandled ELF relocation error.

[I 13:01:19.673 NotebookApp] Starting buffering for 40c8b7e3-1274-4d9d-848c-833849772c61:d83e18f345a24386a5fd27413041e783
ihaskell: /home/jovyan/HaskellR/.stack-work/install/x86_64-linux/lts-10.2/8.2.2/lib/x86_64-linux-ghc-8.2.2/inline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ/libHSinline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ.a: unhandled ELF relocation(RelA) type 42

ihaskell: /home/jovyan/HaskellR/.stack-work/install/x86_64-linux/lts-10.2/8.2.2/lib/x86_64-linux-ghc-8.2.2/inline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ/libHSinline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ.a: unknown symbol `isRInitialized'
ihaskell: ^^ Could not load 'inlinezmrzm0zi9zi2zmL1KdC8sOsmwVIDNVdfxkQ_LanguageziRziInstance_defaultConfig_closure', dependency unresolved. See top entry above.

ihaskell: /home/jovyan/HaskellR/.stack-work/install/x86_64-linux/lts-10.2/8.2.2/lib/x86_64-linux-ghc-8.2.2/inline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ/libHSinline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ.a: unhandled ELF relocation(RelA) type 42

ihaskell: /home/jovyan/HaskellR/.stack-work/install/x86_64-linux/lts-10.2/8.2.2/lib/x86_64-linux-ghc-8.2.2/inline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ/libHSinline-r-0.9.2-L1KdC8sOsmwVIDNVdfxkQ.a: unhandled ELF relocation(RelA) type 42

ihaskell: 
[I 13:01:28.076 NotebookApp] KernelRestarter: restarting kernel (1/5), keep random ports
WARNING:root:kernel b18f0a81-2092-4dbd-8bae-1b31708b8e2f restarted

reproduce

(a) build the following Dockerfile [docker build -t haskellr:latest .]
(b) run the image [docker run -it -p 8888:8888 haskellr:latest]
(c) open /HaskellR/IHaskell/examples/tutorial-ihaskell-inline-r.ipynb and execute the first two cells

FROM fpco/stack-build:lts-11.17

# Install all necessary Ubuntu packages
RUN apt-get update && apt-get install -y python3-pip libgmp-dev libmagic-dev libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libblas-dev liblapack-dev gcc g++ r-base r-base-core && \
    rm -rf /var/lib/apt/lists/*

RUN R -e "install.packages(c('ggplot2'), repos='http://cran.rstudio.com/')"

# Install Jupyter notebook
RUN pip3 install -U jupyter

# setup the haskell environment
ENV LANG en_US.UTF-8
ENV NB_USER jovyan
ENV NB_UID 1000
ENV HOME /home/${NB_USER}

RUN adduser --disabled-password \
    --gecos "Default user" \
    --uid ${NB_UID} \
    ${NB_USER}

# Set up a working directory for HaskellR
WORKDIR ${HOME}

USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_UID}

RUN git clone https://github.com/tweag/HaskellR.git

WORKDIR ${HOME}/HaskellR

USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_UID}

RUN stack setup
RUN stack build && stack install
RUN stack exec -- ihaskell install --stack

USER root
RUN chown -R ${NB_UID} ${HOME}
USER ${NB_UID}

EXPOSE 8888

# Run the notebook
CMD ["stack", "exec", "--", "jupyter", "notebook", "--ip", "0.0.0.0"]
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

No branches or pull requests

1 participant