Compiling R2014a on Scientific Linux 6.4 [SOLVED]

Discussion of compilation configuration and issues

Compiling R2014a on Scientific Linux 6.4 [SOLVED]

Postby bdillow » Wed Jun 24, 2015 9:33 pm

I'm trying to build GMAT on Scientific Linux 6.4 from the 2014a release tarball and running into trouble. (Two potentially separate ones, actually.)

I configured the dependencies:
Code: Select all
% cd ~/src/GMAT_R2014a/depends
% ./configure.sh -p ~/src/GMAT_R2014a/


and get the following error in wxWidgets:
Code: Select all
(if test -d utils/wxrc ; then cd utils/wxrc && make all ; fi)
make[1]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/utils/wxrc'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/utils/wxrc'
cd src; make
make[1]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src'
make[2]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/fl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/fl'
make[2]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/gizmos'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/gizmos'
make[2]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/mmedia'
/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/bk-deps g++ -c -o mmediadll_vidxanm.o -I./.pch/wxprec_mmediadll -D__WXGTK__     -DWXBUILDING -I./../../include -DWXUSINGDLL -DWXMAKINGDLL_MMEDIA -fPIC -DPIC -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/lib/wx/include/gtk2-ansi-release-2.8 -I../../../include -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -DWX_PRECOMP -pthread -Wall -Wundef -Wno-ctor-dtor-privacy -O2 -fno-strict-aliasing ./vidxanm.cpp
In file included from ./vidxanm.cpp:38:
./../../include/wx/mmedia/vidbase.h:19:23: error: ./.pch/wxprec_mmediadll/wx/wxprec.h: No such file or directory
make[2]: *** [mmediadll_vidxanm.o] Error 1
make[2]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/mmedia'
make[2]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/ogl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/ogl'
make[2]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/plot'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/plot'
make[2]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc'
make[2]: Entering directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/svg'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/svg'
make[1]: Leaving directory `/home/bdillow/src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src'
/home/bdillow/src/GMAT_R2014a/
Dependency Configuration Complete!


Seeing the error, I went looking for the file that make claimed was missing, and there is one in the build tree, just not where it's looking:
Code: Select all
$ find . -name wxprec.h
./wxWidgets-2.8.12/include/wx/wxprec.h
./wxWidgets/wxWidgets-2.8.12/include/wx/wxprec.h


I tried changing the Makefile in src/GMAT_R2014a/depends/wxWidgets/wxWidgets-2.8.12/contrib/src/mmedia but it is auto-generated by some tool, so my changes are just overwritten. So not sure what to do about that.

On the other hand, the configure script said that the dependency configuration was complete, so I moved on to the build folder hoping things might work out.
Code: Select all
$ cd ../build
$ ./build.sh -arch x64
........................................................
Starting GMAT Build
........................................................

-- SPICE FOUND
-- CSPICE_DIR=/home/bdillow/src/GMAT_R2014a/src/../depends/cspice
-- WxWidgets FOUND
-- WXWIDGET_DIR=/home/bdillow/src/GMAT_R2014a/src/../depends/wxWidgets/wxWidgets-2.8.12
64-bit compilation
==============================
Console building setup
==============================
GMAT GUI building setup
-- Building with DeVIL
-- Could NOT find IL  (missing:  IL_LIBRARY ILU_LIBRARY ILUT_LIBRARY IL_INCLUDE_DIR)
** Disabling USE_DEVIL
==============================
GMAT CInterface Plugin setup
-- Using a shared base library
-- Executing... ulimit -s 61440
-- Configuring done
CMake Error in gui/CMakeLists.txt:
  Cannot find source file "Editor.cpp".  Tried extensions .c .C .c++ .cc .cpp
  .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx


-- Build files have been written to: /home/bdillow/src/GMAT_R2014a/build/linux
make: *** No targets specified and no makefile found.  Stop.

*************************************
Gmat Build Finished Succesfully!
*************************************
[code]

It complains about a missing CPP file, so I went looking for it:
[code]
$ find .. -iname 'Editor.*'
../depends/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/Editor.h
../depends/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/prop-base/Editor.h.svn-base
../depends/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/prop-base/Editor.cxx.svn-base
../depends/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/text-base/Editor.h.svn-base
../depends/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/text-base/Editor.cxx.svn-base
../depends/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/Editor.cxx
../depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/Editor.h
../depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/prop-base/Editor.h.svn-base
../depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/prop-base/Editor.cxx.svn-base
../depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/text-base/Editor.h.svn-base
../depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/.svn/text-base/Editor.cxx.svn-base
../depends/wxWidgets/wxWidgets-2.8.12/contrib/src/stc/scintilla/src/Editor.cxx


And find both a .cxx file and a .h file. So something messing up deep within the cmake system. Has anyone encountered this error? Any suggestions?

Thanks in advance,
Barrett
Last edited by bdillow on Thu Jun 25, 2015 8:31 pm, edited 1 time in total.
bdillow
 
Posts: 7
Joined: Wed Jun 24, 2015 9:16 pm
Location: GSFC

Re: Compiling R2014a on Scientific Linux 6.4

Postby jjkparker » Thu Jun 25, 2015 1:07 pm

Hi Barrett,

We've completely rewritten our CMake-based build system as of our upcoming R2015a release. The old version you're using was a prototype; I'm not surprised you're having trouble with it.

For R2014a, I suggest you follow the Make-based build instructions here: http://gmatcentral.org/display/GW/Building+on+Linux

Sorry for the inconvenience, but I think you'll be pleasantly surprised with the new build system in our next release.
Joel J. K. Parker
Flight dynamics engineer, GMAT team
http://gmatcentral.org
jjkparker
 
Posts: 617
Joined: Thu Jan 07, 2010 9:48 pm
Location: NASA Goddard Space Flight Center, Greenbelt, MD

Re: Compiling R2014a on Scientific Linux 6.4

Postby bdillow » Thu Jun 25, 2015 8:29 pm

@jjkparker - thanks for the recommendation. I'd been following the documentation within the R2014a tarball.

Here are my modifications to the instructions here: http://gmatcentral.org/display/GW/Building+on+Linux that I needed to make things work.

wxGTK installation
-step 3 says to create a subdirectory to wxGTK-2.8.12 called "build-gmat" and the to change into that directory to perform the build and installation but this caused problems for me at the install step
- instead, create build-gmat, but the change directory to the pre-existing "build" directory, then you can run configure (as indicated in the above linked instructions), make and "make install" without issue. The libraries will appear as desired in .../wxGTK-2.8.12/build-gmat/lib.

cspice
- I'm on a 64-bit machine, so downloaded the 64-bit cspice package from here http://naif.jpl.nasa.gov/pub/naif/toolk ... pice.tar.Z

Configuring GMAT

- downloaded repo from git, per instructions
- instead of using macosx/BuildEnv.mk, because I'm on 64-bit linux ran:
Code: Select all
$ cd MY_SRC_DIR
$ git clone git://git.code.sf.net/p/gmat/git gmat-git
$ cd gmat-git
$ cp build/linux64/BuildEnv.mk src/BuildEnv.mk

BuildEnv.mk:
- didn't have an entry for "TOP_DIR" per the instructions
- instead of WX_INSTALLED, there was an entry for WX_CONFIG_PATH
- didn't have an entry for "WX_LIB_DIR" per the instructions
- didn't have an F2C_LOC entry
- didn't have an entry for PCRE_LIB_LOC


- the matlab interface pluging does not compile because the file "engine.h" cannot be found. I can't find it anywhere in the git repo that I downloaded, either.
- to continue the plugins/Makefile process, I commented out line 177 so it didn't fail to build matlabinterface and throw an error

- in the top-level Makefile, I set "BUILD_64BIT = 1"

Don't forget to modify your ~/.bashrc file to include the location of all the *.so files that were created during the compilation of GMAT. I checked everything out to /home/$USER/src/gmat-git, so I added /home/$USER/src/gmat-git/application/bin and /home/$USER/src/gmat-git/application/plugin to my LD_LIBRARY_PATH in my .bashrc file. After modifying your bashrc, you must either run "source ~/.bashrc" or open a new terminal for the changes to have effect.
Before I remembered to do the above, I tried executing GMAT in application/bin and it complained about not being able to find libGmatBase.so until I corrected my LD_LIBRARY_PATH to include the folder that contains the .so file.

So now I have a working GMAT on Scientific Linux 6.4 (64-bit). Thanks for the help. Now to figure out how to use it.
bdillow
 
Posts: 7
Joined: Wed Jun 24, 2015 9:16 pm
Location: GSFC


Return to Compiling GMAT

Who is online

Users browsing this forum: No registered users and 2 guests

cron