Created attachment 222435 [details] Add -fcommon to CFLAGS CLANG has changed its default behaviour by setting -fno-common as the default option, to meet GCC10 behaviour: "[...] With this change, C code that uses tentative definitions as definitions of a variable in multiple translation units will trigger multiple-definition linker errors. Generally, this occurs when the use of the extern keyword is neglected in the declaration of a variable in a header file. In some cases, no specific translation unit provides a definition of the variable. The previous behavior can be restored by specifying -fcommon. [...] (see: https://reviews.llvm.org/D75056) As a "quick and dirty" workaround I added -fcommon to CFALGS to restore the previous behaviour. A more sophisticated solution (which implies a deeper insight into the codebase of refdb) would be desireable. Additionaly, I allowed to change the E-Mail address.
Maintainer informed via mail
Created attachment 223661 [details] mitigate linker error The applied patchfile (residing in refdb/files) mutually solves the problem occuring on FreeBSD-13 and -14 as well as CURRENT due to changes to linker behaviour of used LLVM11 compiler suite as described above.
Created attachment 223663 [details] Solving the -fno-common issue with llvm > 10 Given the attached patch, the -fno-common problematic with the reported issue on newer LLVM10+ compiler suites seems to be solved. Not tested thoroughly on FreeBSD < 13.
The patch proposed here has been introduced, in the same way, upstream on a new version of code (the core remains the same). Can this patch please be commited, so that the port is building again?
See PR 265105 , issue solved in a larger context of an update.
Created attachment 236330 [details] Solving the -fno-common issue with llvm > 10 Shifting PORTREVISION=11 to PORTREVISION=12 by solving an issue introduced with LLVM/CKANG > 10 (setting -fno-common by default, which results in an error while compiling as described). The problem occured in src/readln.h, the problem has been solved by upstream by erasing the useless COMMON *thecommandlist declaration. The issue with the "patch" offered prior to this correction was: I forgot to send the patch for src/readln.h due to being new to git that time. The Makefile itself was useless. Since 1.0.3 is out and waiting for commitment, this patch for the patch is for the sake of correctnes.