Bug 167843 - devel/simgear 2.6.0_1 build fails due to missing include path
Summary: devel/simgear 2.6.0_1 build fails due to missing include path
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-13 20:50 UTC by oleksii.tsai
Modified: 2012-05-15 13:50 UTC (History)
0 users

See Also:


Attachments
file.diff (303 bytes, patch)
2012-05-13 20:50 UTC, oleksii.tsai
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description oleksii.tsai 2012-05-13 20:50:02 UTC
The compilation devel/simgear (version 2.6.0_1) fails with multiple errors. The reason for this is, according to my analysis, missing include path. Many includes are written as following:

#include <sigmear/io/raw_socket.hxx>

, whereas simgear directory is not specified as an include path, i.e. no corresponding -I flag is issued to the compiler. simgear directory is located in source top directory.

Fix: Solved by making CMake pass simgear directory to the include paths. Modified SimGearComponent.cmake file to eliminate code duplication, because it is used by several modules that failed to compile.


--- SimGearComponent.cmake      2012-05-13 22:21:59.000000000 +0000
+++ SimGearComponent.cmake.new  2012-05-13 22:23:37.000000000 +0000
@@ -1,4 +1,6 @@
 
+include_directories(BEFORE ${PROJECT_SOURCE_DIR})
+
 macro(simgear_component_common name includePath sourcesList sources headers)
     if (SIMGEAR_SHARED)


Patch attached with submission follows:
How-To-Repeat: # cd /usr/ports/devel/simgear
# make
Comment 1 Edwin Groothuis freebsd_committer 2012-05-13 20:50:47 UTC
Responsible Changed
From-To: freebsd-ports-bugs->martymac

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Ganael LAPLANCHE freebsd_committer 2012-05-14 12:39:39 UTC
Hi Oleksii,

Thanks for your report.

> Synopsis: devel/simgear 2.6.0_1 build fails due to missing 
> include path
> [...]
> How-To-Repeat
> # cd /usr/ports/devel/simgear
> # make

Unfortunately, I could not reproduce the problem ; neither locally, nor
on my Tinderbox, and have not found build errors for Simgear on Pointyhat.

Could you check that your /etc/make.conf does not override some
variables and triggers those errors ?

Best regards,

--
Ganael LAPLANCHE <ganael.laplanche@martymac.org>
http://www.martymac.org | http://contribs.martymac.org
FreeBSD: martymac <martymac@FreeBSD.org>, http://www.FreeBSD.org
Comment 3 oleksii.tsai 2012-05-14 19:41:07 UTC
Hi, I have checked my /etc/make.conf. Here it is:

CFLAGS= -O2 -pipe
#avoid compiling profiled libraries
NO_PROFILE=true

CPUTYPE?=core2
# added by use.perl 2012-03-07 21:55:03
PERL_VERSION=5.14.2

The only suspect was CFLAGS. However I have tried to recompile the simgear
port with and without the CFLAGS definition in /etc/make.conf. Both time
the build succeeded.
The failure that I observed happened when I tried to update installed
simgear-2.4.0 to simgear-2.6.0_1.

Considering these facts I can state that the build failure occurs when
trying to update an installed simgear port. In my case when updating an
installed 2.4.0 version to version 2.6.0 the lookup for
<simgear/io/raw_socket.hxx> led to inclusion of raw_socket.hxx which was
located in /usr/local/include/simgear/io. However, the one from
/usr/ports/devel/simgear/work/simgear-2.6.0/simgear/io should have been
included.

To summarize this:

Build of simgear-2.6.0 when no simgear is installed succeeds.
Rebuild of simgear-2.6.0 when simgear-2.6.0 is installed succeeds.
Build of simgear-2.6.0 when simgear older than 2.6.0 is installed fails and
this is the only case that requires my patch.
Comment 4 dfilter freebsd_committer 2012-05-15 13:44:07 UTC
martymac    2012-05-15 12:43:59 UTC

  FreeBSD ports repository

  Modified files:
    devel/simgear        Makefile 
  Added files:
    devel/simgear/files  patch-CMakeModules-SimGearComponent.cmake 
  Log:
  Fix inclusion order of headers to allow upgrade from Simgear 2.4.0
  
  PR:             ports/167843
  Submitted by:   Oleksii <oleksii.tsai@googlemail.com>
  
  Revision  Changes    Path
  1.48      +1 -1      ports/devel/simgear/Makefile
  1.1       +9 -0      ports/devel/simgear/files/patch-CMakeModules-SimGearComponent.cmake (new)
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
Comment 5 Ganael LAPLANCHE freebsd_committer 2012-05-15 13:47:36 UTC
State Changed
From-To: open->closed

Committed, thanks!