From mboxrd@z Thu Jan 1 00:00:00 1970 From: nee Subject: Re: Need help porting eDuke32 Date: Sat, 16 Feb 2019 13:15:19 +0100 Message-ID: <4618be8d-a282-23ec-2a84-6bd2a7c434e5@cock.li> References: <2813443.L9NyMg9ZKX@aleksandar-ixtreme-m5740> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:56982) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1guysQ-0000C5-BY for help-guix@gnu.org; Sat, 16 Feb 2019 07:15:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1guysP-0000xf-G9 for help-guix@gnu.org; Sat, 16 Feb 2019 07:15:26 -0500 Received: from cock.li ([185.100.85.212]:36092) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1guysO-0000uM-LW for help-guix@gnu.org; Sat, 16 Feb 2019 07:15:25 -0500 In-Reply-To: <2813443.L9NyMg9ZKX@aleksandar-ixtreme-m5740> Content-Language: en-GB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: hiphish@posteo.de Cc: help-guix@gnu.org Hello thank you for packaging eDuke32! I recently had a similar problem with a SDL package and solved it like th= is: (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=3D1`. 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=3D-DX=3D1))) 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 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!