x11-wm/piewm: "ld: error: duplicate symbol: yylineno"

Dimitry Andric dim at FreeBSD.org
Mon Aug 24 08:12:00 UTC 2020


On 23 Aug 2020, at 21:35, David Wolfskill <david at catwhisker.org> wrote:
> 
> On Sun, Aug 23, 2020 at 06:39:10PM +0000, pkg-fallout at FreeBSD.org wrote:
>> You are receiving this mail as a port that you maintain
>> is failing to build on the FreeBSD package build server.
>> Please investigate the failure and submit a PR to fix
>> build.
>> 
>> Maintainer:     david at catwhisker.org
>> Last committer: swills at FreeBSD.org
>> Ident:          $FreeBSD: head/x11-wm/piewm/Makefile 519608 2019-12-09 13:47:16Z swills $
>> Log URL:        http://beefy18.nyi.freebsd.org/data/head-amd64-default/p545731_s364466/logs/piewm-1.04_4.log
>> Build URL:      http://beefy18.nyi.freebsd.org/build.html?mastername=head-amd64-default&build=p545731_s364466
>> ...
>> --- piewm ---
>> rm -f piewm
>> cc -o piewm       -L/usr/local/lib   gram.o lex.o deftwmrc.o add_window.o gc.o list.o twm.o 		parse.o menus.o events.o resize.o util.o version.o iconmgr.o 		cursor.o icons.o vdt.o move.o LocPixmap.o -lXmu -lXt -lSM -lICE -lXext -lX11 -lXt -lSM -lICE -lXext -lXext -lX11 -lm -ll -lXpm      -Wl,-rpath,/usr/local/lib
>> ld: error: duplicate symbol: yylineno
>>>>> defined at gram.c
>>>>>           gram.o:(yylineno)
>>>>> defined at lex.c
>>>>>           lex.o:(.data+0x0)
>> cc: error: linker command failed with exit code 1 (use -v to see invocation)
>> *** [piewm] Error code 1
>> 
>> make[1]: stopped in /wrkdirs/usr/ports/x11-wm/piewm/work/piewm-1.04
>> 1 error
>> 
>> make[1]: stopped in /wrkdirs/usr/ports/x11-wm/piewm/work/piewm-1.04
>> ===> Compilation failed unexpectedly.
>> Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
>> the maintainer.
>> *** Error code 1
>> 
>> Stop.
>> make: stopped in /usr/ports/x11-wm/piewm
> 
> So... I confess a lack of familiarity with lex, yacc, and their
> work-alikes.  It also appears that x11-wm/tvtwm (for which MAINTAINER is
> this list -- ports at FreeBSD.org) is likely similarly affected.
> 
> I understand that the immediate cause is a recent change; in
> http://docs.FreeBSD.org/cgi/mid.cgi?B7F9F85B-60A4-4A87-9911-BDE1CBC7BC91,
> dim@ mentioned:
> 
> | This is because clang 11 (and gcc 10) now default to -fno-common. The
> | rationale is explained pretty well in...
> 
> and goes on to state:
> | A quick fix is to add CFLAGS+=-fcommon to your make.conf, but that is
> | rather a big hammer. It is better to add it to just the ports that show
> | problems due to duplicated symbols. And ideally, those duplicated
> | symbols should be patched out of the ports.
> 
> So:  apparently *a* way around this is to change the Makefile (to
> include 'CFLAGS+=-fcommon') -- but I don't know if a "better" approach
> is feasible: we are dealing with some rather old (or, perhaps,
> "well-established") code, here.
> 
> Advice/suggestions?

In this case, "svn rm x11-wm/piewm/files/patch-gram.y" will fix it
correctly. I have no idea why that patch was added in the first place,
it is clearly incorrect!

-Dimitry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20200824/61b914a6/attachment.sig>


More information about the freebsd-ports mailing list