$ 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
FreeBSD 11.0 and probably later versions aren't affected. http://package18.nyi.freebsd.org/data/110amd64-default-PR222542/2017-10-12_08h02m03s/logs/dia2code+-1.0.0_2.log http://package18.nyi.freebsd.org/data/110i386-default-PR222542/2017-10-11_20h02m08s/logs/dia2code+-1.0.0_2.log
Hi Muhammad, can you please look into this? (Is it possibly you just need to explicitly link with -lgcov ?)
(In reply to Gerald Pfeifer from comment #2) Tried with LDFLAGS+= -L${LOCALBASE}/lib -lgcov No result.
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?
(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).
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