Re: Need help porting eDuke32
Jack Hill skrev: (26 februari 2019 16:41:44 CET) >Ken, > >If you would like your software included in GNU Guix, I invite you to >work >the the community to find a mutually acceptable license. I expect that >if >you choose to do so the experience will be rewarding. +1 > >For all the rest of us, > >Perhaps this is a blessing in disguise, and we can have the joy of >working >on a free software replacement engine. What a wonderful expression, blessing in disguise my life seems to offer a few of those already. Sdb -- Sent from my k-9 mail for Android.
Re: Need help porting eDuke32
On Tue, 26 Feb 2019, HiPhish wrote: Ken Silverman is an asshole and an idiot for writing his own license instead of using an existing one, or letting an actual lawyer write it. And in 2000 he didn't even have the "dumb teenager" excuse. While non-free software is frustrating (and I'm sure is even more frustrating after having done some work on it assuming it was free), there is no need for name calling. I love that Guix is a community devoted to both software freedom and being an open an welcoming community full of respect and free of insults. Let's not lose sight of one of these goals in pursuit of the other. Ken, If you would like your software included in GNU Guix, I invite you to work the the community to find a mutually acceptable license. I expect that if you choose to do so the experience will be rewarding. For all the rest of us, Perhaps this is a blessing in disguise, and we can have the joy of working on a free software replacement engine. All the best, Jack
Re: Need help porting eDuke32
HiPhish writes: > Ken Silverman is [insults] This language is not appropriate on these mailing lists. Please do not insult people. -- Ricardo
Re: Need help porting eDuke32
Ken Silverman is an asshole and an idiot for writing his own license instead of using an existing one, or letting an actual lawyer write it. And in 2000 he didn't even have the "dumb teenager" excuse. As for the engine, when Duke Nukem 3D was originally written the engine was proprietary, 3D Realms only got a compiled library from Silverman[0]. So in principle it should be possible to write a replacement engine that exposes the same interface to the game module as Build itself. A few years ago I wanted to "port" Duke 3D and Shadow Warrior to the Doomsday Engine[1], but back then my ambitions were way higher than my skill. Maybe it would be worth looking into this again. [0] http://fabiensanglard.net/duke3d/ [1] http://dengine.net/ On Tuesday, 26 February 2019 10:57:17 CET Tobias Geerinckx-Rice wrote: > Giovanni Biscuolo wrote: > > if so: can you build EDuke32 without "BUILD engine"? > > I doubt it. > > BUILD *is* the Duke & friends engine; rip it out and you're left > with the script for a game you can't play. It's GPL though. You > can read the code and imagine what it would look like! > > If there is a libre rewrite of the entire engine, I haven't found > it. > > Sigh[0]: > > Q: Why did you write a custom license instead of using GPL > (GNU's > General Public License)? > > A: Short answer: to satisfy my ego :) > Long answer: I know GPL is an industry standard, but I felt > that it was way too long and boring for anyone to read > seriously. I chose to write a nice short license that > everybody > could understand. This way, people unfamiliar with GPL would > understand their rights. > > Great job. > > T G-R > > [0]: http://advsys.net/ken/buildsrc/
Re: Need help porting eDuke32
I am split between laughing out loud and crying :p Anyways, it's quite clear at this point that this is not fit for GNU Guix. I'll keep it out of tree. Thanks everyone for chiming in and thanks to HiPhish for doing most of the work. -- Pierre Neidhardt https://ambrevar.xyz/ signature.asc Description: PGP signature
Re: Need help porting eDuke32
Giovanni Biscuolo wrote: if so: can you build EDuke32 without "BUILD engine"? I doubt it. BUILD *is* the Duke & friends engine; rip it out and you're left with the script for a game you can't play. It's GPL though. You can read the code and imagine what it would look like! If there is a libre rewrite of the entire engine, I haven't found it. Sigh[0]: Q: Why did you write a custom license instead of using GPL (GNU's General Public License)? A: Short answer: to satisfy my ego :) Long answer: I know GPL is an industry standard, but I felt that it was way too long and boring for anyone to read seriously. I chose to write a nice short license that everybody could understand. This way, people unfamiliar with GPL would understand their rights. Great job. T G-R [0]: http://advsys.net/ken/buildsrc/
Re: Need help porting eDuke32
Hi Pierre and Andreas, Andreas Enge writes: > On Mon, Feb 25, 2019 at 05:09:34PM +0100, Pierre Neidhardt wrote: >> The project uses a custom license: http://eduke32.com/buildlic.txt. >> What do you people think? > > I think the license is non-free: > > [2] Any derivative works based on my Build source may be distributed ONLY >through the INTERNET. > [3] Distribution of any derivative works MUST be done completely FREE of >charge - no commercial exploitation whatsoever. also: --8<---cut here---start->8--- [5] The use of the Build Engine for commercial purposes will require an appropriate license arrangement with me. Contact information is on my web site. --8<---cut here---end--->8--- for sure that license is non-free, sorry! :-( ...but wait! http://eduke32.com/ is **pure confusion** about the licensing information about that piece of software (could someone please tell them?!?): --8<---cut here---start->8--- EDuke32 is open source software that is completely free to use for all non-commercial purposes. --8<---cut here---end--->8--- ehrm: non-commercial open source what?!?!? and a few sentences after: --8<---cut here---start->8--- EDuke32 is licensed under the GNU GPL and the BUILD license. --8<---cut here---end--->8--- ...mumble mumble: GNU GPL version? and the very last sentence in homepage tells us: --8<---cut here---start->8--- BUILD engine technology originally created by Ken Silverman, non-GPL rendering and engine technology used in EDuke32 available under BUILDLIC. --8<---cut here---end--->8--- so "BUILD engine" is non-free but EDuke32 is GNU GPL v? licensed? if so: can you build EDuke32 without "BUILD engine"? are you willing to make a check for every piece of code (or folder) to see if it is licensed as GNU GPL and what version? sorry but it seems a little hard task to liberate that piece of software :-S is it worth an unconfused-EDuke32 meta-fork ala ungoogled-chromium? :-) /me *very* sad to see such confusion... in 2019 Giovanni -- Giovanni Biscuolo Xelera IT Infrastructures signature.asc Description: PGP signature
Re: Need help porting eDuke32
On Mon, Feb 25, 2019 at 05:09:34PM +0100, Pierre Neidhardt wrote: > The project uses a custom license: http://eduke32.com/buildlic.txt. > What do you people think? I think the license is non-free: [2] Any derivative works based on my Build source may be distributed ONLY through the INTERNET. [3] Distribution of any derivative works MUST be done completely FREE of charge - no commercial exploitation whatsoever. I did not read any further. Andreas
Re: Need help porting eDuke32
Couldn't GLU be added as an input in the declaration of eDuke? Polymost and Polymer work for me, but I have GLU already installed on my system via apt. On Friday, 22 February 2019 14:01:35 CET you wrote: > There is one issue though that I get on startup: > > --8<---cut here---start->8--- > Initializing SDL 2.0.9 > Failed loading "libGLU.so.1" > Failed loading GLU. GL modes will be unavailable. Error: Passed a NULL > mutex --8<---cut here---end--->8--- > > This makes it impossible to use the Polymost / Polymer renderers. > > Starting the game with something like > > --8<---cut here---start->8--- > env LD_LIBRARY_PATH=/home/ambrevar/.guix-profile/lib > /gnu/store/j2f51lrgrpayclwfy77191jx3f6cpvq5-eduke32-20181027-7136/bin/eduke > 32 -g duke3d_hrp.zip -g duke3d_mus.zip --8<---cut > here---end--->8--- > > works. (I have installed "glu" into my profile.) > > "glu" is not in the closure of neither eduke32 not sdl2. > > --8<---cut here---start->8--- > > > guix size sdl2 | grep glu > > guix size eduke32 | grep glu > > --8<---cut here---end--->8--- > > It seems to be loaded at runtime. > We could wrap the "eduke32" binary, but I wonder if we could do any better. > Any advice for this?
Re: Need help porting eDuke32
On Friday, 22 February 2019 11:57:31 CET you wrote: > I can merge this in your name, let me know. That's fine by me. You are right about the missing install phase, I was primarily trying to get it to build first before worrying about installing the files. How do you know how to do these things? I read the manual and I couldn't find the programming interface to changing phases. Do you read the source code of Guix to come up with these things? As for the .desktop file and icon, I'd just leave those two open for now. From the looks of it, the eDuke32 project has none, so they should be added to the eDuke32 project itself, then we can add those parts to the install phase later.
Re: Need help porting eDuke32
There is one issue though that I get on startup: --8<---cut here---start->8--- Initializing SDL 2.0.9 Failed loading "libGLU.so.1" Failed loading GLU. GL modes will be unavailable. Error: Passed a NULL mutex --8<---cut here---end--->8--- This makes it impossible to use the Polymost / Polymer renderers. Starting the game with something like --8<---cut here---start->8--- env LD_LIBRARY_PATH=/home/ambrevar/.guix-profile/lib /gnu/store/j2f51lrgrpayclwfy77191jx3f6cpvq5-eduke32-20181027-7136/bin/eduke32 -g duke3d_hrp.zip -g duke3d_mus.zip --8<---cut here---end--->8--- works. (I have installed "glu" into my profile.) "glu" is not in the closure of neither eduke32 not sdl2. --8<---cut here---start->8--- > guix size sdl2 | grep glu > guix size eduke32 | grep glu --8<---cut here---end--->8--- It seems to be loaded at runtime. We could wrap the "eduke32" binary, but I wonder if we could do any better. Any advice for this? -- Pierre Neidhardt https://ambrevar.xyz/ signature.asc Description: PGP signature
Re: Need help porting eDuke32
I needed to add a custom 'install phase: --8<---cut here---start->8--- (modify-phases %standard-phases (delete 'configure) (add-after 'set-paths 'set-sdl-paths ;; The makefile adds the output of `sdl2-config --cflags` to the ;; compiler flags, but sdl2-config gives us the wrong directory to ;; include. We have to add the SDL2 header directory ourselves. (lambda* (#:key inputs #:allow-other-keys) (setenv "CPLUS_INCLUDE_PATH" (string-append (assoc-ref inputs "sdl-union") "/include/SDL2" ":" (getenv "CPLUS_INCLUDE_PATH"))) #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) ;; TODO: Install custom .desktop file? Need icon. (install-file "eduke32" (string-append out "/bin")) (install-file "mapster32" (string-append out "/bin")) (install-file "package/common/buildlic.txt" (string-append out "/share/licenses")) --8<---cut here---end--->8--- I can merge this in your name, let me know. Playing Duke now! "Hail to the king, baby!" -- Pierre Neidhardt https://ambrevar.xyz/ signature.asc Description: PGP signature
Re: Need help porting eDuke32
Thank you for looking it this. I have done my own poking around and here is the idea I came up with, after looking at how some other games were handling SDL: (arguments `(#:phases (modify-phases %standard-phases (delete 'configure) (add-after 'set-paths 'set-sdl-paths ;; The makefile adds the output of `sdl2-config --cflags` to the ;; compiler flags, but sdl2-config gives us the wrong directory to ;; include. We have to add the SDL2 header directory ourselves. (lambda* (#:key inputs #:allow-other-keys) (setenv "CPLUS_INCLUDE_PATH" (string-append (assoc-ref inputs "sdl-union") "/include/SDL2" ":" (getenv "CPLUS_INCLUDE_PATH"))) #t)) (delete 'install This seems cleaner to me than patching. I tested it with `guix build` and it seems to work, but I won't have time until next week to look into it again. On Thursday, 21 February 2019 20:19:35 CET you wrote: > I've looked into this and found the culprit. > > > $ echo $C_INCLUDE_PATH > > /gnu/store/x3r6c04n583q3fz7szm32ahycrxgfiz6-profile/include > > This is not correct. You should have a ":"-separated list of store items > brom bzip2 to libxau. > > > $ sdl2-config --cflags > > -I/gnu/store/4bhz5xzr39v0kgxf3ipv6kswicrdmkk4-sdl2-2.0.9/include/SDL2 > > Indeed, sdl2-config should return the path to the union, not the sdl2 > package. SDL2_mixer is missing, which leads to the error. > > It seems to be an issue with sdl2-config. Any idea, anyone?
Re: Need help porting eDuke32
For eduke32, we can patch Common.mak. The offending lines (around line 910): --8<---cut here---start->8--- SDLCONFIG_CFLAGS := $(strip $(subst -Dmain=SDL_main,,$(shell $(SDLCONFIG) --cflags))) SDLCONFIG_LIBS := $(strip $(subst -mwindows,,$(shell $(SDLCONFIG) --libs))) --8<---cut here---end--->8--- Ideally, we'd need a working sdl2-config though. -- Pierre Neidhardt https://ambrevar.xyz/ signature.asc Description: PGP signature
Re: Need help porting eDuke32
On Sunday, 17 February 2019 16:33:41 CET you wrote: > Can you share your package definition? Sure, I posted the abridged version in the OP, here is the complete definition: (define-public eduke32 (package (name "eduke32") (version "20181027-7136") (source (origin (method url-fetch) (uri (string-append "http://dukeworld.duke4.net/eduke32/synthesis/; version "/eduke32_src_" version ".tar.xz")) (sha256 (base32 "121k2k7ylw8dvs71mrdy7hwb1a2xd5di7jdqc20a1ml5k0n9akpn" (build-system gnu-build-system) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (delete 'configure) (delete 'install (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))) (synopsis "Source port of the classic PC first person shooter Duke Nukem 3D") (description "EDuke32 is an awesome, free homebrew game engine and source port of the classic PC first person shooter Duke Nukem 3D—Duke3D for short—to Windows, Linux, Mac OS X, FreeBSD, several handhelds, your family toaster, and to your girlfriend's vibrator. We've added thousands of cool and useful features and upgrades for regular players and additional editing capabilities and scripting extensions for homebrew developers and mod creators. EDuke32 is open source software that is completely free to use for all non-commercial purposes.") (home-page "http://eduke32.com/;) (license (list gpl2 > Are you running those two commands from the build environment? Yes, from within the same build environment. I executed `guix environment -- pure --load=eduke32.scm` from within the source code directory and ran the commands in the new shell. If I understand the user manual correctly, this should set up an environment in which all dependencies (inputs) declared in the package definition are set up, and nothing else. Is this correct?#!/usr/local/bin/guile !# (define-module (games eduke32) #:use-module ((guix packages) #:select (package origin base32)) #:use-module ((guix download) #:select (url-fetch)) #:use-module ((guix licenses) #:select (gpl2)) #:use-module ((guix build-system gnu) #:select (gnu-build-system)) #:use-module ((guix build-system trivial) #:select (trivial-build-system)) ;; Inputs #:use-module ((gnu packages sdl) #:select (sdl-union sdl2 sdl2-mixer)) #:use-module ((gnu packages gl) #:select (glu)) #:use-module ((gnu packages pkg-config) #:select (pkg-config)) #:use-module ((gnu packages xiph) #:select (libvorbis flac)) #:use-module ((gnu packages video) #:select (libvpx)) #:use-module ((gnu packages gtk) #:select (gtk+-2))) (define-public eduke32 (package (name "eduke32") (version "20181027-7136") (source (origin (method url-fetch) (uri (string-append "http://dukeworld.duke4.net/eduke32/synthesis/; version "/eduke32_src_" version ".tar.xz")) (sha256 (base32 "121k2k7ylw8dvs71mrdy7hwb1a2xd5di7jdqc20a1ml5k0n9akpn" (build-system gnu-build-system) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (delete 'configure) (delete 'install (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))) (synopsis "Source port of the classic PC first person shooter Duke Nukem 3D") (description "EDuke32 is an awesome, free homebrew game engine and source port of the classic PC first person shooter Duke Nukem 3D—Duke3D for short—to Windows, Linux, Mac OS X, FreeBSD, several handhelds, your family toaster, and to your girlfriend's vibrator. We've added thousands of cool and useful features and upgrades for regular players and additional editing capabilities and scripting extensions for homebrew developers and mod creators. EDuke32 is open source software that is completely free to use for all non-commercial purposes.") (home-page "http://eduke32.com/;) (license (list gpl2 eduke32
Re: Need help porting eDuke32
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?
Re: Need help porting eDuke32
Hello, HiPhish writes: > 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 > # else > # include > # 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? The 'include' keyword makes the compiler look for header files in $C_INCLUDE_PATH and a few other locations. The Guix daemon will populate that variable with all inputs that have an "include" directory. Running `guix build sdl2-mixer` shows that it has ".../include/SDL2/SDL_mixer.h". What's needed here is to make sure SDL_USEFOLDER is set such that it searches for as on line 58. Alternatively, you could substitute the code on line 63 to read 'include "SDL2/SDL_mixer.h"' as a probably dirty workaround. HTH! signature.asc Description: PGP signature
Re: Need help porting eDuke32
> OK, some places prefer links if the logs get too large. I'll keep it in mind > for this mailing list. I meant paste a link to the whole build log! :) -- Pierre Neidhardt https://ambrevar.xyz/ signature.asc Description: PGP signature
Re: Need help porting eDuke32
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 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!
Re: Need help porting eDuke32
Hi HiPhish! I'm also interested in packaging this! I'll give it a closer look real soon if you are stuck. > https://pastebin.com/FyJKK6BD It's better if you paste the whole build log. In the guix environment, inspect the C_INCLUDE_PATH variable (e.g. "env | grep C_INCLUDE_PATH"), check if sdl2-mixer is in there. Otherwise try passing "-DSDL_TARGET=2" to the #:make-flags, that could do it. -- Pierre Neidhardt https://ambrevar.xyz/ signature.asc Description: PGP signature