all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Need help porting eDuke32
@ 2019-02-16  9:49 HiPhish
  2019-02-16 10:30 ` Pierre Neidhardt
                   ` (2 more replies)
  0 siblings, 3 replies; 26+ messages in thread
From: HiPhish @ 2019-02-16  9:49 UTC (permalink / raw)
  To: help-guix

Hello everyone,

I have been trying to build eDuke32[1] (a Free source port of Duke Nukem 3D) 
with Guix following their instructions[2], but it looks like I am unable to 
set up the environment properly. I first created the following Guile script 
(omitting some version, source, description and synopsis for brevity):

    (define-public eduke32
      (package
        (name "eduke32")
        (build-system gnu-build-system)
        (arguments `())
        (native-inputs
          `(("pkg-config" ,pkg-config)))
        (inputs
          `(("sdl-union" ,(sdl-union (list sdl2 sdl2-mixer)))
            ("glu" ,glu)
            ("libvorbis" ,libvorbis)
            ("libvpx" ,libvpx)
            ("flac" ,flac)
            ("gtk+" ,gtk+-2)))))

Then I typed `guix environment --load=eduke32.scm` in my shell to set up the 
build environment, and executed `make`. This works at first, it builds the 
following files:

https://pastebin.com/FyJKK6BD

Then it fails at this step:

    In file included from source/build/include/mutex.h:10:0,
                     from source/build/include/osd.h:12,
                     from source/build/include/baselayer.h:11,
                     from source/duke3d/src/duke3d.h:28,
                     from source/duke3d/src/sdlmusic.cpp:35:
    source/build/include/sdl_inc.h:63:25: fatal error: SDL_mixer.h: No such 
file or directory
    compilation terminated.
    Failed building obj/duke3d/sdlmusic.o from source/duke3d/src/sdlmusic.cpp!
    make: *** [GNUmakefile:982: obj/duke3d/sdlmusic.o] Error 1

Looking into the offending file shows the following code:

    #if defined NEED_SDL_MIXER

    # if defined SDL_USEFOLDER
    #  if SDL_TARGET == 2
    #   include <SDL2/SDL_mixer.h>
    #  else
    #   include <SDL/SDL_mixer.h>
    #  endif
    # else
    #  include "SDL_mixer.h"
    # endif

The second-to-last line is line 63; the compiler looks for the header file in 
the same directory as the source file, which is obviously wrong. So it seems 
like my environment specification did not set up SDL properly. Can someone who 
has experience with SDL please help me out to understand what is going wrong 
here?


[1] http://eduke32.com/
[2] https://wiki.eduke32.com/wiki/Building_EDuke32_on_Linux

^ permalink raw reply	[flat|nested] 26+ messages in thread
* Re: Need help porting eDuke32
@ 2019-02-17  8:20 HiPhish
  2019-02-17 15:33 ` Pierre Neidhardt
  0 siblings, 1 reply; 26+ messages in thread
From: HiPhish @ 2019-02-17  8:20 UTC (permalink / raw)
  To: help-guix

I have found the problem thanks to one of the eDuke32 developers. Here is the 
issue:

    $ echo $C_INCLUDE_PATH
    /gnu/store/x3r6c04n583q3fz7szm32ahycrxgfiz6-profile/include

Compare this value to

    $ sdl2-config --cflags
    -I/gnu/store/4bhz5xzr39v0kgxf3ipv6kswicrdmkk4-sdl2-2.0.9/include/SDL2

They point to different entries in the store. And the store entry provided by 
sdl2-config does not contain the header file for SDL Mixer (obviously, since 
that one is pointing to the store entry of one package instead of a profile). I 
am already using sdl-union as my input:

    ("sdl-union" ,(sdl-union (list sdl2 sdl2-mixer)))

The makefile uses the output of sdl2-config as part of the compiler flags, so the 
include path points into the wrong directory. Is there a way to get sdl2-config 
to print the correct path?

^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2019-02-26 20:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-16  9:49 Need help porting eDuke32 HiPhish
2019-02-16 10:30 ` Pierre Neidhardt
2019-02-16 12:15 ` nee
2019-02-16 12:20   ` Pierre Neidhardt
2019-02-16 16:45 ` Marius Bakke
  -- strict thread matches above, loose matches on Subject: below --
2019-02-17  8:20 HiPhish
2019-02-17 15:33 ` Pierre Neidhardt
2019-02-17 16:21   ` HiPhish
2019-02-21 19:19     ` Pierre Neidhardt
2019-02-21 19:22       ` Pierre Neidhardt
2019-02-21 19:27         ` Pierre Neidhardt
2019-02-21 20:27       ` HiPhish
2019-02-22 10:36         ` Pierre Neidhardt
2019-02-22 10:57           ` Pierre Neidhardt
2019-02-22 13:01             ` Pierre Neidhardt
2019-02-24 23:04               ` HiPhish
2019-02-25 16:09                 ` Pierre Neidhardt
2019-02-25 17:51                   ` Andreas Enge
2019-02-25 18:59                     ` Giovanni Biscuolo
2019-02-26  9:57                       ` Tobias Geerinckx-Rice
2019-02-26 10:00                         ` Pierre Neidhardt
2019-02-26 11:18                         ` HiPhish
2019-02-26 14:25                           ` Ricardo Wurmus
2019-02-26 15:41                           ` Jack Hill
2019-02-26 20:50                             ` swedebugia
2019-02-24 23:00             ` HiPhish

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.