Frankly, this is in part a note to myselft... but could be considered a 
follow-up to me trying to compile gnuchess.



So after "plugging"

http://www.delorie.com/pub/djgpp/current/v2gnu/gpp1020b.zip and

http://www.delorie.com/pub/djgpp/current/v2tk/ls080b.zip



The problem is linked to the fact that CPP stdlib have been (I think) compiled 
with --disable-nls .

In gettext.h, if NLS is disabled, it #include <cstdlib.h>

which seems an old not correct anymore way to include stuff:

https://developers.redhat.com/blog/2016/02/29/why-cstdlib-is-more-complicated-than-you-might-think



In fact I have tried:

#include <cstdlib.h>

//#include <stdlib.h>



int main (){

  return 0;

}

which does not find cstdllib.h.



So I commented out the 

#include <cstdlib.h>

at line 54 of gnuchess lib/gettext.h



and configure gnuchess with:

 ac_cv_func_malloc_0_nonnull=yes ac_cv_func_realloc_0_nonnull=yes ./configure 
--build=i686-pc-linux-gnu --host=i386-pc-msdosdjgpp 



which is a trick (workaround) I have taken from:

https://github.com/maxmind/libmaxminddb/issues/144#issuecomment-757101861

leaving out --with-gnu-ld ... not thinking it would apply to cross-compiling... 
unsure.



And now I get:

Making all in adapter

make[3] : on entre dans le répertoire « 
/home/paul/Téléchargements/gnuchess/src/adapter »

i386-pc-msdosdjgpp-g++ -DHAVE_CONFIG_H -I. -I../../src  -I../../src   -g -O2 
-MT adapter.o -MD -MP -MF .deps/adapter.Tpo -c -o adapter.o adapter.cpp

adapter.cpp:32:10: fatal error: sys/select.h: No such file or directory

   32 | #include <sys/select.h>

      |          ^~~~~~~~~~~~~~

compilation terminated.



I begin to suspect directly compiling under DJGPP rather than cross-compiling 
might be easier.
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to