MafiaHub / OpenMF-Archived

Abandoned C++ version. Contains useful format utils and parsers.
GNU General Public License v3.0
128 stars 11 forks source link

Linux Compile issues #120

Closed NeCarbon closed 6 years ago

NeCarbon commented 6 years ago

Hello, i just wanted to compile OpenMF on a fresh Ubuntu install, but i dont know what im doing wrong.

I compiled OpenSceneGraph as described on there github

it must be something with the paths being wrong i dont know.

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osg.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgDB.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgFX.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgGA.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgParticle.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgSim.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgText.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgUtil.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgTerrain.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgManipulator.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgViewer.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgWidget.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgShadow.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgAnimation.pc
-- Installing: /usr/local/lib64/pkgconfig/openscenegraph-osgVolume.pc
Libraries were installed to /usr/locallib64.
You may need to update your ld.so configuration. 
-- Installing: /usr/local/lib64/pkgconfig/openthreads.pc
-- Installing: /usr/local/lib64/libOpenThreads.so.3.3.0
-- Installing: /usr/local/lib64/libOpenThreads.so.20
-- Installing: /usr/local/lib64/libOpenThreads.so
-- Installing: /usr/local/include/OpenThreads/Atomic
-- Installing: /usr/local/include/OpenThreads/Barrier
-- Installing: /usr/local/include/OpenThreads/Block
-- Installing: /usr/local/include/OpenThreads/Condition
-- Installing: /usr/local/include/OpenThreads/Exports
-- Installing: /usr/local/include/OpenThreads/Mutex
-- Installing: /usr/local/include/OpenThreads/ReadWriteMutex
-- Installing: /usr/local/include/OpenThreads/ReentrantMutex
-- Installing: /usr/local/include/OpenThreads/ScopedLock
-- Installing: /usr/local/include/OpenThreads/Thread
-- Installing: /usr/local/include/OpenThreads/Version
-- Installing: /usr/local/include/OpenThreads/Config
-- Installing: /usr/local/lib64/libosg.so.3.4.1
-- Installing: /usr/local/lib64/libosg.so.131
-- Installing: /usr/local/lib64/libosg.so
-- Set runtime path of "/usr/local/lib64/libosg.so.3.4.1" to ""
-- Installing: /usr/local/include/osg/AlphaFunc
-- Installing: /usr/local/include/osg/AnimationPath
-- Installing: /usr/local/include/osg/ApplicationUsage
...
cmake .. -DBUILD_GAME=1 -DBUILD_UTILS=1
-- The C compiler identification is GNU 7.2.0
-- The CXX compiler identification is GNU 7.2.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring OpenMF...
-- Could NOT find osgDB (missing: OSGDB_LIBRARY) 
-- Could NOT find osgViewer (missing: OSGVIEWER_LIBRARY) 
-- Could NOT find osgText (missing: OSGTEXT_LIBRARY) 
-- Could NOT find osgGA (missing: OSGGA_LIBRARY) 
-- Could NOT find osgParticle (missing: OSGPARTICLE_LIBRARY) 
-- Could NOT find osgUtil (missing: OSGUTIL_LIBRARY) 
-- Could NOT find osgFX (missing: OSGFX_LIBRARY) 
-- Could NOT find osg (missing: OSG_LIBRARY) 
-- Found OpenThreads: /usr/lib/x86_64-linux-gnu/libOpenThreads.so  
CMake Error at /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenSceneGraph (missing: OSGDB_FOUND OSGVIEWER_FOUND
  OSGTEXT_FOUND OSGGA_FOUND OSGPARTICLE_FOUND OSGUTIL_FOUND OSGFX_FOUND
  OSG_FOUND) (found suitable version "3.4.1", minimum required is "3.4.1")
Call Stack (most recent call first):
  /usr/share/cmake-3.9/Modules/FindPackageHandleStandardArgs.cmake:377 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-3.9/Modules/FindOpenSceneGraph.cmake:223 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:108 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/carbon/Downloads/OpenMF-master/build/CMakeFiles/CMakeOutput.log".
Romop5 commented 6 years ago

Try 'apt-get install libopenscenegraph-dev'. You will also need Bullet Engine, so also try 'apt-get libbullet-dev'.

NeCarbon commented 6 years ago

Okay thanks, that i installed libopenscenegraph-dev i had it installed before but than it said needs 4.3.1 which then i compiled, also i had to install libsdl2-dev package, now libbullet-dev is only version 2.86 instead of 2.88 does it work anyway or do i need 2.88. latest i can find on there site is version 2.87?

-```

also it fails on compiling openmf now at 63%

Scanning dependencies of target test_suite_local [ 61%] Building CXX object CMakeFiles/test_suite_local.dir/tests/test_suite.cpp.o [ 63%] Linking CXX executable bin/test_suite_local

Romop5 commented 6 years ago

Oh, I get it, I had the same issue. You are free to change CMakeLists.txt to lower requirements. I’ve worked at least for me.

Sent from my iPhone

On 13 Feb 2018, at 17:24, NeCarbon notifications@github.com wrote:

Okay that i installed libopenscenegraph-dev i had it installed before but than it said needs 4.3.1 which then i compiled, also i had to install libsdl2-dev package, now libbullet-dev is only version 2.86 instead of 2.88 does it work anyway or do i need 2.88?

-```

The C compiler identification is GNU 7.2.0 -- The CXX compiler identification is GNU 7.2.0 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring OpenMF... -- Found osgDB: /usr/lib/x86_64-linux-gnu/libosgDB.so -- Found osgViewer: /usr/lib/x86_64-linux-gnu/libosgViewer.so -- Found osgText: /usr/lib/x86_64-linux-gnu/libosgText.so -- Found osgGA: /usr/lib/x86_64-linux-gnu/libosgGA.so -- Found osgParticle: /usr/lib/x86_64-linux-gnu/libosgParticle.so -- Found osgUtil: /usr/lib/x86_64-linux-gnu/libosgUtil.so -- Found osgFX: /usr/lib/x86_64-linux-gnu/libosgFX.so -- Found osg: /usr/lib/x86_64-linux-gnu/libosg.so -- Found OpenThreads: /usr/lib/x86_64-linux-gnu/libOpenThreads.so -- Found OpenSceneGraph: /usr/lib/x86_64-linux-gnu/libosgDB.so;/usr/lib/x86_64-linux-gnu/libosgViewer.so;/usr/lib/x86_64-linux-gnu/libosgText.so;/usr/lib/x86_64-linux-gnu/libosgGA.so;/usr/lib/x86_64-linux-gnu/libosgParticle.so;/usr/lib/x86_64-linux-gnu/libosgUtil.so;/usr/lib/x86_64-linux-gnu/libosgFX.so;/usr/lib/x86_64-linux-gnu/libosg.so;/usr/lib/x86_64-linux-gnu/libOpenThreads.so (found suitable version "3.4.1", minimum required is "3.4.1") -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found Bullet: /usr/lib/x86_64-linux-gnu/libBulletDynamics.so (Required is at least version "2.88") -- Configuring done -- Generating done

also it fails on compiling openmf now at 63%

Scanning dependencies of target test_suite_local [ 61%] Building CXX object CMakeFiles/test_suite_local.dir/tests/test_suite.cpp.o [ 63%] Linking CXX executable bin/test_suite_local — You are receiving this because you were assigned. Reply to this email directly, view it on GitHub, or mute the thread.

NeCarbon commented 6 years ago

So as it turns out is that libopenscenegraph-dev package is only version 3.2.3 but it say found 4.3.1 and it doesnt give any error because of mismatch versions. I tryed compiling and installing osg but than it says it cant find the librarys im confused :( SDL2 and bullet 3 is fine though

EDIT: finally, i got it what i did not know and did not check that there a diffrent packages, do not install libopenscenegraph-dev instead use libopenscenegraph-3.4-dev, otherwise it will find osg libs and create a Makefile fine but it will fail at 63% when compiling. maybe you can add that to the guide.

zpl-zak commented 6 years ago

Thanks for the info, should we close this issue now?

NeCarbon commented 6 years ago

yes