Bug 222962 - devel/dia2code+: fails to build on 10.3 with lang/gcc7 or later
Summary: devel/dia2code+: fails to build on 10.3 with lang/gcc7 or later
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Muhammad Moinur Rahman
URL:
Keywords: patch
Depends on:
Blocks: 222542
  Show dependency treegraph
 
Reported: 2017-10-12 18:22 UTC by Jan Beich
Modified: 2018-08-05 05:36 UTC (History)
3 users (show)

See Also:
jbeich: maintainer-feedback? (bofh)


Attachments
dia2code+.diff (938 bytes, patch)
2018-07-28 22:51 UTC, Tobias Kortkamp
tobik: maintainer-approval? (bofh)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2017-10-12 18:22:10 UTC
$ echo "DEFAULT_VERSIONS += gcc=7" >>${__MAKE_CONF:-/etc/make.conf}
$ make
[...]
dia2code-DiaGram.o: In function `_GLOBAL__sub_D_00100_1__ZN7DiaGramC2Ev':
DiaGram.cpp:(.text.exit+0x6): undefined reference to `__gcov_exit'
dia2code-GenerateCode.o: In function `_GLOBAL__sub_D_00100_1__ZN12GenerateCodeC2ER7DiaGramPKchbb':
GenerateCode.cpp:(.text.exit+0x6): undefined reference to `__gcov_exit'
dia2code-GenerateCodeCpp.o: In function `_GLOBAL__sub_D_00100_1__ZN15GenerateCodeCppC2ER7DiaGramh':
GenerateCodeCpp.cpp:(.text.exit+0x6): undefined reference to `__gcov_exit'
dia2code-GenerateCodeCSharp.o: In function `_GLOBAL__sub_D_00100_1__ZN18GenerateCodeCSharpC2ER7DiaGram':
GenerateCodeCSharp.cpp:(.text.exit+0x6): undefined reference to `__gcov_exit'
dia2code-GenerateCodeJava.o: In function `_GLOBAL__sub_D_00100_1__ZN16GenerateCodeJavaC2ER7DiaGram':
GenerateCodeJava.cpp:(.text.exit+0x6): undefined reference to `__gcov_exit'
dia2code-GenerateCodePhp.o:GenerateCodePhp.cpp:(.text.exit+0x6): more undefined references to `__gcov_exit' follow
collect2: error: ld returned 1 exit status

http://package18.nyi.freebsd.org/data/103amd64-default-PR222542/2017-10-11_07h07m20s/logs/errors/dia2code+-1.0.0_2.log
http://package18.nyi.freebsd.org/data/103i386-default-PR222542/2017-10-10_18h48m24s/logs/errors/dia2code+-1.0.0_2.log
Comment 2 Gerald Pfeifer freebsd_committer 2017-11-18 12:56:35 UTC
Hi Muhammad, can you please look into this?

(Is it possibly you just need to explicitly link with -lgcov ?)
Comment 3 Muhammad Moinur Rahman freebsd_committer 2018-04-24 19:43:21 UTC
(In reply to Gerald Pfeifer from comment #2)
Tried with
LDFLAGS+=       -L${LOCALBASE}/lib -lgcov

No result.
Comment 4 Tobias Kortkamp freebsd_committer 2018-07-28 22:51:03 UTC
Created attachment 195558 [details]
dia2code+.diff

The port builds fine on 10.4 if we remove -fprofile-arcs from
CXXFLAGS.  This might hide a problem that exists on 10.4, but I
can't think of a reason why it needs to be enabled in the port.

The port also builds fine with Clang on 10.4 then.  Do we really
still need GCC here?
Comment 5 Gerald Pfeifer freebsd_committer 2018-08-04 19:11:07 UTC
(In reply to Tobias Kortkamp from comment #4)
> The port builds fine on 10.4 if we remove -fprofile-arcs from
> CXXFLAGS.  This might hide a problem that exists on 10.4, but I
> can't think of a reason why it needs to be enabled in the port.
>
> The port also builds fine with Clang on 10.4 then.  Do we really
> still need GCC here?

This looks fine to me.  Thank you, Tobias!
  	
Muhammad, can you please ack?  Otherwise, Tobias, I'm afraid we'll
need to wait for maintainer timeout (which would be a pity given how
old this report already is).
Comment 6 commit-hook freebsd_committer 2018-08-05 05:36:03 UTC
A commit references this bug:

Author: bofh
Date: Sun Aug  5 05:35:37 UTC 2018
New revision: 476390
URL: https://svnweb.freebsd.org/changeset/ports/476390

Log:
  devel/dia2code+: fix build on 10.3 with lang/gcc7 or later
  - Builds with clang

  PR:		222962
  Submitted by:	jbeich

Changes:
  head/devel/dia2code+/Makefile