Bug 195490 - devel/mingw32-gcc build affected by similar-named files in /usr/local/include
Summary: devel/mingw32-gcc build affected by similar-named files in /usr/local/include
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-29 00:49 UTC by Bob Frazier
Modified: 2015-03-10 16:51 UTC (History)
2 users (show)

See Also:
cyberbotx: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bob Frazier 2014-11-29 00:49:30 UTC
using a slightly older version of devel/mingw32-gcc

  mingw32-gcc-4.7.2_1,1

I attempted to build it using the unmodified port, but had a problem with a specific include file "unwind.h".  it appears that if another port/package (such as devel/libunwind) is installed, and places a duplicate-name header file into /usr/local/include, then the mingw32-gcc build may not work properly (#includes the wrong file, basically).

The solution appears to be to comment out (or remove) the following line in Makefile :

CFLAGS+=       -I${LOCALBASE}/include

Without this addition to CFLAGS, the configure script STILL includes /usr/local/include in its search path; however, it appears LATER in the command line and thereby this prevents problems with aliasing of include files from /usr/local/include.

On examination of the Makefile in 'freshports', it appears that the latest will have the same problem.  In effect, ANY installed port that produces an incompatible include file that aliases one needed by the gcc build will result in the SAME kinds of problems, maybe even causing crashes, etc.

Other gcc cross-compilers should be checked to see if they do the same thing. Header file aliasing could easily mess THEM up as well.
Comment 1 Bugzilla Automation freebsd_committer freebsd_triage 2014-11-29 00:49:30 UTC
Maintainer CC'd
Comment 2 Naram Qashat 2015-01-19 22:39:35 UTC
I've actually submitted a more recent update to the port to bring it to 4.8.1, in bug #191291, and I've taken that line out of it. That should take care of this problem.
Comment 3 Naram Qashat 2015-01-31 16:34:09 UTC
Can this bug be closed? devel/mingw32-gcc has been updated since the last update of this bug.
Comment 4 Johannes Jost Meixner freebsd_committer freebsd_triage 2015-03-10 16:51:43 UTC
Port was updated and fixed elsewhere.