all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Leo Famulari <leo@famulari.name>
To: Christopher Howard <christopher@librehacker.com>
Cc: 52963@debbugs.gnu.org
Subject: bug#52963: freedroidrpg: build failure
Date: Wed, 5 Jan 2022 23:58:20 -0500	[thread overview]
Message-ID: <YdZ27KnL11v5byPC@jasmine.lan> (raw)
In-Reply-To: <YdH/x3+wzTIb4+Xk@jasmine.lan>


[-- Attachment #1.1: Type: text/plain, Size: 3090 bytes --]

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:

------
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
------

[-- Attachment #1.2: 0001-gnu-FreedroidRPG-Fix-build-with-GCC-10.patch --]
[-- Type: text/plain, Size: 1205 bytes --]

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


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-01-06  4:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-02 19:11 bug#52963: freedroidrpg: build failure Christopher Howard
2022-01-02 19:40 ` Leo Famulari
2022-01-06  4:58   ` Leo Famulari [this message]
2022-02-02 10:41     ` Efraim Flashner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YdZ27KnL11v5byPC@jasmine.lan \
    --to=leo@famulari.name \
    --cc=52963@debbugs.gnu.org \
    --cc=christopher@librehacker.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.