Board index FlightGear Support Compiling

OSG Superbuild freetype Error  Topic is solved

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

Re: OSG Superbuild freetype Error

Postby F-JJTH » Thu May 22, 2014 7:28 am

well I've started the OSG build on Jenkins, FYI Jenkins use this script:
t RDPARTY=%WORKSPACE%\3rdParty
call "%VCVARSALL%" %MSCV32%
md build
cd build

cmake ..\svn ^
-G "%COMPILER32%" ^
-DBUILD_OSG_APPLICATIONS:BOOL=ON ^
-DACTUAL_3RDPARTY_DIR:PATH="%RDPARTY%" ^
-DCURL_INCLUDE_DIR:PATH="%RDPARTY%\include" ^
-DTIFF_INCLUDE_DIR:PATH="%RDPARTY%\include" ^
-DGDAL_INCLUDE_DIR:PATH="%RDPARTY%\include" ^
-DGDAL_LIBRARY:FILEPATH="%RDPARTY%\lib\gdal_i.lib" ^
-DTIFF_LIBRARY:FILEPATH="%RDPARTY%\lib\libtiff.lib" ^
-DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF ^
-DCURL_LIBRARY:FILEPATH="%RDPARTY%\lib\libcurl_imp.lib" ^
-DFREETYPE_LIBRARY:FILEPATH="%RDPARTY%\lib\freetype.lib" ^
-DCMAKE_INSTALL_PREFIX:PATH="%WORKSPACE%\install\msvc100\OpenSceneGraph" ^
-DFREETYPE_INCLUDE_DIR:PATH="%RDPARTY%\include;%RDPARTY%\include\freetype"

cmake --build . --config Release --target INSTALL


and everything works fine: http://flightgear.simpits.org:8080/job/ ... onsoleText

So I seeing 2 possible bug:
1) Jenkins grab OSG src code from SVN while Superbuild grab it from .zip: maybe SVN has a fix
2) The Superbuild intruduce something weird because with the same command out of the Superbuild it works fine

If one of you is able to modify the Superbuild localy in order to grab OSG from SVN (osg 3.2 branch) and test that would save me some work, else it will wait this weekend

Regards,
Clément
User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: OSG Superbuild freetype Error

Postby langsam » Thu May 22, 2014 8:38 am

Thanks for reports, guys.
Thanks in advance, Clément.

BTW, I doughted jenkins did not run compile, because already freetype plugins had been built.
from building log:
Code: Select all
66>  Building Custom Rule D:/FGFSHudsonCMake/OSG/svn/src/osgPlugins/freetype/CMakeLists.txt

66>  CMake does not need to re-run because D:\FGFSHudsonCMake\OSG\build\src\osgPlugins\freetype\CMakeFiles\generate.stamp is up-to-date.


If one of you is able to modify the Superbuild localy in order to grab OSG from SVN (osg 3.2 branch) and test that would save me some work, else it will wait this weekend

anyway, I will try build with SVN OSG sources in a few days.
langsam
 
Posts: 6
Joined: Mon May 19, 2014 4:16 am
Location: Kanoya, Kagoshima, NIPPON(JAPAN)

Re: OSG Superbuild freetype Error

Postby wlbragg » Thu May 22, 2014 8:40 am

As far as I am concerned you just need to escape the semicolon, problem solved. Part of my discovery of the fix came from a post that stated that sometimes the unescaped semicolon will work and at other times it won't. To be safe, you escape it.
The script that Jenkins is using has the whole include path contained in quotes, maybe that has something to do with why it work.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5765
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: OSG Superbuild freetype Error

Postby langsam » Thu May 22, 2014 8:42 am

I'll try with escaped semi-colon version, too.
langsam
 
Posts: 6
Joined: Mon May 19, 2014 4:16 am
Location: Kanoya, Kagoshima, NIPPON(JAPAN)

Re: OSG Superbuild freetype Error

Postby F-JJTH » Thu May 22, 2014 1:13 pm

what happend if you simply add quote " around the paths ?
User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: OSG Superbuild freetype Error

Postby wlbragg » Thu May 22, 2014 4:50 pm

I tried that already and it still erred. I did not try it around the entire path, ie both paths combined in one set of quotes.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5765
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: OSG Superbuild freetype Error

Postby langsam » Fri May 23, 2014 11:51 am

I tried escaped semi-colon build.
In CmakeList.txt , whether fore-slash or back-slash is OK. (see later command line)
Code: Select all
-DFREETYPE_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include\;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype


Result: failed.

CMake processed:
Code: Select all
  C:\work\tools\CMake28\bin\cmake.exe -DBUILD_OSG_APPLICATIONS:BOOL=ON -DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF -DACTUAL_3RDPARTY_DIR:PATH=C:/work/projects/_build/fg-build/3rdParty.x64 -DCURL_INCLUDE_DIR:PATH=C:/work/projects/_build/fg-build/3rdParty.x64/include -DTIFF_INCLUDE_DIR:PATH=C:/work/projects/_build/fg-build/3rdParty.x64/include -DGDAL_INCLUDE_DIR:PATH=C:/work/projects/_build/fg-build/3rdParty.x64/include -DGDAL_LIBRARY:FILEPATH=C:/work/projects/_build/fg-build/3rdParty.x64/lib/gdal_i.lib -DTIFF_LIBRARY:FILEPATH=C:/work/projects/_build/fg-build/3rdParty.x64/lib/libtiff.lib -DCURL_LIBRARY:FILEPATH=C:/work/projects/_build/fg-build/3rdParty.x64/lib/libcurl_imp.lib -DFREETYPE_LIBRARY:FILEPATH=C:/work/projects/_build/fg-build/3rdParty.x64/lib/freetype.lib -DFREETYPE_INCLUDE_DIR:PATH=C:/work/projects/_build/fg-build/3rdParty.x64/include C:/work/projects/_build/fg-build/3rdParty.x64/include/freetype -DCMAKE_INSTALL_PREFIX=C:/income/games/PC/FlightGear-SuperBuild/msvc100-64/OpenSceneGraph "-GVisual Studio 10 Win64" C:/work/projects/_build/fg-build/src/OSG


see problem point:
Code: Select all
-DFREETYPE_INCLUDE_DIR:PATH=C:/work/projects/_build/fg-build/3rdParty.x64/include C:/work/projects/_build/fg-build/3rdParty.x64/include/freetype

semi-colon was simply replaced with space.
(CMake should process this independent path, but it seems CMake causes no error. I wonder that.)

and CL command line: (fore-slash is replaced correctly with back-slash)
Code: Select all
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\x86_amd64\CL.exe /c /I"C:\work\projects\_build\fg-build\src\OSG\include" /I"C:\work\projects\_build\fg-build\osgbuild\include" /I"C:\work\projects\_build\fg-build\3rdParty.x64\include" /Zi /nologo /W4 /WX- /Od /Ob0 /D WIN32 /D _WINDOWS /D _DEBUG /D _SCL_SECURE_NO_WARNINGS /D _CRT_SECURE_NO_DEPRECATE /D "CMAKE_INTDIR=\"Debug\"" /D osgdb_freetype_EXPORTS /D _WINDLL /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /GR /Fo"osgdb_freetype.dir\Debug\\" /Fd"osgdb_freetype.dir\Debug\vc100.pdb" /Gd /TP /wd4706 /wd4127 /wd4100 /errorReport:prompt ..\..\..\..\src\OSG\src\osgPlugins\freetype\FreeTypeFont.cpp ..\..\..\..\src\OSG\src\osgPlugins\freetype\FreeTypeLibrary.cpp ..\..\..\..\src\OSG\src\osgPlugins\freetype\ReaderWriterFreeType.cpp
 

again, see problem point:
Code: Select all
/I"C:\work\projects\_build\fg-build\src\OSG\include" /I"C:\work\projects\_build\fg-build\osgbuild\include" /I"C:\work\projects\_build\fg-build\3rdParty.x64\include"

Include path after semi-colon is omitted.

I will try with SVN sources next... maybe in a few days... MAYBE. ;-)
langsam
 
Posts: 6
Joined: Mon May 19, 2014 4:16 am
Location: Kanoya, Kagoshima, NIPPON(JAPAN)

Re: OSG Superbuild freetype Error

Postby F-JJTH » Sun May 25, 2014 10:14 pm

Well I think I have the fix, please replace the lines 80 to 91:
Code: Select all
    SET(OSG_CMAKE_ARGS
        -DBUILD_OSG_APPLICATIONS:BOOL=ON
        -DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF
        -DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}
        -DCURL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
        -DTIFF_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
        -DGDAL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
        -DGDAL_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/gdal_i.lib
        -DTIFF_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/libtiff.lib
        -DCURL_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/libcurl_imp.lib
        -DFREETYPE_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/freetype.lib
        -DFREETYPE_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype
    )


by these lines:
Code: Select all
    SET(OSG_CMAKE_ARGS
        -DBUILD_OSG_APPLICATIONS:BOOL=ON
        -DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF
        -DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}
        -DCMAKE_LIBRARY_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib
        -DCMAKE_INCLUDE_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype
    )


You have to delete everything in your build folder and restart the compilation from scratch.
Here this changes has fixed the problem, if it fix for you too I will commit it in the repo.

Thanks you for your help,

Kind regards,
Clément
User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: OSG Superbuild freetype Error

Postby wlbragg » Mon May 26, 2014 12:28 am

My system still requires the ; to be escaped as in

Code: Select all
-DCMAKE_INCLUDE_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include\;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5765
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: OSG Superbuild freetype Error

Postby langsam » Mon May 26, 2014 4:24 pm

I will re-build with Clément's way between Wednesday to Thursday early morning (of course, in JST GMT+9).
I am very busy now with my actual work.
If Clément or other members hope early check-in the fixes before my re-build, I am OK.
Also I will research wlbragg's escape-semi-colon problem after that. It seems so weird.
langsam
 
Posts: 6
Joined: Mon May 19, 2014 4:16 am
Location: Kanoya, Kagoshima, NIPPON(JAPAN)

Re: OSG Superbuild freetype Error

Postby rreiter » Tue May 27, 2014 2:42 am

Good news from me.
Used clean fresh recursive clone of fgmeta/next, from scratch, generate via cmake 2.8.12.2, build via VC++2010Express SP1 on Win 8.1 x64:

1) Clément's CMakeLists.txt fix leads to successful build FlightGear-Meta.sln x64 (and subsequent FlighGear.sln build ok too).
2) Success also if use escape on semi-colon as per wlbragg requirement above.

So for me Clément's fix works as-is and although I did not require an escape for semi-colon, it did not hurt to include it.

Now hopefully will also work for langsam...
rreiter
 
Posts: 35
Joined: Thu Jan 16, 2014 4:33 am
Location: Newmarket, Ontario Canada
OS: Windows

Re: OSG Superbuild freetype Error  

Postby langsam » Tue May 27, 2014 4:33 am

I think it's OK to check-in these fixes, because of rreiter's confirmation 1) and 2).
Thanks for your helps.
And I can concentrate to my work... X-(

I will exam supplementary why this promlem caused.
langsam
 
Posts: 6
Joined: Mon May 19, 2014 4:16 am
Location: Kanoya, Kagoshima, NIPPON(JAPAN)

Re: OSG Superbuild freetype Error

Postby hamzaalloush » Wed Dec 31, 2014 12:49 am

issue still exist in Windows super build, the "fgmeta" solution

what seems to work for me, was wlbragg suggestion, moving includes up except "ftoutln.h"
hamzaalloush
 
Posts: 632
Joined: Sat Oct 26, 2013 9:31 am
OS: Windows 10

Re: OSG Superbuild freetype Error

Postby imagio » Mon Apr 13, 2015 7:28 pm

This issue still exists. In CMakeLists.txt replacing

Code: Select all
    SET(OSG_CMAKE_ARGS
        -DOSG_USE_QT:BOOL=OFF
        -DBUILD_OSG_APPLICATIONS:BOOL=ON
        -DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF
        -DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}
        -DCMAKE_LIBRARY_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib
        -DCMAKE_INCLUDE_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype
        -DCURL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
        -DTIFF_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
        -DGDAL_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include
        -DGDAL_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/gdal_i.lib
        -DTIFF_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/libtiff.lib
        -DCURL_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/libcurl_imp.lib
        -DFREETYPE_LIBRARY:FILEPATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib/freetype.lib
        -DFREETYPE_INCLUDE_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype
    )


with

Code: Select all
SET(OSG_CMAKE_ARGS
        -DBUILD_OSG_APPLICATIONS:BOOL=ON
        -DOSG_PLUGIN_SEARCH_INSTALL_DIR_FOR_PLUGINS:BOOL=OFF
        -DACTUAL_3RDPARTY_DIR:PATH=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}
        -DCMAKE_LIBRARY_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/lib
        -DCMAKE_INCLUDE_PATH:STRING=${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include\;${CMAKE_BINARY_DIR}/${RDPARTY_DIR}/include/freetype
    )


as suggested by Clément (and adding the escape \ for the semicolon) fixes it for me.
imagio
 
Posts: 33
Joined: Wed Mar 19, 2014 5:31 pm
Location: Pittsburgh
OS: Win 8.1

Previous

Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest