0

I want to install Cilk on my linux machine (Ubuntu 12.04 LTS), in README file they said that I need to have glibc on my machine, I downloaded the 2.16 version, and after many attempts to install it, I messed up some files by installing even though I had numerous errors in make check (after many failing attempts to solve them, I installed anyway). Now that I re-installed Ubuntu on my machine, can I compile and build glibc code without installing it on the machine (do everything until make check without make install), but when building Cilk, can I tell it to use the glibc folder (already compiled and built) that I have on Desktop for example?

hakuna matata
  • 3,243
  • 13
  • 56
  • 93

1 Answers1

1

Manually upgrading the glibc on Ubuntu is probably going to break a lot of things. First, setting up the right build environment is not trivial and installing a broken glibc will hose your system (as you have seen by now). Second, installing files over top of an Ubuntu/Debian package, may break the package manager in the future when it goes to upgrade packages.

The best solution would be to create a mini-environment with the upgraded libc. Linux from Scratch does just that. You could follow those instructions until you have the libc installed and then install Click into that environment. What's important to note is that LFS causes everything to live in a separate directory. So, you still install the libc, just not in /, but in a little jail (LFS uses /static, you might prefer /opt/clik).

One last thought: have you tried compiling Clik on the glibc 2.15 included with Ubuntu? Ubuntu tends to backport features, so Ubuntu's 2.15 likely has features from 2.16, just not all of them.

apmasell
  • 7,033
  • 19
  • 28
  • I searched on how to check my glibc version, i found a code that check the gnu library but the thing is i dont have a gnu folder in '/' thats when i said I want to install it – hakuna matata Aug 20 '12 at 15:18
  • I noticed something, when I was checking the NPTL (Native POSIX Thread Library) bcuase it was needed for glibc, I had the version 2.15, is this the glibc, or this is different? Is this why you suggested to try glibc 2.15 since they should be the same version? – hakuna matata Aug 20 '12 at 17:12
  • The glibc is installed via the Ubuntu package `libc6` and the development headers are in `libc6-dev`. It is very, very unusual to have to install a new glibc. NPTL is more-or-less part of the glibc. It will have the same version. Have you even tried compiling Clik using the built-in glibc? – apmasell Aug 20 '12 at 19:48
  • I've tried it before, like 3 or 4 months ago but it didn't work, and now I want to install it, so I though might as well check the prerequisites first – hakuna matata Aug 20 '12 at 20:25
  • Then you almost certainly do not need to install a separate `glibc`. You should just use the default `glibc` provided by the system. – apmasell Aug 21 '12 at 00:17
  • I installed it normally as you said, but it gave me an error during `make`, but then I remembered that I had an old post about the same problem here, and I saw a new answer in it and it solved the problem http://stackoverflow.com/questions/10685455/cilk-installation-error-on-ubuntu – hakuna matata Aug 21 '12 at 11:15
  • Thanks apmasell for your help – hakuna matata Aug 21 '12 at 11:16