cannot find -lOpenGL::OpenGL
I am running Ubuntu 16.04 and try to install an application that relies on OpenGL via the cmake & make toolschain.
The station has an Nvidia Quadro K2200 and OpenGL is installed via the package manager.
If cmake is run I confirmed that OpenGL is found, however if I try to link my target agains OpenGL via "target_link_libraries" and the rather modern OpenGL::OpenGL imported target,
target_link_libraries(${PROJECT_NAME}
PUBLIC
OpenGL::OpenGL
)
as suggest in the FindOpenGL.cmake file, I receive the error
/usr/bin/ld: cannot find -lOpenGL::OpenGL collect2: error: ld returned
1 exit status
However, if I instead put
target_link_libraries(${PROJECT_NAME}
PUBLIC
GLU
GL
)
it does work. I am suspicious of this since I uses to install the very same version of my programm on another work station also on Ubuntu 16.04 but with another GPU (GTX 780). So I did some digging and found out that
ldconfig -p | grep libGL.so
yielded
libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so.1
libGL.so.1 (libc6) => /usr/lib32/nvidia-384/libGL.so.1
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
libGL.so (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so
libGL.so (libc6) => /usr/lib32/nvidia-384/libGL.so
So two questions emerge
Why is the GL lib installed at least partially in a nvidia subdirectory and what does lib32 mean?
Why does cmake find OpenGL but is not able to resolve the imported target but the GL GLU syntax?
thank you for your help
nvidia opengl cmake
add a comment |
I am running Ubuntu 16.04 and try to install an application that relies on OpenGL via the cmake & make toolschain.
The station has an Nvidia Quadro K2200 and OpenGL is installed via the package manager.
If cmake is run I confirmed that OpenGL is found, however if I try to link my target agains OpenGL via "target_link_libraries" and the rather modern OpenGL::OpenGL imported target,
target_link_libraries(${PROJECT_NAME}
PUBLIC
OpenGL::OpenGL
)
as suggest in the FindOpenGL.cmake file, I receive the error
/usr/bin/ld: cannot find -lOpenGL::OpenGL collect2: error: ld returned
1 exit status
However, if I instead put
target_link_libraries(${PROJECT_NAME}
PUBLIC
GLU
GL
)
it does work. I am suspicious of this since I uses to install the very same version of my programm on another work station also on Ubuntu 16.04 but with another GPU (GTX 780). So I did some digging and found out that
ldconfig -p | grep libGL.so
yielded
libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so.1
libGL.so.1 (libc6) => /usr/lib32/nvidia-384/libGL.so.1
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
libGL.so (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so
libGL.so (libc6) => /usr/lib32/nvidia-384/libGL.so
So two questions emerge
Why is the GL lib installed at least partially in a nvidia subdirectory and what does lib32 mean?
Why does cmake find OpenGL but is not able to resolve the imported target but the GL GLU syntax?
thank you for your help
nvidia opengl cmake
can anyone help?
– Carsten D
Dec 17 '18 at 9:19
add a comment |
I am running Ubuntu 16.04 and try to install an application that relies on OpenGL via the cmake & make toolschain.
The station has an Nvidia Quadro K2200 and OpenGL is installed via the package manager.
If cmake is run I confirmed that OpenGL is found, however if I try to link my target agains OpenGL via "target_link_libraries" and the rather modern OpenGL::OpenGL imported target,
target_link_libraries(${PROJECT_NAME}
PUBLIC
OpenGL::OpenGL
)
as suggest in the FindOpenGL.cmake file, I receive the error
/usr/bin/ld: cannot find -lOpenGL::OpenGL collect2: error: ld returned
1 exit status
However, if I instead put
target_link_libraries(${PROJECT_NAME}
PUBLIC
GLU
GL
)
it does work. I am suspicious of this since I uses to install the very same version of my programm on another work station also on Ubuntu 16.04 but with another GPU (GTX 780). So I did some digging and found out that
ldconfig -p | grep libGL.so
yielded
libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so.1
libGL.so.1 (libc6) => /usr/lib32/nvidia-384/libGL.so.1
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
libGL.so (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so
libGL.so (libc6) => /usr/lib32/nvidia-384/libGL.so
So two questions emerge
Why is the GL lib installed at least partially in a nvidia subdirectory and what does lib32 mean?
Why does cmake find OpenGL but is not able to resolve the imported target but the GL GLU syntax?
thank you for your help
nvidia opengl cmake
I am running Ubuntu 16.04 and try to install an application that relies on OpenGL via the cmake & make toolschain.
The station has an Nvidia Quadro K2200 and OpenGL is installed via the package manager.
If cmake is run I confirmed that OpenGL is found, however if I try to link my target agains OpenGL via "target_link_libraries" and the rather modern OpenGL::OpenGL imported target,
target_link_libraries(${PROJECT_NAME}
PUBLIC
OpenGL::OpenGL
)
as suggest in the FindOpenGL.cmake file, I receive the error
/usr/bin/ld: cannot find -lOpenGL::OpenGL collect2: error: ld returned
1 exit status
However, if I instead put
target_link_libraries(${PROJECT_NAME}
PUBLIC
GLU
GL
)
it does work. I am suspicious of this since I uses to install the very same version of my programm on another work station also on Ubuntu 16.04 but with another GPU (GTX 780). So I did some digging and found out that
ldconfig -p | grep libGL.so
yielded
libGL.so.1 (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so.1
libGL.so.1 (libc6) => /usr/lib32/nvidia-384/libGL.so.1
libGL.so (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libGL.so
libGL.so (libc6,x86-64) => /usr/lib/nvidia-384/libGL.so
libGL.so (libc6) => /usr/lib32/nvidia-384/libGL.so
So two questions emerge
Why is the GL lib installed at least partially in a nvidia subdirectory and what does lib32 mean?
Why does cmake find OpenGL but is not able to resolve the imported target but the GL GLU syntax?
thank you for your help
nvidia opengl cmake
nvidia opengl cmake
asked Dec 14 '18 at 15:41
Carsten D
63
63
can anyone help?
– Carsten D
Dec 17 '18 at 9:19
add a comment |
can anyone help?
– Carsten D
Dec 17 '18 at 9:19
can anyone help?
– Carsten D
Dec 17 '18 at 9:19
can anyone help?
– Carsten D
Dec 17 '18 at 9:19
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
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%2faskubuntu.com%2fquestions%2f1100909%2fcannot-find-lopenglopengl%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 Ask Ubuntu!
- 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%2faskubuntu.com%2fquestions%2f1100909%2fcannot-find-lopenglopengl%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
can anyone help?
– Carsten D
Dec 17 '18 at 9:19