Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Aug 2020 10:11:45 +0200
From:      Dimitry Andric <dim@FreeBSD.org>
To:        FreeBSD Ports <freebsd-ports@freebsd.org>
Subject:   Re: x11-wm/piewm: "ld: error: duplicate symbol: yylineno"
Message-ID:  <2D642C38-96C6-4736-88E1-C1B56783C701@FreeBSD.org>
In-Reply-To: <20200823193504.GB5141@albert.catwhisker.org>
References:  <20200823193504.GB5141@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_6E5DD83D-FDDA-4E88-B9AC-39870C298215
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On 23 Aug 2020, at 21:35, David Wolfskill <david@catwhisker.org> wrote:
>=20
> On Sun, Aug 23, 2020 at 06:39:10PM +0000, pkg-fallout@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.
>>=20
>> Maintainer:     david@catwhisker.org
>> Last committer: swills@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/log=
s/piewm-1.04_4.log
>> Build URL:      =
http://beefy18.nyi.freebsd.org/build.html?mastername=3Dhead-amd64-default&=
build=3Dp545731_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
>>=20
>> make[1]: stopped in /wrkdirs/usr/ports/x11-wm/piewm/work/piewm-1.04
>> 1 error
>>=20
>> make[1]: stopped in /wrkdirs/usr/ports/x11-wm/piewm/work/piewm-1.04
>> =3D=3D=3D> Compilation failed unexpectedly.
>> Try to set MAKE_JOBS_UNSAFE=3Dyes and rebuild before reporting the =
failure to
>> the maintainer.
>> *** Error code 1
>>=20
>> Stop.
>> make: stopped in /usr/ports/x11-wm/piewm
>=20
> 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@FreeBSD.org) is likely similarly affected.
>=20
> 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:
>=20
> | This is because clang 11 (and gcc 10) now default to -fno-common. =
The
> | rationale is explained pretty well in...
>=20
> and goes on to state:
> | A quick fix is to add CFLAGS+=3D-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.
>=20
> So:  apparently *a* way around this is to change the Makefile (to
> include 'CFLAGS+=3D-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.
>=20
> 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


--Apple-Mail=_6E5DD83D-FDDA-4E88-B9AC-39870C298215
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename=signature.asc
Content-Type: application/pgp-signature;
	name=signature.asc
Content-Description: Message signed with OpenPGP

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.2

iF0EARECAB0WIQR6tGLSzjX8bUI5T82wXqMKLiCWowUCX0N2QQAKCRCwXqMKLiCW
o3A/AJ9wbb6x0dTwi/lck/O6LODPsBo48QCg0aOomV9c1rB3aFv67u8I1j0YjUw=
=YFQO
-----END PGP SIGNATURE-----

--Apple-Mail=_6E5DD83D-FDDA-4E88-B9AC-39870C298215--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?2D642C38-96C6-4736-88E1-C1B56783C701>