From: nee <nee@cock.li>
To: hiphish@posteo.de
Cc: help-guix@gnu.org
Subject: Re: Need help porting eDuke32
Date: Sat, 16 Feb 2019 13:15:19 +0100 [thread overview]
Message-ID: <4618be8d-a282-23ec-2a84-6bd2a7c434e5@cock.li> (raw)
In-Reply-To: <2813443.L9NyMg9ZKX@aleksandar-ixtreme-m5740>
Hello thank you for packaging eDuke32!
I recently had a similar problem with a SDL package and solved it like this:
(arguments '(#:phases
(modify-phases %standard-phases
(add-before 'build 'fix-env
(lambda* (#:key inputs #:allow-other-keys)
(setenv "CPATH" (string-append (assoc-ref inputs
"sdl-union")
"/include/SDL/"))
#t)))))
That should also work in your case if you want to get quickly by the
issue and solve other problems.
But like the first reply said, in your case it would probably be cleaner
to pass SDL_USEFOLDER to Make via make-flags and then have it be passed
from Make to gcc, but I would have to look at the makefile first.
>Can someone who has experience with SDL please help me out to
understand what is going wrong here?
I think the general problem exists because in the past some distros
installed SDL headers without the SDL/ prefix leaving game makers
uncertain how to include it.
In the C file you posted the C compiler checks if there is a #define for
SDL_USEFOLDER. Depening on the defines it will look for SDL_mixer.h in a
different location (SDL/SDL_mixer.h SDL2/SDL_mixer.h or SDL_mixer.h).
Defines can either be set in c code via #define X 1
or in the gcc compiler call via `gcc test.c -DX=1`.
gcc is called from make. Usually there are make-flag variables like
CFLAGS or DEFINES that are expanded into the arguments that gcc will be
called with. They can be set with (arguments (#:make-flags
'(DEFINES=-DX=1)))
Often Makefiles are generated by configure files (GNU autotools) and
configure will insert the defines based on the configure-flags it was
called with. You would set that via something like
(arguments (#:make-flags '(--use-sdl-folders)))
C includes will be looked up in the directories of the C_INLUDE_PATH or
CPATH Shell Environment Variables. When there is an #include <file.h>
and the CPATH is /usr/local/include:/some/include/ and neither
/usr/local/include/file.h nor /some/include exist you get the error
message that you posted.
I hope some of that is understandable and helps you out.
Happy hacking!
next prev parent reply other threads:[~2019-02-16 12:15 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-16 9:49 Need help porting eDuke32 HiPhish
2019-02-16 10:30 ` Pierre Neidhardt
2019-02-16 12:15 ` nee [this message]
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
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=4618be8d-a282-23ec-2a84-6bd2a7c434e5@cock.li \
--to=nee@cock.li \
--cc=help-guix@gnu.org \
--cc=hiphish@posteo.de \
/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.