Bug 121697 - net-mgmt/netams doesn't build with C++ compiler shipped with FreeBSD v7
Summary: net-mgmt/netams doesn't build with C++ compiler shipped with FreeBSD v7
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-14 10:50 UTC by andrew
Modified: 2008-03-19 13:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description andrew 2008-03-14 10:50:01 UTC
C++ compiler shipped with RELENG_7 branches is far more picky about C++ syntax than one shipped with previous FreeBSD releases. As such, many of C++ code "valid" for gcc prior to version 4 series is rejected by current gcc C++ compiler.
Although it is much better to fix the code, one should "give us a chance" to use previous gcc versions to compile "broken" code.

Fix: One might try to apply the following patch to the port's Makefile:

===


and set "CXX" environment variable to some gcc compiler version 3 built from ports.--eXDcJmNTNJfiX3a5s3XYQBOXysx9AAahWrwk0Sxy8tqt5rTs
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- a/net-mgmt/netams/Makefile  Thu Mar 13 21:21:52 2008 +0300
+++ b/net-mgmt/netams/Makefile  Fri Mar 14 13:35:52 2008 +0300
@@ -61,6 +61,11 @@ post-patch:
                ${WRKSRC}/configure.sh
 .endif
 
+       @${REINPLACE_CMD} -e 's|^CC.*|CC=${CXX}|' \
+               ${WRKSRC}/src/Makefile
+       @${REINPLACE_CMD} -e 's|^CPP.*|CPP=${CXX}|' \
+               ${WRKSRC}/src/Makefile
+
 do-install:
        ${INSTALL_PROGRAM} ${WRKSRC}/src/netams ${PREFIX}/libexec/netams
        ${INSTALL_PROGRAM} ${WRKSRC}/src/flowprobe ${PREFIX}/sbin/flowprobe
===
How-To-Repeat: Just try to build the port under FreeBSD v7.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-03-14 10:50:11 UTC
State Changed
From-To: open->feedback

Awaiting maintainers feedback (via the GNATS Auto Assign Tool)
Comment 2 Yuriy N. Shkandybin 2008-03-14 12:13:34 UTC
approved
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2008-03-15 08:16:49 UTC
State Changed
From-To: feedback->open

Maintainer approved.
Comment 4 Rong-En Fan freebsd_committer freebsd_triage 2008-03-19 13:07:09 UTC
State Changed
From-To: open->closed

Committed, with minor changes. Thanks!
Comment 5 dfilter service freebsd_committer freebsd_triage 2008-03-19 13:07:09 UTC
rafan       2008-03-19 13:07:04 UTC

  FreeBSD ports repository

  Modified files:
    net-mgmt/netams      Makefile 
  Log:
  - Respect CC and CXX
  
  PR:             ports/121697
  Submitted by:   Andrew Kolchoogin <andrew at rinet.ru>
  Approved by:    Yuriy N. Shkandybin <jura at netams.com> (maintainer)
  
  Revision  Changes    Path
  1.20      +5 -0      ports/net-mgmt/netams/Makefile
_______________________________________________
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"