rock-simulation / mars_install_scripts

Install scripts for mars if autoproj is not used.
1 stars 6 forks source link

Update README.md #6

Closed bergatt closed 9 years ago

bergatt commented 9 years ago

Hello,

I was just trying to install MARS including the urdf_loader and all its dependencies and ran into the problem of the tinyxmlpackage missing. First I checked in the packageList.txt if there is the option of "unchecking" it there to install it automatically, but there wasn't. Then I realized it should be installed via MacPorts. So I did. But after that it still didn't work. It seems that the installation worked just fine but MacPorts doesn't provide tinyxml.pc so pkg-config is not able to find the installed package. As a workaround I just added

prefix=/opt/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: TinyXml
Description: simple, small, C++ XML parser
Version: 2.6.2
Libs: -L${libdir} -ltinyxml
Cflags: -I${includedir}

as tinyxml.pc to mymarsdev/install/lib/pkgconfig. And it finally worked. Then I checked port_get_dep.sh if I have overlooked the tinyxml package there, but it is missing there. After that I had a look at your installation instructions and just wanted to let you know about my findings:

  1. Found an error within the installation instructions within README.md. When installing on Mac you have to run sh port_get_dep.sh instead of sh apt_get_dep.sh.
  2. In the comment above (line 46) you mention OpenSceneGraph and libz which if you have a look at port_get_dep.sh is not included there. In addition later on you mention to compile OpenSceneGraph has to be compiled from from source, which is a little bit confusing.
  3. I have installed Qt via MacPorts (qt4-mac) and it's working. So maybe you can add that as a viable option?

Kind regards, Constantin

malter commented 9 years ago

Which version of mac-ports are you using? I think on my system the package config file was installed with tinyxml version 0.28.

bergatt commented 9 years ago

Hi Malte,

I just checked. I'm running MacPorts version 2.3.1 and have installed tinyxml version 2.6.2. As you can see below the port didn't include the file tinyxml.pc.

mac-pro-2:~ bergatt$ port version
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Version: 2.3.1
mac-pro-2:~ bergatt$ port installed | grep tinyxml
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
  tinyxml @2.6.2_2 (active)
mac-pro-2:~ bergatt$ port contents tinyxml
Warning: port definitions are more than two weeks old, consider updating them by running 'port selfupdate'.
Port tinyxml contains:
  /opt/local/include/tinystr.h
  /opt/local/include/tinyxml.h
  /opt/local/lib/libtinyxml.dylib

Will try update my MacPorts installation and check again!

Kind regards, Constantin

bergatt commented 9 years ago

Hi,

yup, the update did wonders!

mac-pro-2:~ bergatt$ port version
Version: 2.3.3
mac-pro-2:~ bergatt$ port installed | grep tinyxml
  tinyxml @2.6.2_3 (active)
mac-pro-2:~ bergatt$ port contents tinyxml
Port tinyxml contains:
  /opt/local/include/tinystr.h
  /opt/local/include/tinyxml.h
  /opt/local/lib/libtinyxml.dylib
  /opt/local/lib/pkgconfig/tinyxml.pc

So the tinyxml pkg-config should now be fixed!

So what about the changes I suggested to be made to the README.md? @kavonszadkowski @malter

Kind regards, Constantin

kavonszadkowski commented 9 years ago

Thanks for the input, Constantin.

I fully support your three suggestions. As I'm not building on a Mac myself, I based this version on the pre-existing readme which was not up to date. Can you fix points 2 and 3 in the file as well?

If you do and create a new pull request, please remember to change the date to the current one (that's the whole point of it being there, after all ;) ) and please leave the info about what the script asks for included. If nothing else, it might prevent people from hitting enter and turning to get coffee while the scripts is patiently waiting for input and doing nothing...I also find the information important that people can change their configuration later on.

malter commented 9 years ago

Concerning QT, I would prefere using qt5 instead of qt4. This option might be added as well. ;-)

bergatt commented 9 years ago

Hello everyone,

after having struggled the last week with reinstalling my mac I made some notes while installing MARS on a complete naked system (Mac OS X 10.9.5). As a consequence I put some of the things I learned into port_get_dep.sh and the README.md.

Please have a look! @malter @kavonszadkowski

Also I made a more excessive explanation for myself what I had to do in order to install MARS. Maybe it is of use to some of you so I pasted at after this.

Kind regards, Constantin


"Clean" MARS install on Mac OS X (Mavericks)

  1. Install Apple's XCode Developer Tools, found at the Apple Developer site, on your Mac OS X installation CDs/DVD, or in the Mac App Store. Using the latest available version that will run on your OS is highly recommended.
  2. Install Apple's Command Line Developer Tools, at the Apple Developer site, or they can be installed from within Xcode 4 (just enter xcode-select --install into a Terminal). Users of Xcode 3 or earlier can install this by ensuring that the appropriate option(s) are selected at the time of Xcode's install ("UNIX Development", "System Tools", "Command Line Tools", or "Command Line Support").
  3. Xcode 4 and later users need to first accept the Xcode EULA by either launching Xcode or running xcodebuild -license.
  4. Install MacPorts, found at http://www.macports.org.
  5. Check if everything is working:

    bergatt@bergatt-macpro ~ $ gcc --version
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
    Target: x86_64-apple-darwin13.4.0
    Thread model: posix
    
    bergatt@bergatt-macpro ~ $ port version
    Version: 2.3.3
    
    bergatt@bergatt-macpro ~ $ port installed
    No ports are installed.
  6. Now onto the "real" MARS installation.
  7. Create MARS development folder and cd into it.

    bergatt@bergatt-macpro ~ $ cd Repositories
    bergatt@bergatt-macpro ~/Repositories $ mkdir mars
    bergatt@bergatt-macpro ~/Repositories $ cd mars
  8. Checkout mars_install_scripts via git. git seems to be already available by default, so a MacPorts installation is not needed.

    bergatt@bergatt-macpro ~/Repositories/mars $ git clone git@github.com:rock-simulation/mars_install_scripts.git
    Cloning into 'mars_install_scripts'...
    remote: Counting objects: 332, done.
    remote: Total 332 (delta 0), reused 0 (delta 0), pack-reused 332
    Receiving objects: 100% (332/332), 60.60 KiB | 0 bytes/s, done.
    Resolving deltas: 100% (198/198), done.
    Checking connectivity... done.
  9. cd into the _mars_installscripts folder.
  10. Install the MacPorts dependencies. This should be included within port_get_dep.sh!

    sudo port install wget cmake boost pkgconfig tinyxml qt5-mac opencv
  11. Install OpenSceneGraph manually.

    1. Get the source code for OpenSceneGraph (Version 3.2.1) directly from the website or check it out via SVN.
    bergatt@bergatt-macpro ~/Repositories $ svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.2.1
    1. cd into the OpenSceneGraph folder
    bergatt@bergatt-macpro ~ $ cd Repositories/OpenSceneGraph-3.2.1
    1. Uncomment line 820 of CMakeLists.txt in order to build OpenSceneGraph using c++11 instead of c++98.
    816         IF (APPLE)
    817             # set standard lib, clang defaults to c++0x
    818             set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LANGUAGE_STANDARD "c++98")
    819             set(CMAKE_XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
    820 #            set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++98 -stdlib=libstdc++ -Wno-overloaded-virtual -Wno-conversion")
    821             set(WARNING_CFLAGS "")
    822         ENDIF()
    823 ENDIF()
    1. Create a "build" folder and cd into it.
    bergatt@bergatt-macpro ~/Repositories/OpenSceneGraph-3.2.1 $ mkdir build
    bergatt@bergatt-macpro ~/Repositories/OpenSceneGraph-3.2.1 $ cd build
    1. Call cmake in order to configure the upcoming build process. Depending whether you want to install OpenSceneGraph globally (in your system)
    bergatt@bergatt-macpro ~/Repositories/OpenSceneGraph-3.2.1/build $ sudo cmake ..

    or locally (e.g. in the MARS_DEV_ROOT)

    bergatt@bergatt-macpro ~/Repositories/OpenSceneGraph-3.2.1/build $ cmake .. -DCMAKE_INSTALL_PREFIX=/Users/bergatt/Repositories/mars/install

    you may have to add an install prefix to your cmake call.

    1. Start the build process.
    bergatt@bergatt-macpro ~/Repositories/OpenSceneGraph-3.2.1/build $ make
    1. Install OpenSceneGraph.
    bergatt@bergatt-macpro ~/Repositories/OpenSceneGraph-3.2.1/build $ make install
  12. Copy packageList.txt.example to packageList.txt. Either that or giving packageList.txt.example as an argument when calling mars.sh in the following steps.

    bergatt@bergatt-macpro ~/Repositories/mars/mars_install_scripts  [master]$ cp packageList.txt.example packageList.txt
  13. Start the "bootstrapping".

    bergatt@bergatt-macpro ~/Repositories/mars/mars_install_scripts  [master]$ bash mars.sh bootstrap
    You must set a root directory where all repositories will be checked out and all packages will be installed
    On Windows you should use the mingw path and not the windows path and avoid trailing slashes (e.g. /c/dev/mars-git)
    Enter root directory or nothing for "/Users/bergatt/Repositories/mars": 
    You can specify the number of CORES you want to use when compiling packages.
    Enter number of CORES: 24
    Enter build type (debug|release) : debug
    ...
  14. Have fun using MARS!
bergatt commented 9 years ago

What's the status? Accept or decline? ^^

@malter @kavonszadkowski