freedroidrpg: build failure

  • Done
  • quality assurance status badge
Details
3 participants
  • Christopher Howard
  • Efraim Flashner
  • Leo Famulari
Owner
unassigned
Submitted by
Christopher Howard
Severity
normal

Debbugs page

Leo Famulari wrote 3 years ago
(name . Christopher Howard)(address . christopher@librehacker.com)(address . 52963@debbugs.gnu.org)
YdH/x3+wzTIb4+Xk@jasmine.lan
On Sun, Jan 02, 2022 at 10:11:01AM -0900, Christopher Howard wrote:
Toggle quote (1 lines)
> Package "freedroidrpg" fails to build:
[...]
Toggle quote (2 lines)
> ld: addon_crafting_ui.o:(.bss+0x0): multiple definition of `tux_rendering'; action.o:(.bss+0x0): first defined here

I think we need to build the package with -fcommon. This is a typical
problem with unmaintained or old codebases, now that we have switched to
GCC 10.

Are you able to test it? Check the commit log for examples.
Leo Famulari wrote 3 years ago
(name . Christopher Howard)(address . christopher@librehacker.com)(address . 52963@debbugs.gnu.org)
YdZ27KnL11v5byPC@jasmine.lan
On Sun, Jan 02, 2022 at 02:40:55PM -0500, Leo Famulari wrote:
Toggle quote (11 lines)
> On Sun, Jan 02, 2022 at 10:11:01AM -0900, Christopher Howard wrote:
> > Package "freedroidrpg" fails to build:
> [...]
> > ld: addon_crafting_ui.o:(.bss+0x0): multiple definition of `tux_rendering'; action.o:(.bss+0x0): first defined here
>
> I think we need to build the package with -fcommon. This is a typical
> problem with unmaintained or old codebases, now that we have switched to
> GCC 10.
>
> Are you able to test it? Check the commit log for examples.

I tried this with the attached patch, but the build failed due to issues
with how it finds SDL:

------
gcc -DHAVE_CONFIG_H -I. -I.. -DFD_DATADIR='"/gnu/store/kjwi84vzlgxxj0s19nsmfblpipk5rlm6-freedroidrpg-0.16.1/share/freedroidrpg"' -I../lua -DLOCALEDIR='"/gnu/store/kjwi84vzlgxxj0s19nsmfblpipk5rlm6-freedroidrpg-0.16.1/share/locale"' -I/gnu/store/l4k60q5jm9g2f3jslnhjsldls0l4vf9q-sdl-1.2.15/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pipe -Wall -Wno-format-zero-length -ffast-math -I/gnu/store/2qfzwl2k819cdp57xwikhp0i3sl27hma-sdl-gfx-2.0.26/include/SDL -I/gnu/store/h9b8d63bxyjd5hl1mdmicrvl4rhz87vp-sdl-image-1.2.12/include/SDL -I/gnu/store/4n31akz1025w8c9yjfa5mwf9b2q2vv83-sdl-mixer-1.2.12/include/SDL-fcommon -MT armor.o -MD -MP -MF $depbase.Tpo -c -o armor.o armor.c &&\
mv -f $depbase.Tpo $depbase.Po
In file included from struct.h:30,
from animate.c:33:
system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
132 | #include <SDL_mixer.h>
| ^~~~~~~~~~~~~
In file included from struct.h:30,
from addon_crafting_ui.c:24:
system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
132 | #include <SDL_mixer.h>
| ^~~~~~~~~~~~~
compilation terminated.
compilation terminated.
make[3]: *** [Makefile:663: addon_crafting_ui.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: *** [Makefile:663: animate.o] Error 1
In file included from action.c:32:
system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
132 | #include <SDL_mixer.h>
| ^~~~~~~~~~~~~
compilation terminated.
In file included from armor.c:25:
system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
132 | #include <SDL_mixer.h>
| ^~~~~~~~~~~~~
compilation terminated.
make[3]: *** [Makefile:663: action.o] Error 1
make[3]: *** [Makefile:663: armor.o] Error 1
make[3]: Leaving directory '/tmp/guix-build-freedroidrpg-0.16.1.drv-0/freedroidrpg-0.16.1/src'
make[2]: *** [Makefile:352: all] Error 2
make[2]: Leaving directory '/tmp/guix-build-freedroidrpg-0.16.1.drv-0/freedroidrpg-0.16.1/src'
make[1]: *** [Makefile:474: all-recursive] Error 1
make[1]: Leaving directory '/tmp/guix-build-freedroidrpg-0.16.1.drv-0/freedroidrpg-0.16.1'
make: *** [Makefile:354: all] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "4") exit-status: 2 term-signal: #f stop-signal: #f>
phase `build' failed after 2.6 seconds
------
From 6c9bbda796c3528f018bd4590238aeebcbe81feb Mon Sep 17 00:00:00 2001
From: Leo Famulari <leo@famulari.name>
Date: Wed, 5 Jan 2022 23:54:33 -0500
Subject: [PATCH] gnu: FreedroidRPG: Fix build with GCC 10?

* gnu/packages/games.scm (freedroidrpg)[arguments]: Add -fcommon to CFLAGS.
---
gnu/packages/games.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index bfd566aac0..e4ddcf8aea 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -1365,7 +1365,8 @@ (define-public freedroidrpg
(string-append "CFLAGS="
"-I" (assoc-ref %build-inputs "sdl-gfx") "/include/SDL "
"-I" (assoc-ref %build-inputs "sdl-image") "/include/SDL "
- "-I" (assoc-ref %build-inputs "sdl-mixer") "/include/SDL")
+ "-I" (assoc-ref %build-inputs "sdl-mixer") "/include/SDL"
+ "-fcommon") ; Fix build with GCC 10
"--enable-opengl")
;; FIXME: the test suite fails with the following error output:
;; 4586 Segmentation fault env SDL_VIDEODRIVER=dummy \
--
2.34.0
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAmHWduwACgkQJkb6MLrK
fwiTnQ/9HixJ6QpdGr1/o0pThLSeXiHTlebMDP9Rb3tn36J5AolMls0rDRWWJJJ6
XW9HgKFujLrZ2HAkt4/x5E6pr4oPzkg+e2PUqv5CzOKJ9xv023AQ6gl7mZJx0Dgz
/Vv2aC8tptC7J9eMxumqg5VEyuOFDnQE4HS93YlA1PYx0hiVGau5k3pg4xmLG1lj
JcC6u4qDHfiE3qUZzLB3E72iI08kZsVm/pi2WXJ1nyK3vMKQVsfsWn6oHSdg6BjB
NibpqFnoZJg99cYCtPntZsiQfoZfUAZpv2wVsgvy+9Eiurqru54q8IlnRFeylxpq
lowFrx3Wly/MTgrbWZ6nbHa3FtbF8o2VH0fsP868nPzDGASsEHkKpj2e8vst+AS/
9+nmN9ljZcJPrxzLKss9AdwvVhqmtV+8DBNc3LtIFQIR/2bswwa+ixoSJvFLccXm
sTq1xOOpY6P5XVNzw3UiWXWm4HnZHMR8UuQkIUx/p3shsWWTfR+F4iIqWRP7tm4h
m7Rt3fQvu/tfW+jR/wpt0tuiREjPfVWv/SPRPDzoQqkWSB1/YsQRKX8bRuniQ09c
pkYiS3+VTDKJOLyAuUPyNxf4teO/zgYDZUMIpE5tY5DOMl/hE+DzzF1L/Eapo+zj
4w8SSwXMAnwIV+YIgHpFPbG64SqyBhgXWSlOjKafAFu3bE+7PUI=
=hVYe
-----END PGP SIGNATURE-----


Efraim Flashner wrote 3 years ago
(name . Leo Famulari)(address . leo@famulari.name)
Yfpf5kBWQXig2h38@3900XT
On Wed, Jan 05, 2022 at 11:58:20PM -0500, Leo Famulari wrote:
Toggle quote (15 lines)
> On Sun, Jan 02, 2022 at 02:40:55PM -0500, Leo Famulari wrote:
> > On Sun, Jan 02, 2022 at 10:11:01AM -0900, Christopher Howard wrote:
> > > Package "freedroidrpg" fails to build:
> > [...]
> > > ld: addon_crafting_ui.o:(.bss+0x0): multiple definition of `tux_rendering'; action.o:(.bss+0x0): first defined here
> >
> > I think we need to build the package with -fcommon. This is a typical
> > problem with unmaintained or old codebases, now that we have switched to
> > GCC 10.
> >
> > Are you able to test it? Check the commit log for examples.
>
> I tried this with the attached patch, but the build failed due to issues
> with how it finds SDL:

It looks like you missed the space after '/include/SDL' for sdl-mixer
when you added '-fcommon'. In any case, it's been fixed by Tobias so I'm
closing the bug.

Toggle quote (72 lines)
> ------
> gcc -DHAVE_CONFIG_H -I. -I.. -DFD_DATADIR='"/gnu/store/kjwi84vzlgxxj0s19nsmfblpipk5rlm6-freedroidrpg-0.16.1/share/freedroidrpg"' -I../lua -DLOCALEDIR='"/gnu/store/kjwi84vzlgxxj0s19nsmfblpipk5rlm6-freedroidrpg-0.16.1/share/locale"' -I/gnu/store/l4k60q5jm9g2f3jslnhjsldls0l4vf9q-sdl-1.2.15/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -pipe -Wall -Wno-format-zero-length -ffast-math -I/gnu/store/2qfzwl2k819cdp57xwikhp0i3sl27hma-sdl-gfx-2.0.26/include/SDL -I/gnu/store/h9b8d63bxyjd5hl1mdmicrvl4rhz87vp-sdl-image-1.2.12/include/SDL -I/gnu/store/4n31akz1025w8c9yjfa5mwf9b2q2vv83-sdl-mixer-1.2.12/include/SDL-fcommon -MT armor.o -MD -MP -MF $depbase.Tpo -c -o armor.o armor.c &&\
> mv -f $depbase.Tpo $depbase.Po
> In file included from struct.h:30,
> from animate.c:33:
> system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
> 132 | #include <SDL_mixer.h>
> | ^~~~~~~~~~~~~
> In file included from struct.h:30,
> from addon_crafting_ui.c:24:
> system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
> 132 | #include <SDL_mixer.h>
> | ^~~~~~~~~~~~~
> compilation terminated.
> compilation terminated.
> make[3]: *** [Makefile:663: addon_crafting_ui.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> make[3]: *** [Makefile:663: animate.o] Error 1
> In file included from action.c:32:
> system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
> 132 | #include <SDL_mixer.h>
> | ^~~~~~~~~~~~~
> compilation terminated.
> In file included from armor.c:25:
> system.h:132:10: fatal error: SDL_mixer.h: No such file or directory
> 132 | #include <SDL_mixer.h>
> | ^~~~~~~~~~~~~
> compilation terminated.
> make[3]: *** [Makefile:663: action.o] Error 1
> make[3]: *** [Makefile:663: armor.o] Error 1
> make[3]: Leaving directory '/tmp/guix-build-freedroidrpg-0.16.1.drv-0/freedroidrpg-0.16.1/src'
> make[2]: *** [Makefile:352: all] Error 2
> make[2]: Leaving directory '/tmp/guix-build-freedroidrpg-0.16.1.drv-0/freedroidrpg-0.16.1/src'
> make[1]: *** [Makefile:474: all-recursive] Error 1
> make[1]: Leaving directory '/tmp/guix-build-freedroidrpg-0.16.1.drv-0/freedroidrpg-0.16.1'
> make: *** [Makefile:354: all] Error 2
> error: in phase 'build': uncaught exception:
> %exception #<&invoke-error program: "make" arguments: ("-j" "4") exit-status: 2 term-signal: #f stop-signal: #f>
> phase `build' failed after 2.6 seconds
> ------

> From 6c9bbda796c3528f018bd4590238aeebcbe81feb Mon Sep 17 00:00:00 2001
> From: Leo Famulari <leo@famulari.name>
> Date: Wed, 5 Jan 2022 23:54:33 -0500
> Subject: [PATCH] gnu: FreedroidRPG: Fix build with GCC 10?
>
> * gnu/packages/games.scm (freedroidrpg)[arguments]: Add -fcommon to CFLAGS.
> ---
> gnu/packages/games.scm | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
> index bfd566aac0..e4ddcf8aea 100644
> --- a/gnu/packages/games.scm
> +++ b/gnu/packages/games.scm
> @@ -1365,7 +1365,8 @@ (define-public freedroidrpg
> (string-append "CFLAGS="
> "-I" (assoc-ref %build-inputs "sdl-gfx") "/include/SDL "
> "-I" (assoc-ref %build-inputs "sdl-image") "/include/SDL "
> - "-I" (assoc-ref %build-inputs "sdl-mixer") "/include/SDL")
> + "-I" (assoc-ref %build-inputs "sdl-mixer") "/include/SDL"
> + "-fcommon") ; Fix build with GCC 10
> "--enable-opengl")
> ;; FIXME: the test suite fails with the following error output:
> ;; 4586 Segmentation fault env SDL_VIDEODRIVER=dummy \
> --
> 2.34.0
>




--
Efraim Flashner <efraim@flashner.co.il> רנשלפ םירפא
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmH6X+MACgkQQarn3Mo9
g1EYjg//R8w4FW80FtjQepLBcIOdOfLkhE+UCiPkUihvVeKHQdK4/3TBzMr19I+T
+3BzWf0O8aLPDnb9Cjbz6mL3aSZp9gHZDNYfFpXP8jMaJlqrtseMM2X/6t3oz1Kp
7U1Ut92LGQbhco3A1AfMH/WRfNx/H5EGkStHgnNo17QYG09eCRBOKtiR0l6dwZEM
2oEYjz+ux09jazFCV5O/p2oZwy18yK1hIP+IjgED5p24PvM1ssBdWBZ7VfWuoPGe
ZQADBBWgO3157IqoUYKv2LmAfXSqvmgjfSAmqCbRNdV7YlMbv2NifHTbxLSGyFP1
PtrCQPUOjnvTSGqaryV5LAV+a1jZjz1Zccqv3sUJ/HGTKSVE+DcMcafbO+RHVrQ8
4dYm79lxPymy/pvuFBgwKAhTRqVFK1mtbu74p7GXOPLIVd+1iphz8BYYPbWM+zfT
i18e+ujUr6XBZgGJNwQEA5bn8bRZ3pRzara8KdKsMkoaOYB6CfFblZHqgO++e+aG
qetLzdt6DesgcxyHJcJB6/esu8cWxRIX9RrqCon6fBvgEAJUNWipFAoYe62UVdBG
CR5AsJqa4RLzZozPh8HdXVbXxDgTPGSgiHLZf67Hv0qKKNrvtsdwosNsDL+lJ59V
0HaBxnA6DX2uYN8yn6K5z6oobHzpkL043sT7A5wIOmAsI/uBvVU=
=4+GA
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 52963@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 52963
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help