I can confirm that "<features.h>" exists on mingw-w64 GCC 10.2. Perhaps you could check out whatever latest GCC available from the homebrew. Or, you could remove the line "#include <features.h>" or simply touch a dummy "features.h" in the compiler's header files search path to see if anyone really use it. Sometimes, the symbols or declarations are already there in other included header files for a different compiler from GCC.
Indeed making a dummy features.h file worked.
I ran into other problems that were fixed by using an older Openglide version (when glext.h was still included with it) of CVS of about ten years ago 😉
Hello to all, thanks for accepting me into the forum.
This is the first time i use compiling programs, and sorry if my english isn't perfect. I'm trying to compile DosBox ECE r4426 with MSYS2 64bit because i'd like to include MMX Patch, but i keep getting error during the "make" command. These are the command i use (in case i'm missing something, but i don't get any errors before the final command):
patch -p1 < mmx_20200624.diff
./autogen.sh
./configure
make
below there are the errors, the first one:
1drive_fat.cpp: In constructor 'fatDrive::fatDrive(const char*, Bit32u, Bit32u, Bit32u, Bit32u, Bit32u)': 2drive_fat.cpp:726:47: warning: taking address of packed member of 'partTable' may result in an unaligned pointer value [-Waddress-of-packed-member] 3 726 | mbrData.pentry[m].absSectStart = var_read(&mbrData.pentry[m].absSectStart); 4 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5drive_fat.cpp:727:43: warning: taking address of packed member of 'partTable' may result in an unaligned pointer value [-Waddress-of-packed-member] 6 727 | mbrData.pentry[m].partSize = var_read(&mbrData.pentry[m].partSize); 7 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 8drive_fat.cpp:752:39: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 9 752 | bootbuffer.bytespersector = var_read(&bootbuffer.bytespersector); 10 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 11drive_fat.cpp:753:40: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 12 753 | bootbuffer.reservedsectors = var_read(&bootbuffer.reservedsectors); 13 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 14drive_fat.cpp:754:39: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 15 754 | bootbuffer.rootdirentries = var_read(&bootbuffer.rootdirentries); 16 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ 17drive_fat.cpp:755:41: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 18 755 | bootbuffer.totalsectorcount = var_read(&bootbuffer.totalsectorcount); 19 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ 20drive_fat.cpp:756:38: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 21 756 | bootbuffer.sectorsperfat = var_read(&bootbuffer.sectorsperfat); 22 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 23drive_fat.cpp:757:40: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 24 757 | bootbuffer.sectorspertrack = var_read(&bootbuffer.sectorspertrack); 25 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ 26drive_fat.cpp:758:34: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 27 758 | bootbuffer.headcount = var_read(&bootbuffer.headcount); 28 | ^~~~~~~~~~~~~~~~~~~~~ 29drive_fat.cpp:759:42: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 30 759 | bootbuffer.hiddensectorcount = var_read(&bootbuffer.hiddensectorcount); 31 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32drive_fat.cpp:760:38: warning: taking address of packed member of 'bootstrap' may result in an unaligned pointer value [-Waddress-of-packed-member] 33 760 | bootbuffer.totalsecdword = var_read(&bootbuffer.totalsecdword); 34 | ^~~~~~~~~~~~~~~~~~~~~~~~~ 35drive_fat.cpp: In function 'void copyDirEntry(const direntry*, direntry*)': 36drive_fat.cpp:1062:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 37 1062 | var_write(&dst->crtTime, src->crtTime); 38 | ^~~~~~~~~~~~~ 39drive_fat.cpp:1063:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 40 1063 | var_write(&dst->crtDate, src->crtDate); 41 | ^~~~~~~~~~~~~ 42drive_fat.cpp:1064:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 43 1064 | var_write(&dst->accessDate, src->accessDate); 44 | ^~~~~~~~~~~~~~~~ 45drive_fat.cpp:1065:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 46 1065 | var_write(&dst->hiFirstClust, src->hiFirstClust); 47 | ^~~~~~~~~~~~~~~~~~ 48drive_fat.cpp:1066:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 49 1066 | var_write(&dst->modTime, src->modTime); 50 | ^~~~~~~~~~~~~ 51drive_fat.cpp:1067:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 52 1067 | var_write(&dst->modDate, src->modDate); 53 | ^~~~~~~~~~~~~ 54drive_fat.cpp:1068:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 55 1068 | var_write(&dst->loFirstClust, src->loFirstClust); 56 | ^~~~~~~~~~~~~~~~~~ 57drive_fat.cpp:1069:12: warning: taking address of packed member of 'direntry' may result in an unaligned pointer value [-Waddress-of-packed-member] 58 1069 | var_write(&dst->entrysize, src->entrysize); 59 | ^~~~~~~~~~~~~~~
you can just remove that log message. Replace the line with ;
edit: i misread. The fix jmarsh proposed is editing the file that gives the error and changing it to that.
You are just "running" the fix. That is not what it is for.
This an update on my attempt to get ECE to build in macOS Mojave 10.14.6.
The last point I reported on this, I could not compile because of a missing file:
1In file included from glide.cpp:23: 2../../include/glide.h:64:10: fatal error: 'sdk2_glide.h' file not found 3#include <sdk2_glide.h>
With some useful feedback from Dominus, I managed to get OpenGlide to compile using an older version from the Github repository dated 11 January 2018. This resulted in the following files being added to my system:
I then went back to try compiling ECE using a fresh extract of the source code:
1chmod +x autogen.sh 2dos2unix autogen.sh 3./autogen.sh 4./configure CXXFLAGS="std=c++11" 5CXXFLAGS="std=c++11" make
By the way, this time I could not get CXXFLAGS="-std=c++11-03" make to work, as the "-03" part was rejected with the following output:
error: invalid value 'c++11-03' in '-std=c++11-03'
note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
note […] Show full quote
error: invalid value 'c++11-03' in '-std=c++11-03'
note: use 'c++98' or 'c++03' for 'ISO C++ 1998 with amendments' standard
note: use 'gnu++98' or 'gnu++03' for 'ISO C++ 1998 with amendments and GNU extensions' standard
note: use 'c++11' for 'ISO C++ 2011 with amendments' standard
note: use 'gnu++11' for 'ISO C++ 2011 with amendments and GNU extensions' standard
note: use 'c++14' for 'ISO C++ 2014 with amendments' standard
note: use 'gnu++14' for 'ISO C++ 2014 with amendments and GNU extensions' standard
note: use 'c++17' for 'ISO C++ 2017 with amendments' standard
note: use 'gnu++17' for 'ISO C++ 2017 with amendments and GNU extensions' standard
note: use 'c++2a' for 'Working draft for ISO C++ 2020' standard
note: use 'gnu++2a' for 'Working draft for ISO C++ 2020 with GNU extensions' standard
So I just proceeded to run make with CXX flags set to "std=c++11".
Anyway.. I now have another error on which I am seeking advice/feedback:
1g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -std=c++11 -mno-ms-bitfields -MT glide.o -MD -MP -MF .deps/glide.Tpo -c -o glide.o glide.cpp 2glide.cpp:165:21: error: no member named 'info' in 'SDL_SysWMinfo' 3 hwnd = (HostPt)wmi.info.x11.window; 4 ~~~ ^ 5glide.cpp:390:15: warning: using the result of an assignment as a condition without parentheses [-Wparentheses] 6 while(pfile = readdir(pdir)) { 7 ~~~~~~^~~~~~~~~~~~~~~ 8glide.cpp:390:15: note: place parentheses around the assignment to silence this warning 9 while(pfile = readdir(pdir)) { 10 ^ 11 ( ) 12glide.cpp:390:15: note: use '==' to turn this assignment into an equality comparison 13 while(pfile = readdir(pdir)) { 14 ^ 15 == 16glide.cpp:1017:63: warning: format specifies type 'int' but the argument has type 'Bitu' (aka 'unsigned long') [-Wformat] 17 LOG_MSG("Glide:Invalid buffer passed in grLfbLock (%d)", buffer); 18 ~~ ^~~~~~ 19 %lu 202 warnings and 1 error generated. 21make[4]: *** [glide.o] Error 1 22make[3]: *** [all-recursive] Error 1 23make[2]: *** [all-recursive] Error 1 24make[1]: *** [all-recursive] Error 1 25make: *** [all] Error 2
"-std=c++11" and "-03" are two different parameters. There should be a space between them:
CXXFLAGS="-std=c++11 -03"
Thanks, ./configure will still complete with that parameter, but if I then go onto run make (either just make by itself, or with CXXFLAGS="-std=c++11 -03" , I get the following error in the terminal:
almeathwrote on 2021-01-31, 09:20:Thanks, ./configure will still complete with that parameter, but if I then go onto run make (either just make by itself, or with […] Show full quote
"-std=c++11" and "-03" are two different parameters. There should be a space between them:
CXXFLAGS="-std=c++11 -03"
Thanks, ./configure will still complete with that parameter, but if I then go onto run make (either just make by itself, or with CXXFLAGS="-std=c++11 -03" , I get the following error in the terminal:
About compiling DosBox ECE with MMX patch: i've been able to solve mt32emu errors thanks to the previous comments, and the glide one too (i've taken the required files from openglide and moved into include folder, hoping i've not done it wrong but now compliation continues), but now a new error shown, at this point could be some corrupted packages that casuses errors, but i'm a complete compiling newbie so i cannot know, anyway that's it:
Looks like a typo, you have the -O3 switch written with zero, rather than with the upcase letter O
Thanks, fixed now.
I am now just dealing with the error detailed above:
1glide.cpp:165:21: error: no member named 'info' in 'SDL_SysWMinfo' 2 hwnd = (HostPt)wmi.info.x11.window;
Your libSDL situation is unclear to me...are you using SDL 1.x or 2.0?
(I guess the -I/usr/local/include/SDL switch suggests 1.x?)
If you compiled SDL yourself, it might be worthwhile to check config.log to see what backends were compiled in. X11 missing altogether maybe?
Chuckwrote on 2021-01-31, 13:26:About compiling DosBox ECE with MMX patch: i've been able to solve mt32emu errors thanks to the previous comments, and the glide […] Show full quote
About compiling DosBox ECE with MMX patch: i've been able to solve mt32emu errors thanks to the previous comments, and the glide one too (i've taken the required files from openglide and moved into include folder, hoping i've not done it wrong but now compliation continues), but now a new error shown, at this point could be some corrupted packages that casuses errors, but i'm a complete compiling newbie so i cannot know, anyway that's it:
A little bit of generic info...
The linking stage fails because it doesn't know where to find __memcpy_chk (the libs are listed with the -l switch). But I don't think that there is any lib missing in your case:
It seems __memcpy_chk is a version of memcpy() with buffer overflow checking that is used if a library is compiled with the switch -D_FORTIFY_SOURCE=2. So that raises the question where did that libopus come from? EDIT: The libopus library is fetched automatically, so should be ok.
You could try recompiling libopus with CFLAGS="I=/usr/local/llsp", I've seen that mentioned as helping some.
Your libSDL situation is unclear to me...are you using SDL 1.x or 2.0?
(I guess the -I/usr/local/include/SDL switch suggests 1.x?)
If you compiled SDL yourself, it might be worthwhile to check config.log to see what backends were compiled in. X11 missing altogether maybe?
I installed and upgraded SDL1 and 2 via Homebrew. I appear to have SDL1.25.15_3 and SDL2.0.14_1.
In usr/lib I have:
libSDL-1.2.0.dylib (alias of /usr/local/Cellar/sdl/1.2.15_3/lib/libSDL-1.2.0.dylib)
libSDL.a
libSDL.dylib (/usr/local/Cellar/sdl/1.2.15_3/lib/libSDL-1.2.0.dylib)
libSDL2-2.0.0.dylib (an alias of /usr/local/Cellar/sdl2/2.0.14_1/lib/libSDL2-2.0.0.dylib)
libSDL2.a
libSDL2.dylib (an alias of /usr/local/Cellar/sdl2/2.0.14_1/lib/libSDL2-2.0.0.dylib)
libSDL2main.a
libSDLmain.a
There is also an X11 folder in usr/lib, containing:
1checking build system type... x86_64-apple-darwin18.7.0 2checking host system type... x86_64-apple-darwin18.7.0 3checking for a BSD-compatible install... /usr/bin/install -c 4checking whether build environment is sane... yes 5checking for a thread-safe mkdir -p... ./install-sh -c -d 6checking for gawk... gawk 7checking whether make sets $(MAKE)... yes 8checking whether make supports nested variables... yes 9checking whether make sets $(MAKE)... (cached) yes 10checking for gcc... gcc 11checking whether the C compiler works... yes 12checking for C compiler default output file name... a.out 13checking for suffix of executables... 14checking whether we are cross compiling... no 15checking for suffix of object files... o 16checking whether we are using the GNU C compiler... yes 17checking whether gcc accepts -g... yes 18checking for gcc option to accept ISO C89... none needed 19checking whether gcc understands -c and -o together... yes 20checking for style of include used by make... GNU 21checking dependency style of gcc... gcc3 22checking how to run the C preprocessor... gcc -E 23checking for g++... g++ 24checking whether we are using the GNU C++ compiler... yes 25checking whether g++ accepts -g... yes 26checking dependency style of g++... gcc3 27checking for ranlib... ranlib 28checking for sdl-config... /usr/local/bin/sdl-config 29checking for SDL - version >= 1.2.0... yes 30checking SDL version only being 1.2.X... yes 31checking for an ANSI C-conforming const... yes 32checking for inline... inline 33checking for grep that handles long lines and -e... /usr/bin/grep 34checking for egrep... /usr/bin/grep -E 35checking for ANSI C header files... yes 36checking for sys/types.h... yes 37checking for sys/stat.h... yes 38checking for stdlib.h... yes 39checking for string.h... yes 40checking for memory.h... yes 41checking for strings.h... yes 42checking for inttypes.h... yes 43checking for stdint.h... yes 44checking for unistd.h... yes 45checking for size_t... yes 46checking whether struct tm is in sys/time.h or time.h... time.h 47checking size of unsigned char... 1 48checking size of unsigned short... 2 49checking size of unsigned int... 4 50checking size of unsigned long... 8 51checking size of unsigned long long... 8 52checking size of int *... 8 53checking for stdlib.h... (cached) yes 54checking for sys/types.h... (cached) yes 55checking for sys/socket.h... yes 56checking for netinet/in.h... yes 57checking for pwd.h... yes 58checking if environ can be included... no 59checking if environ can be linked... yes 60checking if dirent includes d_type... yes
…Show last 96 lines
61checking for powf in libm... yes 62checking for library containing clock_gettime... none required 63checking if compiler allows __attribute__... yes 64checking if compiler allows __attribute__((always_inline)) ... yes 65checking if compiler allows __attribute__((fastcall)) ... no 66checking if compiler allows __builtin_expect... yes 67checking if compiler supports -mno-ms-bitfields... yes 68checking if compiler supports Apple's Core MIDI headers... yes 69checking if compiler supports Apple's Core Audio headers... yes 70checking for ALSA CFLAGS... 71checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthread 72checking for libasound headers version >= 0.9.0... not present. 73checking for snd_ctl_open in -lasound... no 74checking whether byte ordering is bigendian... no 75checking whether memory handling in the CPU Core will be inlined... yes 76checking for target cpu type... x86-64 bit compatible 77checking whether Apple user wants to override the build process to produce a 32 bit binary... no 78checking whether x86 dynamic cpu core will be enabled... yes 79checking whether recompiling cpu core will be enabled... no, using dynamic-x86 80checking whether fpu emulation will be enabled... yes 81checking whether the x86/x64 assembly fpu core will be enabled... yes 82checking whether to enable unaligned memory access... yes 83checking png.h usability... yes 84checking png.h presence... yes 85checking for png.h... yes 86checking for png_get_io_ptr in -lpng... yes 87checking whether screenshots will be enabled... yes 88checking zlib.h usability... yes 89checking zlib.h presence... yes 90checking for zlib.h... yes 91checking for compress in -lz... yes 92checking whether recording will be enabled... yes 93checking SDL_net.h usability... yes 94checking SDL_net.h presence... yes 95checking for SDL_net.h... yes 96checking for SDLNet_Init in -lSDL_net... yes 97checking for main in -lX11... yes 98checking X11/XKBlib.h usability... yes 99checking X11/XKBlib.h presence... yes 100checking for X11/XKBlib.h... yes 101checking for XKBlib support... yes 102checking for new_fluid_synth in -lfluidsynth... yes 103checking fluidsynth.h usability... yes 104checking fluidsynth.h presence... yes 105checking for fluidsynth.h... yes 106checking for FluidSynth support... yes 107checking wordexp.h usability... yes 108checking wordexp.h presence... yes 109checking for wordexp.h... yes 110checking for main in -lGL... no 111checking for main in -lopengl32... no 112checking GL/gl.h usability... no 113checking GL/gl.h presence... no 114checking for GL/gl.h... no 115checking whether opengl display output will be enabled... yes 116checking ddraw.h usability... no 117checking ddraw.h presence... no 118checking for ddraw.h... no 119checking whether ddraw display output will be enabled... no 120checking sys/mman.h usability... yes 121checking sys/mman.h presence... yes 122checking for sys/mman.h... yes 123checking for mprotect... yes 124checking for realpath... yes 125checking for setpriority support... no 126checking that generated files are newer than configure... done 127configure: creating ./config.status 128config.status: creating Makefile 129config.status: creating src/Makefile 130config.status: creating src/cpu/Makefile 131config.status: creating src/cpu/core_full/Makefile 132config.status: creating src/cpu/core_normal/Makefile 133config.status: creating src/cpu/core_dyn_x86/Makefile 134config.status: creating src/cpu/core_dynrec/Makefile 135config.status: creating src/debug/Makefile 136config.status: creating src/dos/Makefile 137config.status: creating src/fpu/Makefile 138config.status: creating src/gui/Makefile 139config.status: creating src/hardware/Makefile 140config.status: creating src/hardware/mame/Makefile 141config.status: creating src/hardware/serialport/Makefile 142config.status: creating src/ints/Makefile 143config.status: creating src/libs/Makefile 144config.status: creating src/libs/zmbv/Makefile 145config.status: creating src/libs/gui_tk/Makefile 146config.status: creating src/libs/decoders/Makefile 147config.status: creating src/misc/Makefile 148config.status: creating src/shell/Makefile 149config.status: creating src/platform/Makefile 150config.status: creating src/platform/visualc/Makefile 151config.status: creating visualc_net/Makefile 152config.status: creating include/Makefile 153config.status: creating docs/Makefile 154config.status: creating config.h 155config.status: config.h is unchanged 156config.status: executing depfiles commands