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
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?
_________________ Every good solution is obvious once you've found it.
Post subject: Re: Share how to compile difficult programs
Posted: Wed Sep 13, 2017 4:39 am
Member
Joined: Sun Oct 22, 2006 7:01 am Posts: 2646 Location: Devon, UK
+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.
Post subject: Re: Share how to compile difficult programs
Posted: Sun Sep 17, 2017 6:09 am
Member
Joined: Thu Jul 03, 2014 5:18 am Posts: 84 Location: The Netherlands
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.
Post subject: Re: Share how to compile difficult programs
Posted: Mon Sep 18, 2017 6:01 pm
Member
Joined: Wed Nov 18, 2015 3:04 pm Posts: 396 Location: San Jose San Francisco Bay Area
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.
_________________ key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
Post subject: Re: Share how to compile difficult programs
Posted: Tue Sep 19, 2017 12:37 am
Member
Joined: Sat Mar 31, 2012 3:07 am Posts: 4594 Location: Chichester, UK
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.
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...
_________________ Every good solution is obvious once you've found it.
Post subject: Re: Share how to compile difficult programs
Posted: Wed Sep 20, 2017 1:35 am
Member
Joined: Wed Nov 18, 2015 3:04 pm Posts: 396 Location: San Jose San Francisco Bay Area
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.
_________________ key takeaway after spending yrs on sw industry: big issue small because everyone jumps on it and fixes it. small issue is big since everyone ignores and it causes catastrophy later. #devilisinthedetails
Post subject: Re: Share how to compile difficult programs
Posted: Wed Sep 20, 2017 2:32 pm
Member
Joined: Tue Mar 06, 2007 11:17 am Posts: 1225
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:
Code:
make -f makefile.ms PLATFORM=dos
Use the very latest and full version of DJGPP, its bash port, and utilities.
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
Post subject: Re: Share how to compile difficult programs
Posted: Fri Nov 03, 2017 10:09 am
Member
Joined: Thu Jun 04, 2009 11:12 pm Posts: 281
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 ...
Users browsing this forum: No registered users and 135 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum