gcc sysroot error loading shared libraries
I had an old Ubuntu 14.04 in wich I compiled my app. This was made with gcc-4.8.4 and glibc version 2.19.
Now I have upgrade my Ubuntu, but i want to maintain my compilation settings, but obviously, gcc and glibc has been updated.
I have created a very simple program to verify my glibc version.
#include <stdio.h>
#include <gnu/libc-version.h>
int main (void) { puts (gnu_get_libc_version ()); return 0; }
If I compile and execute this program in my new O.S I got an 2.17 instead of 2.19 that was my previous version.
In order to get the same toolchain I have created a debootstrap of Ubuntu 14 in my personal folder. If I set the chroot to this path and compile, 2.19 version is obtained and everything is well.
xabi@Xlinux:~$ sudo chroot ~/ubuntu14/
root@Xlinux:/# gcc main.c -o main
root@Xlinux:/# ./main
2.19
My problem now is how to compile this without changing the chroot of all my system? My IDE is installed in my new system for example.
I have tried to compile calling to the desired gcc:
~/ubuntu14/usr/bin/gcc main.c -o main
/home/xabi/ubuntu14/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory
but I always obtain this error.
gcc toolchain
add a comment |
I had an old Ubuntu 14.04 in wich I compiled my app. This was made with gcc-4.8.4 and glibc version 2.19.
Now I have upgrade my Ubuntu, but i want to maintain my compilation settings, but obviously, gcc and glibc has been updated.
I have created a very simple program to verify my glibc version.
#include <stdio.h>
#include <gnu/libc-version.h>
int main (void) { puts (gnu_get_libc_version ()); return 0; }
If I compile and execute this program in my new O.S I got an 2.17 instead of 2.19 that was my previous version.
In order to get the same toolchain I have created a debootstrap of Ubuntu 14 in my personal folder. If I set the chroot to this path and compile, 2.19 version is obtained and everything is well.
xabi@Xlinux:~$ sudo chroot ~/ubuntu14/
root@Xlinux:/# gcc main.c -o main
root@Xlinux:/# ./main
2.19
My problem now is how to compile this without changing the chroot of all my system? My IDE is installed in my new system for example.
I have tried to compile calling to the desired gcc:
~/ubuntu14/usr/bin/gcc main.c -o main
/home/xabi/ubuntu14/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory
but I always obtain this error.
gcc toolchain
add a comment |
I had an old Ubuntu 14.04 in wich I compiled my app. This was made with gcc-4.8.4 and glibc version 2.19.
Now I have upgrade my Ubuntu, but i want to maintain my compilation settings, but obviously, gcc and glibc has been updated.
I have created a very simple program to verify my glibc version.
#include <stdio.h>
#include <gnu/libc-version.h>
int main (void) { puts (gnu_get_libc_version ()); return 0; }
If I compile and execute this program in my new O.S I got an 2.17 instead of 2.19 that was my previous version.
In order to get the same toolchain I have created a debootstrap of Ubuntu 14 in my personal folder. If I set the chroot to this path and compile, 2.19 version is obtained and everything is well.
xabi@Xlinux:~$ sudo chroot ~/ubuntu14/
root@Xlinux:/# gcc main.c -o main
root@Xlinux:/# ./main
2.19
My problem now is how to compile this without changing the chroot of all my system? My IDE is installed in my new system for example.
I have tried to compile calling to the desired gcc:
~/ubuntu14/usr/bin/gcc main.c -o main
/home/xabi/ubuntu14/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory
but I always obtain this error.
gcc toolchain
I had an old Ubuntu 14.04 in wich I compiled my app. This was made with gcc-4.8.4 and glibc version 2.19.
Now I have upgrade my Ubuntu, but i want to maintain my compilation settings, but obviously, gcc and glibc has been updated.
I have created a very simple program to verify my glibc version.
#include <stdio.h>
#include <gnu/libc-version.h>
int main (void) { puts (gnu_get_libc_version ()); return 0; }
If I compile and execute this program in my new O.S I got an 2.17 instead of 2.19 that was my previous version.
In order to get the same toolchain I have created a debootstrap of Ubuntu 14 in my personal folder. If I set the chroot to this path and compile, 2.19 version is obtained and everything is well.
xabi@Xlinux:~$ sudo chroot ~/ubuntu14/
root@Xlinux:/# gcc main.c -o main
root@Xlinux:/# ./main
2.19
My problem now is how to compile this without changing the chroot of all my system? My IDE is installed in my new system for example.
I have tried to compile calling to the desired gcc:
~/ubuntu14/usr/bin/gcc main.c -o main
/home/xabi/ubuntu14/usr/bin/../lib/gcc/x86_64-linux-gnu/4.8/cc1: error while loading shared libraries: libcloog-isl.so.4: cannot open shared object file: No such file or directory
but I always obtain this error.
gcc toolchain
gcc toolchain
asked Nov 12 '18 at 19:27
Xabi E
86211
86211
add a comment |
add a comment |
0
active
oldest
votes
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53268832%2fgcc-sysroot-error-loading-shared-libraries%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53268832%2fgcc-sysroot-error-loading-shared-libraries%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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