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

cmake config fails on ubuntu #12

Open
davidgodzsak opened this issue Jun 21, 2017 · 3 comments
Open

cmake config fails on ubuntu #12

davidgodzsak opened this issue Jun 21, 2017 · 3 comments

Comments

@davidgodzsak
Copy link

davidgodzsak commented Jun 21, 2017

When I compile the project generated with projectGenerator using make it works just fine. But when I add the CMakeLists.txt and compile it based on the description of this project I get this error, I also get this error when I build it with CLion:

[ 95%] Linking CXX shared library ../bin/first1.app/Contents/Frameworks/libopenFrameworks.so
[ 95%] Built target static
/usr/bin/ld: /home/david/projects/OF/libs/poco/lib/linux64/libPocoFoundation.a(Thread.o): relocation R_X86_64_PC32 against symbol `_ZN4Poco10ThreadImpl20_currentThreadHolderE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
CMakeFiles/of_shared.dir/build.make:222: recipe for target '../bin/first1.app/Contents/Frameworks/libopenFrameworks.so' failed
make[2]: *** [../bin/first1.app/Contents/Frameworks/libopenFrameworks.so] Error 1
CMakeFiles/Makefile2:178: recipe for target 'CMakeFiles/of_shared.dir/all' failed
make[1]: *** [CMakeFiles/of_shared.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2

What is wrong? How can I make it work?

I am using CLion 2017.1.3 and OpenFrameworks 0.9.8

@davidgodzsak davidgodzsak changed the title cmake config fails on linux cmake config fails on ubuntu Jun 21, 2017
@nmarchais
Copy link

I also have this issue. Any clues how to solve it ?

@ragri8
Copy link

ragri8 commented Jan 25, 2018

I have similar issues. I used projectGenerator and followed all the instructions, but it fails to build when almost completed.
I hope there is still someone active on this project, I don't want to find a new IDE only to be able to run OF.
I'm using CLion 2017.2.2 on Linux Mint 18.2 and OpenFrameworks 0.9.8.

[ 94%] Built target core
[ 95%] Linking CXX shared library ../bin/oF_project.app/Contents/Frameworks/libopenFrameworksShared.so
/usr/bin/ld : ne peut trouver -lmpg123
collect2: error: ld returned 1 exit status
CMakeFiles/of_shared.dir/build.make:222 : la recette pour la cible « ../bin/oF_project.app/Contents/Frameworks/libopenFrameworksShared.so » a échouée
make[3]: *** [../bin/oF_project.app/Contents/Frameworks/libopenFrameworksShared.so] Erreur 1
CMakeFiles/Makefile2:104 : la recette pour la cible « CMakeFiles/of_shared.dir/all » a échouée
make[2]: *** [CMakeFiles/of_shared.dir/all] Erreur 2
CMakeFiles/Makefile2:79 : la recette pour la cible « CMakeFiles/oF_project.dir/rule » a échouée
make[1]: *** [CMakeFiles/oF_project.dir/rule] Erreur 2
Makefile:164 : la recette pour la cible « oF_project » a échouée
make: *** [oF_project] Erreur 2

@ghost
Copy link

ghost commented Sep 4, 2018

I think i have the same problem...
/opt/clion-2018.2.2/bin/cmake/linux/bin/cmake --build /home/rony/CLionProjects/FirstProgram/cmake-build-debug --target FirstProgram -- -j 2
-- Configuring done
-- Generating done
-- Build files have been written to: /home/rony/CLionProjects/FirstProgram/cmake-build-debug
[ 50%] Linking C executable FirstProgram
CMakeFiles/FirstProgram.dir/main.c.o: In function main': /home/rony/CLionProjects/FirstProgram/main.c:5: undefined reference to grprintf'
collect2: error: ld returned 1 exit status
CMakeFiles/FirstProgram.dir/build.make:83: recipe for target 'FirstProgram' failed
make[3]: *** [FirstProgram] Error 1
CMakeFiles/Makefile2:72: recipe for target 'CMakeFiles/FirstProgram.dir/all' failed
make[2]: *** [CMakeFiles/FirstProgram.dir/all] Error 2
CMakeFiles/Makefile2:84: recipe for target 'CMakeFiles/FirstProgram.dir/rule' failed
make[1]: *** [CMakeFiles/FirstProgram.dir/rule] Error 2
Makefile:118: recipe for target 'FirstProgram' failed
make: *** [FirstProgram] Error 2

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

3 participants