Installing IHaskell kernel for jupyter notebooks -lgmp cannot be found by Linker










7














I'm trying to install IHaskell in jupyter, directly from instructions here.



I ran the following.



sudo apt-get install -y python3-pip git libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev 
git clone https://github.com/gibiansky/IHaskell
cd IHaskell
pip3 install -r requirements.txt
stack install gtk2hs-buildtools
# stack install --fast
# ihaskell install --stack
# jupyter labextension install ihaskell_jupyterlab


I got this error on the 5th command above, the gtk2hs-buildtools one:



(envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
/home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
`x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

-- While building simple Setup.hs using:
/home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
Process exited with code: ExitFailure 1


Some searching told me cannot find -lgmp is solved by:



$ sudo apt-get install libgmp3-dev


I did this. This installed successfully, but



(envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools


Still produces the same error. What's wrong and how do I fix it?



Update from scinart's suggestion



$ conda install gmp
Solving environment: done

## Package Plan ##

environment location: /home/me/anaconda3/envs/envname

added / updated specs:
- gmp


The following packages will be downloaded:

package | build
---------------------------|-----------------
openssl-1.0.2p | h470a237_1 3.1 MB conda-forge
ca-certificates-2018.10.15 | ha4d7672_0 135 KB conda-forge
certifi-2018.10.15 | py36_1000 138 KB conda-forge
gmp-6.1.2 | hfc679d8_0 676 KB conda-forge
------------------------------------------------------------
Total: 4.0 MB

The following packages will be UPDATED:

ca-certificates: 2018.03.07-0 --> 2018.10.15-ha4d7672_0 conda-forge
certifi: 2018.10.15-py36_0 --> 2018.10.15-py36_1000 conda-forge
openssl: 1.0.2p-h14c3975_0 --> 1.0.2p-h470a237_1 conda-forge

The following packages will be DOWNGRADED:

gmp: 6.1.2-h6c8ec71_1 --> 6.1.2-hfc679d8_0 conda-forge

Proceed ([y]/n)? y


Downloading and Extracting Packages
openssl-1.0.2p | 3.1 MB | ######################################################################################################################################################################################################## | 100%
ca-certificates-2018 | 135 KB | ######################################################################################################################################################################################################## | 100%
certifi-2018.10.15 | 138 KB | ######################################################################################################################################################################################################## | 100%
gmp-6.1.2 | 676 KB | ######################################################################################################################################################################################################## | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done


Looks good!



(envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
/home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
`x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

-- While building simple Setup.hs using:
/home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
Process exited with code: ExitFailure 1


Darn, same error as before.



So, from this, you can see I had the gmp package installed, and in fact had had a higher version. The issue seems to be that gmp cannot be found by the linker for some reason (even though it is there), so reinstalling gmp will not help.



Update 2



Another thing I tried was:




$ conda install gxx_linux-64



recommended here, also didn't work.



Update 3



This also looked like the same issue, resolved that way, but did not work for me.










share|improve this question




























    7














    I'm trying to install IHaskell in jupyter, directly from instructions here.



    I ran the following.



    sudo apt-get install -y python3-pip git libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev 
    git clone https://github.com/gibiansky/IHaskell
    cd IHaskell
    pip3 install -r requirements.txt
    stack install gtk2hs-buildtools
    # stack install --fast
    # ihaskell install --stack
    # jupyter labextension install ihaskell_jupyterlab


    I got this error on the 5th command above, the gtk2hs-buildtools one:



    (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
    Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
    /home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
    collect2: error: ld returned 1 exit status
    `x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

    -- While building simple Setup.hs using:
    /home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
    Process exited with code: ExitFailure 1


    Some searching told me cannot find -lgmp is solved by:



    $ sudo apt-get install libgmp3-dev


    I did this. This installed successfully, but



    (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools


    Still produces the same error. What's wrong and how do I fix it?



    Update from scinart's suggestion



    $ conda install gmp
    Solving environment: done

    ## Package Plan ##

    environment location: /home/me/anaconda3/envs/envname

    added / updated specs:
    - gmp


    The following packages will be downloaded:

    package | build
    ---------------------------|-----------------
    openssl-1.0.2p | h470a237_1 3.1 MB conda-forge
    ca-certificates-2018.10.15 | ha4d7672_0 135 KB conda-forge
    certifi-2018.10.15 | py36_1000 138 KB conda-forge
    gmp-6.1.2 | hfc679d8_0 676 KB conda-forge
    ------------------------------------------------------------
    Total: 4.0 MB

    The following packages will be UPDATED:

    ca-certificates: 2018.03.07-0 --> 2018.10.15-ha4d7672_0 conda-forge
    certifi: 2018.10.15-py36_0 --> 2018.10.15-py36_1000 conda-forge
    openssl: 1.0.2p-h14c3975_0 --> 1.0.2p-h470a237_1 conda-forge

    The following packages will be DOWNGRADED:

    gmp: 6.1.2-h6c8ec71_1 --> 6.1.2-hfc679d8_0 conda-forge

    Proceed ([y]/n)? y


    Downloading and Extracting Packages
    openssl-1.0.2p | 3.1 MB | ######################################################################################################################################################################################################## | 100%
    ca-certificates-2018 | 135 KB | ######################################################################################################################################################################################################## | 100%
    certifi-2018.10.15 | 138 KB | ######################################################################################################################################################################################################## | 100%
    gmp-6.1.2 | 676 KB | ######################################################################################################################################################################################################## | 100%
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done


    Looks good!



    (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
    Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
    /home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
    collect2: error: ld returned 1 exit status
    `x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

    -- While building simple Setup.hs using:
    /home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
    Process exited with code: ExitFailure 1


    Darn, same error as before.



    So, from this, you can see I had the gmp package installed, and in fact had had a higher version. The issue seems to be that gmp cannot be found by the linker for some reason (even though it is there), so reinstalling gmp will not help.



    Update 2



    Another thing I tried was:




    $ conda install gxx_linux-64



    recommended here, also didn't work.



    Update 3



    This also looked like the same issue, resolved that way, but did not work for me.










    share|improve this question


























      7












      7








      7







      I'm trying to install IHaskell in jupyter, directly from instructions here.



      I ran the following.



      sudo apt-get install -y python3-pip git libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev 
      git clone https://github.com/gibiansky/IHaskell
      cd IHaskell
      pip3 install -r requirements.txt
      stack install gtk2hs-buildtools
      # stack install --fast
      # ihaskell install --stack
      # jupyter labextension install ihaskell_jupyterlab


      I got this error on the 5th command above, the gtk2hs-buildtools one:



      (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
      Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
      /home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
      collect2: error: ld returned 1 exit status
      `x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

      -- While building simple Setup.hs using:
      /home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
      Process exited with code: ExitFailure 1


      Some searching told me cannot find -lgmp is solved by:



      $ sudo apt-get install libgmp3-dev


      I did this. This installed successfully, but



      (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools


      Still produces the same error. What's wrong and how do I fix it?



      Update from scinart's suggestion



      $ conda install gmp
      Solving environment: done

      ## Package Plan ##

      environment location: /home/me/anaconda3/envs/envname

      added / updated specs:
      - gmp


      The following packages will be downloaded:

      package | build
      ---------------------------|-----------------
      openssl-1.0.2p | h470a237_1 3.1 MB conda-forge
      ca-certificates-2018.10.15 | ha4d7672_0 135 KB conda-forge
      certifi-2018.10.15 | py36_1000 138 KB conda-forge
      gmp-6.1.2 | hfc679d8_0 676 KB conda-forge
      ------------------------------------------------------------
      Total: 4.0 MB

      The following packages will be UPDATED:

      ca-certificates: 2018.03.07-0 --> 2018.10.15-ha4d7672_0 conda-forge
      certifi: 2018.10.15-py36_0 --> 2018.10.15-py36_1000 conda-forge
      openssl: 1.0.2p-h14c3975_0 --> 1.0.2p-h470a237_1 conda-forge

      The following packages will be DOWNGRADED:

      gmp: 6.1.2-h6c8ec71_1 --> 6.1.2-hfc679d8_0 conda-forge

      Proceed ([y]/n)? y


      Downloading and Extracting Packages
      openssl-1.0.2p | 3.1 MB | ######################################################################################################################################################################################################## | 100%
      ca-certificates-2018 | 135 KB | ######################################################################################################################################################################################################## | 100%
      certifi-2018.10.15 | 138 KB | ######################################################################################################################################################################################################## | 100%
      gmp-6.1.2 | 676 KB | ######################################################################################################################################################################################################## | 100%
      Preparing transaction: done
      Verifying transaction: done
      Executing transaction: done


      Looks good!



      (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
      Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
      /home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
      collect2: error: ld returned 1 exit status
      `x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

      -- While building simple Setup.hs using:
      /home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
      Process exited with code: ExitFailure 1


      Darn, same error as before.



      So, from this, you can see I had the gmp package installed, and in fact had had a higher version. The issue seems to be that gmp cannot be found by the linker for some reason (even though it is there), so reinstalling gmp will not help.



      Update 2



      Another thing I tried was:




      $ conda install gxx_linux-64



      recommended here, also didn't work.



      Update 3



      This also looked like the same issue, resolved that way, but did not work for me.










      share|improve this question















      I'm trying to install IHaskell in jupyter, directly from instructions here.



      I ran the following.



      sudo apt-get install -y python3-pip git libtinfo-dev libzmq3-dev libcairo2-dev libpango1.0-dev libmagic-dev libblas-dev liblapack-dev 
      git clone https://github.com/gibiansky/IHaskell
      cd IHaskell
      pip3 install -r requirements.txt
      stack install gtk2hs-buildtools
      # stack install --fast
      # ihaskell install --stack
      # jupyter labextension install ihaskell_jupyterlab


      I got this error on the 5th command above, the gtk2hs-buildtools one:



      (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
      Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
      /home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
      collect2: error: ld returned 1 exit status
      `x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

      -- While building simple Setup.hs using:
      /home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
      Process exited with code: ExitFailure 1


      Some searching told me cannot find -lgmp is solved by:



      $ sudo apt-get install libgmp3-dev


      I did this. This installed successfully, but



      (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools


      Still produces the same error. What's wrong and how do I fix it?



      Update from scinart's suggestion



      $ conda install gmp
      Solving environment: done

      ## Package Plan ##

      environment location: /home/me/anaconda3/envs/envname

      added / updated specs:
      - gmp


      The following packages will be downloaded:

      package | build
      ---------------------------|-----------------
      openssl-1.0.2p | h470a237_1 3.1 MB conda-forge
      ca-certificates-2018.10.15 | ha4d7672_0 135 KB conda-forge
      certifi-2018.10.15 | py36_1000 138 KB conda-forge
      gmp-6.1.2 | hfc679d8_0 676 KB conda-forge
      ------------------------------------------------------------
      Total: 4.0 MB

      The following packages will be UPDATED:

      ca-certificates: 2018.03.07-0 --> 2018.10.15-ha4d7672_0 conda-forge
      certifi: 2018.10.15-py36_0 --> 2018.10.15-py36_1000 conda-forge
      openssl: 1.0.2p-h14c3975_0 --> 1.0.2p-h470a237_1 conda-forge

      The following packages will be DOWNGRADED:

      gmp: 6.1.2-h6c8ec71_1 --> 6.1.2-hfc679d8_0 conda-forge

      Proceed ([y]/n)? y


      Downloading and Extracting Packages
      openssl-1.0.2p | 3.1 MB | ######################################################################################################################################################################################################## | 100%
      ca-certificates-2018 | 135 KB | ######################################################################################################################################################################################################## | 100%
      certifi-2018.10.15 | 138 KB | ######################################################################################################################################################################################################## | 100%
      gmp-6.1.2 | 676 KB | ######################################################################################################################################################################################################## | 100%
      Preparing transaction: done
      Verifying transaction: done
      Executing transaction: done


      Looks good!



      (envname) me@machine:~/plc/IHaskell$ stack install gtk2hs-buildtools
      Linking /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4 ...
      /home/me/anaconda3/envs/envname/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: cannot find -lgmp
      collect2: error: ld returned 1 exit status
      `x86_64-conda_cos6-linux-gnu-cc' failed in phase `Linker'. (Exit code: 1)

      -- While building simple Setup.hs using:
      /home/me/.stack/programs/x86_64-linux/ghc-8.4.4/bin/ghc -rtsopts -threaded -clear-package-db -global-package-db -hide-all-packages -package base -main-is StackSetupShim.mainOverride -package Cabal-2.2.0.1 /home/me/.stack/setup-exe-src/setup-mPHDZzAJ.hs /home/me/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs -o /home/me/.stack/setup-exe-cache/x86_64-linux/tmp-Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.4
      Process exited with code: ExitFailure 1


      Darn, same error as before.



      So, from this, you can see I had the gmp package installed, and in fact had had a higher version. The issue seems to be that gmp cannot be found by the linker for some reason (even though it is there), so reinstalling gmp will not help.



      Update 2



      Another thing I tried was:




      $ conda install gxx_linux-64



      recommended here, also didn't work.



      Update 3



      This also looked like the same issue, resolved that way, but did not work for me.







      anaconda conda ld haskell-stack ihaskell






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 19 '18 at 1:14







      Mittenchops

















      asked Nov 3 '18 at 23:25









      MittenchopsMittenchops

      6,4042165137




      6,4042165137






















          2 Answers
          2






          active

          oldest

          votes


















          1














          For my purposes, i wanted IHaskell for jupyter to learn Haskell and take some notes while I did so. I also have conda via anaconda on my environment, used for other programming purpose, and got the same error you did above. So.... I set up a jupyter instance that was not based on conda, additionally and that seemed to do the trick.



          I then installed jupyter as a global binary. In my case of Ubuntu Linux it was with sudo apt install jupyter-notebook . I then selectively deactivated conda in just the terminal window I was on with conda deactivate ; export PATH=/usr/bin:$PATH.



          I also added a symlink to my local libgmp to make it more findable. I found that having a libgmp.so.3 symlink worked fine (even if it linked to a newer libgmp).



          $ sudo ldconfig -p | grep libgmp
          libgmp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so
          $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/libgmp.so.3
          $


          Then I downloaded stack from releases one with gmp (stack-1.9.3-linux-x86_64-gmp4.tar.gz) and put that in some directory, ~/apps/stack, that I added to to my $PATH , so i can invoke stack. From that point, with conda deactivated per command above, the instructions from IHaskell went smoother. I think i needed to add allow-newer: true for the optional stack install of gtk2hs-buildtools to work (YMMV).



          And that was it, the haskell kernel was installed and ready for use:



          $ which ihaskell
          /home/yuvilio/.local/bin/ihaskell
          $ ihaskell install --stack
          $ jupyter kernelspec list
          Available kernels:
          haskell /home/yuvilio/.local/share/jupyter/kernels/haskell
          ...
          $


          And then eureka, it worked. I just used my globally installed jupyter-notebook and jupyter-console (with conda disabled in that terminal, per above) and the haskell kernel was available and working just dandy:



          $ jupyter-console --kernel=haskell
          Jupyter console 5.2.0
          IHaskell 0.9.1.0 GHC 8.6.3
          In [1]: sum[1..5]
          :15
          In [2]: double x = x + x
          In [3]: double 3
          :6


          I'm sure there's a cleverer way to make IHaskell work with conda but it sounds like it was still in progress. The good thing about this setup is that on other terminal screens, my conda worked just fine as normal on other terminal sessions. This is not much of a production setup, but if you just want to make jupyter-notebooks with haskell content, this seems good enough to get going.






          share|improve this answer






























            0














            So, the problem is that /home/me/anaconda3/.../gcc/7.3.0/bin/ld: cannot find -lgmp



            According to conda document




            the compilers and linkers do not look for system headers and libraries



            it is recommended to use conda to install them. We are actively working to make sure that conda-forge also provides these tools.




            The homepage of conda-forge is https://conda-forge.org, usage is



            conda config --add channels conda-forge
            conda install gmp


            This gmp is the same version as debian/sid libgmp3-dev, and it should build libgmp.so, see this



            Hopefully it will work.






            share|improve this answer




















            • Thank you for your help. I tried this, but same error. I'll update the question with my output since it's clearer.
              – Mittenchops
              Nov 11 '18 at 22:08










            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53136410%2finstalling-ihaskell-kernel-for-jupyter-notebooks-lgmp-cannot-be-found-by-linker%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            For my purposes, i wanted IHaskell for jupyter to learn Haskell and take some notes while I did so. I also have conda via anaconda on my environment, used for other programming purpose, and got the same error you did above. So.... I set up a jupyter instance that was not based on conda, additionally and that seemed to do the trick.



            I then installed jupyter as a global binary. In my case of Ubuntu Linux it was with sudo apt install jupyter-notebook . I then selectively deactivated conda in just the terminal window I was on with conda deactivate ; export PATH=/usr/bin:$PATH.



            I also added a symlink to my local libgmp to make it more findable. I found that having a libgmp.so.3 symlink worked fine (even if it linked to a newer libgmp).



            $ sudo ldconfig -p | grep libgmp
            libgmp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so
            $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/libgmp.so.3
            $


            Then I downloaded stack from releases one with gmp (stack-1.9.3-linux-x86_64-gmp4.tar.gz) and put that in some directory, ~/apps/stack, that I added to to my $PATH , so i can invoke stack. From that point, with conda deactivated per command above, the instructions from IHaskell went smoother. I think i needed to add allow-newer: true for the optional stack install of gtk2hs-buildtools to work (YMMV).



            And that was it, the haskell kernel was installed and ready for use:



            $ which ihaskell
            /home/yuvilio/.local/bin/ihaskell
            $ ihaskell install --stack
            $ jupyter kernelspec list
            Available kernels:
            haskell /home/yuvilio/.local/share/jupyter/kernels/haskell
            ...
            $


            And then eureka, it worked. I just used my globally installed jupyter-notebook and jupyter-console (with conda disabled in that terminal, per above) and the haskell kernel was available and working just dandy:



            $ jupyter-console --kernel=haskell
            Jupyter console 5.2.0
            IHaskell 0.9.1.0 GHC 8.6.3
            In [1]: sum[1..5]
            :15
            In [2]: double x = x + x
            In [3]: double 3
            :6


            I'm sure there's a cleverer way to make IHaskell work with conda but it sounds like it was still in progress. The good thing about this setup is that on other terminal screens, my conda worked just fine as normal on other terminal sessions. This is not much of a production setup, but if you just want to make jupyter-notebooks with haskell content, this seems good enough to get going.






            share|improve this answer



























              1














              For my purposes, i wanted IHaskell for jupyter to learn Haskell and take some notes while I did so. I also have conda via anaconda on my environment, used for other programming purpose, and got the same error you did above. So.... I set up a jupyter instance that was not based on conda, additionally and that seemed to do the trick.



              I then installed jupyter as a global binary. In my case of Ubuntu Linux it was with sudo apt install jupyter-notebook . I then selectively deactivated conda in just the terminal window I was on with conda deactivate ; export PATH=/usr/bin:$PATH.



              I also added a symlink to my local libgmp to make it more findable. I found that having a libgmp.so.3 symlink worked fine (even if it linked to a newer libgmp).



              $ sudo ldconfig -p | grep libgmp
              libgmp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so
              $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/libgmp.so.3
              $


              Then I downloaded stack from releases one with gmp (stack-1.9.3-linux-x86_64-gmp4.tar.gz) and put that in some directory, ~/apps/stack, that I added to to my $PATH , so i can invoke stack. From that point, with conda deactivated per command above, the instructions from IHaskell went smoother. I think i needed to add allow-newer: true for the optional stack install of gtk2hs-buildtools to work (YMMV).



              And that was it, the haskell kernel was installed and ready for use:



              $ which ihaskell
              /home/yuvilio/.local/bin/ihaskell
              $ ihaskell install --stack
              $ jupyter kernelspec list
              Available kernels:
              haskell /home/yuvilio/.local/share/jupyter/kernels/haskell
              ...
              $


              And then eureka, it worked. I just used my globally installed jupyter-notebook and jupyter-console (with conda disabled in that terminal, per above) and the haskell kernel was available and working just dandy:



              $ jupyter-console --kernel=haskell
              Jupyter console 5.2.0
              IHaskell 0.9.1.0 GHC 8.6.3
              In [1]: sum[1..5]
              :15
              In [2]: double x = x + x
              In [3]: double 3
              :6


              I'm sure there's a cleverer way to make IHaskell work with conda but it sounds like it was still in progress. The good thing about this setup is that on other terminal screens, my conda worked just fine as normal on other terminal sessions. This is not much of a production setup, but if you just want to make jupyter-notebooks with haskell content, this seems good enough to get going.






              share|improve this answer

























                1












                1








                1






                For my purposes, i wanted IHaskell for jupyter to learn Haskell and take some notes while I did so. I also have conda via anaconda on my environment, used for other programming purpose, and got the same error you did above. So.... I set up a jupyter instance that was not based on conda, additionally and that seemed to do the trick.



                I then installed jupyter as a global binary. In my case of Ubuntu Linux it was with sudo apt install jupyter-notebook . I then selectively deactivated conda in just the terminal window I was on with conda deactivate ; export PATH=/usr/bin:$PATH.



                I also added a symlink to my local libgmp to make it more findable. I found that having a libgmp.so.3 symlink worked fine (even if it linked to a newer libgmp).



                $ sudo ldconfig -p | grep libgmp
                libgmp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so
                $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/libgmp.so.3
                $


                Then I downloaded stack from releases one with gmp (stack-1.9.3-linux-x86_64-gmp4.tar.gz) and put that in some directory, ~/apps/stack, that I added to to my $PATH , so i can invoke stack. From that point, with conda deactivated per command above, the instructions from IHaskell went smoother. I think i needed to add allow-newer: true for the optional stack install of gtk2hs-buildtools to work (YMMV).



                And that was it, the haskell kernel was installed and ready for use:



                $ which ihaskell
                /home/yuvilio/.local/bin/ihaskell
                $ ihaskell install --stack
                $ jupyter kernelspec list
                Available kernels:
                haskell /home/yuvilio/.local/share/jupyter/kernels/haskell
                ...
                $


                And then eureka, it worked. I just used my globally installed jupyter-notebook and jupyter-console (with conda disabled in that terminal, per above) and the haskell kernel was available and working just dandy:



                $ jupyter-console --kernel=haskell
                Jupyter console 5.2.0
                IHaskell 0.9.1.0 GHC 8.6.3
                In [1]: sum[1..5]
                :15
                In [2]: double x = x + x
                In [3]: double 3
                :6


                I'm sure there's a cleverer way to make IHaskell work with conda but it sounds like it was still in progress. The good thing about this setup is that on other terminal screens, my conda worked just fine as normal on other terminal sessions. This is not much of a production setup, but if you just want to make jupyter-notebooks with haskell content, this seems good enough to get going.






                share|improve this answer














                For my purposes, i wanted IHaskell for jupyter to learn Haskell and take some notes while I did so. I also have conda via anaconda on my environment, used for other programming purpose, and got the same error you did above. So.... I set up a jupyter instance that was not based on conda, additionally and that seemed to do the trick.



                I then installed jupyter as a global binary. In my case of Ubuntu Linux it was with sudo apt install jupyter-notebook . I then selectively deactivated conda in just the terminal window I was on with conda deactivate ; export PATH=/usr/bin:$PATH.



                I also added a symlink to my local libgmp to make it more findable. I found that having a libgmp.so.3 symlink worked fine (even if it linked to a newer libgmp).



                $ sudo ldconfig -p | grep libgmp
                libgmp.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libgmp.so
                $ sudo ln -s /usr/lib/x86_64-linux-gnu/libgmp.so /usr/lib/libgmp.so.3
                $


                Then I downloaded stack from releases one with gmp (stack-1.9.3-linux-x86_64-gmp4.tar.gz) and put that in some directory, ~/apps/stack, that I added to to my $PATH , so i can invoke stack. From that point, with conda deactivated per command above, the instructions from IHaskell went smoother. I think i needed to add allow-newer: true for the optional stack install of gtk2hs-buildtools to work (YMMV).



                And that was it, the haskell kernel was installed and ready for use:



                $ which ihaskell
                /home/yuvilio/.local/bin/ihaskell
                $ ihaskell install --stack
                $ jupyter kernelspec list
                Available kernels:
                haskell /home/yuvilio/.local/share/jupyter/kernels/haskell
                ...
                $


                And then eureka, it worked. I just used my globally installed jupyter-notebook and jupyter-console (with conda disabled in that terminal, per above) and the haskell kernel was available and working just dandy:



                $ jupyter-console --kernel=haskell
                Jupyter console 5.2.0
                IHaskell 0.9.1.0 GHC 8.6.3
                In [1]: sum[1..5]
                :15
                In [2]: double x = x + x
                In [3]: double 3
                :6


                I'm sure there's a cleverer way to make IHaskell work with conda but it sounds like it was still in progress. The good thing about this setup is that on other terminal screens, my conda worked just fine as normal on other terminal sessions. This is not much of a production setup, but if you just want to make jupyter-notebooks with haskell content, this seems good enough to get going.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited 2 days ago

























                answered 2 days ago









                yuvilioyuvilio

                2,5012531




                2,5012531























                    0














                    So, the problem is that /home/me/anaconda3/.../gcc/7.3.0/bin/ld: cannot find -lgmp



                    According to conda document




                    the compilers and linkers do not look for system headers and libraries



                    it is recommended to use conda to install them. We are actively working to make sure that conda-forge also provides these tools.




                    The homepage of conda-forge is https://conda-forge.org, usage is



                    conda config --add channels conda-forge
                    conda install gmp


                    This gmp is the same version as debian/sid libgmp3-dev, and it should build libgmp.so, see this



                    Hopefully it will work.






                    share|improve this answer




















                    • Thank you for your help. I tried this, but same error. I'll update the question with my output since it's clearer.
                      – Mittenchops
                      Nov 11 '18 at 22:08















                    0














                    So, the problem is that /home/me/anaconda3/.../gcc/7.3.0/bin/ld: cannot find -lgmp



                    According to conda document




                    the compilers and linkers do not look for system headers and libraries



                    it is recommended to use conda to install them. We are actively working to make sure that conda-forge also provides these tools.




                    The homepage of conda-forge is https://conda-forge.org, usage is



                    conda config --add channels conda-forge
                    conda install gmp


                    This gmp is the same version as debian/sid libgmp3-dev, and it should build libgmp.so, see this



                    Hopefully it will work.






                    share|improve this answer




















                    • Thank you for your help. I tried this, but same error. I'll update the question with my output since it's clearer.
                      – Mittenchops
                      Nov 11 '18 at 22:08













                    0












                    0








                    0






                    So, the problem is that /home/me/anaconda3/.../gcc/7.3.0/bin/ld: cannot find -lgmp



                    According to conda document




                    the compilers and linkers do not look for system headers and libraries



                    it is recommended to use conda to install them. We are actively working to make sure that conda-forge also provides these tools.




                    The homepage of conda-forge is https://conda-forge.org, usage is



                    conda config --add channels conda-forge
                    conda install gmp


                    This gmp is the same version as debian/sid libgmp3-dev, and it should build libgmp.so, see this



                    Hopefully it will work.






                    share|improve this answer












                    So, the problem is that /home/me/anaconda3/.../gcc/7.3.0/bin/ld: cannot find -lgmp



                    According to conda document




                    the compilers and linkers do not look for system headers and libraries



                    it is recommended to use conda to install them. We are actively working to make sure that conda-forge also provides these tools.




                    The homepage of conda-forge is https://conda-forge.org, usage is



                    conda config --add channels conda-forge
                    conda install gmp


                    This gmp is the same version as debian/sid libgmp3-dev, and it should build libgmp.so, see this



                    Hopefully it will work.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Nov 10 '18 at 17:33









                    scinartscinart

                    36516




                    36516











                    • Thank you for your help. I tried this, but same error. I'll update the question with my output since it's clearer.
                      – Mittenchops
                      Nov 11 '18 at 22:08
















                    • Thank you for your help. I tried this, but same error. I'll update the question with my output since it's clearer.
                      – Mittenchops
                      Nov 11 '18 at 22:08















                    Thank you for your help. I tried this, but same error. I'll update the question with my output since it's clearer.
                    – Mittenchops
                    Nov 11 '18 at 22:08




                    Thank you for your help. I tried this, but same error. I'll update the question with my output since it's clearer.
                    – Mittenchops
                    Nov 11 '18 at 22:08

















                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53136410%2finstalling-ihaskell-kernel-for-jupyter-notebooks-lgmp-cannot-be-found-by-linker%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

                    Crossroads (UK TV series)

                    ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế