make -f makefile.ms PLATFORM=dos
Use the very latest and full version of DJGPP, its bash port, and utilities.
ZSNES 1.51 source code:
https://sourceforge.net/projects/zsnes/files/zsnes/ZSNES%20v1.51/zsnes151src.tar.bz2/download
Information on compiling ZSNES 1.51 for DOS, Windows, Linux:
https://github.com/emillon/zsnes/blob/master/docs/install.txt
Compile 1.51 in DJGPP:
http://board.zsnes.com/phpBB3/viewtopic.php?f=6&t=137399&view=next
DJGPP 2.05 download and information:
http://devel.archefire.org/forum/viewtopic.php?hl=es&p=4306#p4306
http://www.zlib.net/zlib-1.2.11.tar.gz
https://sourceforge.net/projects/libpng/files/libpng14/1.4.21/lpng1421.zip/download
Add #include to stdio.h to all source files in the "tools/" directory that don't already include it, and also to parsegen.cpp in the root source directory.
Copy the libpng include files to the DJGPP include directory, no matter if you destroy it for other projects, you should modify a temporary install of DJGPP for this compilation. Do the same for zlib if any ZIP related errors appear during the compilation.
Edit the file makefile.ms and delete any -Ws GCC switch as DJGPP doesn't recognize it.
Also search for any -lpdcur occurrence and change it to -lpdc~1
Re: Share how to compile difficult programs
Posted: Wed Sep 13, 2017 3:29 am
by Solar
Oh how I despise "video instructions"... non-searchable, non-siftable, at the mercy of the presenter's speed and timing...
Besides, shouldn't instructions on how to compile known hard-to-compile programs be posted to the respective program's support forums instead of being collected in a OSDev.org thread?
Re: Share how to compile difficult programs
Posted: Wed Sep 13, 2017 4:39 am
by AJ
+1
Surely if something is hard to compile using the build system recommended by the developer, that should be a bug that they need to fix so that it isn't hard to compile? Having said that, the only tools I ever compile are OSDev tools on Bash on Ubuntu on Windows, so maybe this view is slightly naïve.
Cheers,
Adam
Re: Share how to compile difficult programs
Posted: Sun Sep 17, 2017 6:09 am
by dseller
Personally I think there is little use in "learning" how to compile a specific program. Instead, you should focus your effort on learning how to compile any piece of software.
The build process is merely a means to an end, not a goal itself.
99% pct of compile attempt that I follow through the instruction fails. IMO, it is problem with industry, degenerate so-called developers who call themselves who cares nothing but their own build environment setup in their tiny cubicle. In the end, I usually chose not to pursue the effort if does not work on first try because it is never ending journey. Most of the time, instruction are inaccurate, incomplete and/or simply wrong.
In the past various build attempt failure I have seen:
Most of the linux utility, application source does not compile, not even close, dependency problem is difficulty to resolve. I dont remember any linux uitility that compiled right off the bat, the only exception I can remember is iperf. That is about it. The recent ones I remember that failed miserably : wireshark, AI framework i.e. tensorflow, caffe, bitcoin-cli. It is a compile-and-pray thing. (Remember plug-and-pray?).
UEFI source, even the people who were actively involved in maintaining could not setup the build environment fresh start.
Re: Share how to compile difficult programs
Posted: Tue Sep 19, 2017 12:37 am
by iansjack
I find that almost all Linux applications compile first time, as long as I read the README and ensure that any dependencies are installed before attempting to compile the main program. Perhaps I'm just lucky.
I certainly see no point in documenting individual programs here - documentation belongs with the program source, not with a website about OS development.
Re: Share how to compile difficult programs
Posted: Tue Sep 19, 2017 10:55 pm
by Solar
Just recall how many people, over the years, complained about the cross-compiler tutorial in our wiki "not working".
Hundreds?
And every single time, it turned out they were missing something along the lines, hadn't really followed the instructions or made some other newb mistake...
Re: Share how to compile difficult programs
Posted: Wed Sep 20, 2017 1:35 am
by ggodw000
Solar wrote:Just recall how many people, over the years, complained about the cross-compiler tutorial in our wiki "not working".
Hundreds?
And every single time, it turned out they were missing something along the lines, hadn't really followed the instructions or made some other newb mistake...
Yes there are hundreds but also am afraid there are shoddy instructions and documentations everywhere. As for myself, speaking from my experience, I read line by line digest every word written, still most open source does not compile whatever documentation comes along are mostly POC. Even the publisher say something like "it everything goes well", "hope this works", "try this". In a strictest sense it is hesitation, uncertainty and usually problematic.
Re: Share how to compile difficult programs
Posted: Wed Sep 20, 2017 2:32 pm
by ~
Solar wrote:Oh how I despise "video instructions"... non-searchable, non-siftable, at the mercy of the presenter's speed and timing...
Besides, shouldn't instructions on how to compile known hard-to-compile programs be posted to the respective program's support forums instead of being collected in a OSDev.org thread?
I always do my best to include the instructions in text form to my video tutorials, which exist just in the known ~99% likely case that the person compiling will not understand them readily:
make -f makefile.ms PLATFORM=dos
Use the very latest and full version of DJGPP, its bash port, and utilities.
ZSNES 1.51 source code:
https://sourceforge.net/projects/zsnes/files/zsnes/ZSNES%20v1.51/zsnes151src.tar.bz2/download
Information on compiling ZSNES 1.51 for DOS, Windows, Linux:
https://github.com/emillon/zsnes/blob/master/docs/install.txt
Compile 1.51 in DJGPP:
http://board.zsnes.com/phpBB3/viewtopic.php?f=6&t=137399&view=next
DJGPP 2.05 download and information:
http://devel.archefire.org/forum/viewtopic.php?hl=es&p=4306#p4306
http://www.zlib.net/zlib-1.2.11.tar.gz
https://sourceforge.net/projects/libpng/files/libpng14/1.4.21/lpng1421.zip/download
Add #include to stdio.h to all source files in the "tools/" directory that don't already include it, and also to parsegen.cpp in the root source directory.
Copy the libpng include files to the DJGPP include directory, no matter if you destroy it for other projects, you should modify a temporary install of DJGPP for this compilation. Do the same for zlib if any ZIP related errors appear during the compilation.
Edit the file makefile.ms and delete any -Ws GCC switch as DJGPP doesn't recognize it.
Also search for any -lpdcur occurrence and change it to -lpdc~1
Version 5:
http://ftp.gwdg.de/pub/msdos/gcc/djgpp/v2misc/csdpmi5s.zip
set path=%path%;\bc31\bin
cd \csdpmi5s\SRC\CWSDPMI
make
make -DRING=0
Version 7:
http://ftp.gwdg.de/pub/msdos/gcc/djgpp/v2misc/csdpmi7s.zip
set path=%path%;\bc31\bin
cd \csdpmi7s\SRC\CWSDPMI
make
make -DRING=0
Borland C++ 3.1 with TASM:
http://devel.archefire.org/downfile.php?path=/compilers/DOS/Borland/&filename=BC31INST.zip
Re: Share how to compile difficult programs
Posted: Fri Nov 03, 2017 10:09 am
by Thomas
AJ wrote:+1
Surely if something is hard to compile using the build system recommended by the developer, that should be a bug that they need to fix so that it isn't hard to compile? Having said that, the only tools I ever compile are OSDev tools on Bash on Ubuntu on Windows, so maybe this view is slightly naïve.
Cheers,
Adam
Most often what happens is that, original plugins libraries become depreciated and project has been abandoned for a long time. All of a sudden, some customer has a request to make it work for the latest and greatest. Then even though, you can get it compiled with some efforts and hacks here and there, It will have loads of issues and a huge chunk will need to re written. But it is art to come up with solution with minimal changes so that your contributions to bugs is minimal. I am still learning the trade ...