unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: 宋文武 <iyzsong@gmail.com>
To: Christopher Allan Webber <cwebber@dustycloud.org>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: [PATCH] Add extremetuxracer (Note: needs help!)
Date: Mon, 27 Apr 2015 22:43:28 +0800	[thread overview]
Message-ID: <874mo11vjj.fsf@gmail.com> (raw)
In-Reply-To: <87pp6pitxb.fsf@earlgrey.lan>

Christopher Allan Webber <cwebber@dustycloud.org> writes:

> 宋文武 writes:
>
>> Christopher Allan Webber <cwebber@dustycloud.org> writes:
>>
>>> Hello all!
>>>
>>> Can we really and truly claim ourselves to be a GNU/Linux distribution
>>> without the token inclusion of our beloved TuxRacer?  Egads!
>>>
>>> Well, I attempted to package it, but I'm running into trouble.  Perhaps
>>> someone here can help?
>>>
>>> Here is the problem I run into:
>>>   
>>>   checking for sdl-config... /gnu/store/pvcr6n01ylrj3g9ggwp98bmrzyd0h29q-sdl-1.2.15/bin/sdl-config
>>>   checking for SDL - version >= 1.0.0... yes
>>>   checking for pkg-config... no
>>>   checking for SDLIMAGE... no
>>>   configure: error: SDL_image not found
>>>   phase `configure' failed after 7 seconds
>>>
>>> But sdl-image is in the inputs!  What am I doing wrong?
>> You need 'pkg-config', so add it to 'native-inputs'.
>>
>> Look at the 'configure.ac', it contains:
>>
>>   PKG_CHECK_MODULES([SDLIMAGE], [SDL_image], ...)
>>
>> That's all I see :-)
>
> Thank you, and you're right!  Shows how little I know about building
> traditional packages.  Ah well, Guix is helping me there!
>
> But now I am having a new problem:
>
>   g++ -DHAVE_CONFIG_H -I.   -DETR_DATA_DIR=\"/gnu/store/bhfr0gh4nlna1k7wcy2qm1w4d0gsmwh5-extremetuxracer-0.6.0/share\"  -g -O2 -I/gnu/store/s3myrsqza4nnh4lrhmh51r9vzc4392pm-freetype-2.5.5/include/freetype2 -std=c++11 -MT course.o -MD -MP -MF .deps/course.Tpo -c -o course.o course.cpp
>   In file included from bh.h:62:0,
>                    from common.h:21,
>                    from common.cpp:22:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'common.o' failed
>   make[2]: *** [common.o] Error 1
>   make[2]: *** Waiting for unfinished jobs....
>   In file included from bh.h:62:0,
>                    from course.cpp:22:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'course.o' failed
>   make[2]: *** [course.o] Error 1
>   In file included from bh.h:62:0,
>                    from audio.h:20,
>                    from audio.cpp:21:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'audio.o' failed
>   make[2]: *** [audio.o] Error 1
>   In file included from bh.h:62:0,
>                    from config_screen.h:20,
>                    from config_screen.cpp:42:
>   /gnu/store/g5xq9m0l5qclk0f47mf6vybrnqav0vmg-sdl-image-1.2.12/include/SDL/SDL_image.h:27:17: fatal error: SDL.h: No such file or directory
>    #include "SDL.h"
>                    ^
>   compilation terminated.
>   Makefile:612: recipe for target 'config_screen.o' failed
>   make[2]: *** [config_screen.o] Error 1
>   make[2]: Leaving directory '/tmp/nix-build-extremetuxracer-0.6.0.drv-0/etr-0.6.0'
>   Makefile:632: recipe for target 'all-recursive' failed
>   make[1]: *** [all-recursive] Error 1
>   make[1]: Leaving directory '/tmp/nix-build-extremetuxracer-0.6.0.drv-0/etr-0.6.0'
>   Makefile:457: recipe for target 'all' failed
>   make: *** [all] Error 2
>
> sdl is an input, so I don't know what's going on...
>
> Sorry!  I thought this one was going to be an easy package that I
> wouldn't need much help on!
oops, I take a deep look.  It turn out that
this package set the flags (for SDL, etc.) as 'CFLAGS',
but it only use 'CXXFLAGS' (only have freetype) when compile cpp files.
I think we can patch the Makefile after 'configure' phase, by:

  (substitute* "Makefile"
    (("CXXFLAGS =") "CXXFLAGS = ${CFLAGS)"))

And better, ask upstream for a real fix :-)

  parent reply	other threads:[~2015-04-27 14:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-27  4:42 [PATCH] Add extremetuxracer (Note: needs help!) Christopher Allan Webber
2015-04-27  5:23 ` 宋文武
2015-04-27 13:23   ` Christopher Allan Webber
2015-04-27 14:18     ` David Thompson
2015-04-27 14:43     ` 宋文武 [this message]
2015-04-27 16:23       ` Christopher Allan Webber
2015-04-27 16:40         ` Christopher Allan Webber
2015-04-27 18:14           ` David Thompson

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=874mo11vjj.fsf@gmail.com \
    --to=iyzsong@gmail.com \
    --cc=cwebber@dustycloud.org \
    --cc=guix-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).