Board index FlightGear Support Compiling

Problems compiling in Cygwin

Building FlightGear from source, and in the need for help?

Problems compiling in Cygwin

Postby Necolatis » Fri Nov 02, 2012 4:20 pm

I tried to follow this http://wiki.flightgear.org/Building_using_CMake_-_Windows for x64.

Except, I would like to use Cygwin, since I want to be able to make specific compile options, which Visual Studio do not allow. I tried first Netbeans (which is the option I prefer), but sorta gave up, I got a little further now with Cygwin, but stuck again.

I have done this:
set MSVC_3RDPARTY_ROOT=/cygdrive/d/FlightGearDevelopment
set CMAKE_INSTALL_PREFIX=/cygdrive/d/FlightGearDevelopment/install/msvc100-64/SimGear

Also unsure if should use freeglut-MSVC-2.8.0-1.mp.zip or freeglut-MinGW-2.8.0-1.mp.zip?
And unsure, if the obsolete OpenGL package in Cygwin should be installed? (it is atm.)

Okay, I went into Cygwin setup, and installed cygport and freeglut.

I then used cygport on freeglut (it installs into a wierd folder though, but putting that in path also did not help). And uninstalled the obsolete opengl.

Still do not work.

I get this:

Code: Select all
$ cmake ../../../sources/simgear
CMake Warning at /usr/share/cmake-2.8.9/Modules/Platform/CYGWIN.cmake:15 (message):
  CMake no longer defines WIN32 on Cygwin!

  (1) If you are just trying to build this project, ignore this warning or
  quiet it by setting CMAKE_LEGACY_CYGWIN_WIN32=0 in your environment or in
  the CMake cache.  If later configuration or build errors occur then this
  project may have been written under the assumption that Cygwin is WIN32.
  In that case, set CMAKE_LEGACY_CYGWIN_WIN32=1 instead.

  (2) If you are developing this project, add the line

    set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required

  at the top of your top-level CMakeLists.txt file or set the minimum
  required version of CMake to 2.8.4 or higher.  Then teach your project to
  build on Cygwin without WIN32.
Call Stack (most recent call first):
  /usr/share/cmake-2.8.9/Modules/CMakeSystemSpecificInformation.cmake:36 (INCLUDE)
  CMakeLists.txt:7 (project)


-- version is 2 dot 8 dot 0
-- ignoring: ^/cygdrive/d/FlightGearDevelopment/sources/simgear/.git;\\.gitignore;Makefile.am;~$;
-- Library installation directory: lib
CMake Error at /usr/share/cmake-2.8.9/Modules/FindBoost.cmake:1191 (message):
  Unable to find the requested Boost libraries.

  Unable to find the Boost header files.  Please set BOOST_ROOT to the root
  directory containing Boost or BOOST_INCLUDEDIR to the directory containing
  Boost's headers.
Call Stack (most recent call first):
  CMakeLists.txt:110 (find_package)


-- SimGear mode: NORMAL
CMake Error at /usr/share/cmake-2.8.9/Modules/FindPackageHandleStandardArgs.cmake:97 (MESSAGE):
  Could NOT find OpenGL (missing: OPENGL_gl_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-2.8.9/Modules/FindPackageHandleStandardArgs.cmake:288 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8.9/Modules/FindOpenGL.cmake:153 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:117 (find_package)


-- Configuring incomplete, errors occurred!
Last edited by Necolatis on Fri Nov 02, 2012 5:39 pm, edited 1 time in total.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2115
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems compiling in Cygwin

Postby Necolatis » Sat Nov 03, 2012 2:26 am

Installing X11 OpenGL devel into Cygwin solved it.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2115
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems compiling in Cygwin

Postby Necolatis » Sat Nov 03, 2012 3:31 am

Okay, now the problem is OpenAL.

I can see which files it wants in the FindOpenAL.cmake.

I have put the locations of the files (all below 3rdParty.x64) into the system path.

I also downloaded the openal sdk 3.03, and it was newer than cygwin was looking for in the regdb so I changed the key to:

[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Creative\ Labs\\OpenAL\ 1.1\ Software\ Development\ Kit\\3.03;InstallDir]

inside FindOpenAL.cmake.

It all did not help.

It looks for 4 files: NAMES OpenAL al openal OpenAL32

I only have 3 of them: al.h openal.pc OpenAL32.dll/OpenAL32.lib

How do I get the 'OpenAL' file without having to build OpenAL myself? And where should it be located?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2115
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems compiling in Cygwin

Postby Necolatis » Sat Nov 03, 2012 8:05 am

I solved the openal issue (and alut & osg) by running cmake with -i, cmake find_library insisted on ignoring env variables and hints to where to find the libs.

I finally configured a build. Now to make it.

Will these compiler options (the march stuff) take effect? I seem to get no feedback that it accepts them.

cmake ../../../simgear -DMSVC=1 -DCMAKE_CL_64=1 -DMSVC_VERSION=1600 -DCMAKE_CXX_FLAGS="-march=amdfam10 -O3" DCMAKE_C_FLAGS="-march=amdfam10 -O3" -DENABLE_LIBSVN=OFF
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2115
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10

Re: Problems compiling in Cygwin

Postby Necolatis » Sun Nov 04, 2012 6:58 am

I cannot seem to get further than this:

[ 57%] Building CXX object simgear/scene/material/CMakeFiles/sgmaterial.dir/Effect.cxx.o
In file included from /cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osg/Vec2f:17:0,
from /cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osg/Vec2:17,
from /cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osg/Image:18,
from /cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osgDB/ReaderWriter:17,
from /cygdrive/d/FlightGearDevelopment/simgear/simgear/scene/material/Effect.hxx:28,
from /cygdrive/d/FlightGearDevelopment/simgear/simgear/scene/material/Effect.cxx:21:
/cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osg/Math: In function ‘bool osg::isNaN(float)’:
/cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osg/Math:215:52: error: ‘isnan’ was not declared in this scope
/cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osg/Math: In function ‘bool osg::isNaN(double)’:
/cygdrive/d/FlightGearDevelopment/install/msvc100-64/OpenScenegraph/include/osg/Math:216:53: error: ‘isnan’ was not declared in this scope


How do I fix this?

Btw. I am using binaries of osg 3.0.1, not trying to coompile it myself.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore
User avatar
Necolatis
 
Posts: 2115
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2019.1.2
OS: Windows 10


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest