New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't compile on Linux Mint 19.1. #68
Comments
Thank you for providing the full text of the compiler errors! You guessed correctly that The error about If you can't get your The error about |
Clang doesn't enable this warning by default, so we pass it explicitly. GCC pre-GCC 7 doesn't recognize the flag, so we can't pass it for GCC. GCC 7 enables it by default as part of -Wextra. Fixes zenorogue#68.
Well, I assumed at first the output might look like garbage when copied and pasted over here, because it doesn't display in the terminal neatly.
I actually was trying to use the first method to compile the program, as this is what worked when I compiled it on my machine running Linux Mint 18.1. I only really tried the second method as an afterthought, and I had not actually searched for any information regarding the errors due to the second method. I generally don't use Google either.
I'm not sure how I could be using an outdated version of SDL_Mixer.h. I have downloaded both SDL2_mixer 2.0 and 1.2 and compiled them from source and installed them. I even copied and pasted files from my Linux Mint 18.1 machine and put them in the exact same directories they were located in on that machine, and still the compiler doesn't seem to recognize their presence. Using the "--includedir" command doesn't solve anything either.
I might try that, but I still think I should be able to compile it with the other method. |
Looking through the issue history here will show you my opinion of the "other method." ;)
Oh, it sees them, all right. If the compiler couldn't find "SDL_Mixer.h" in the filesystem, it would say
So that's how I knew that you did have "SDL_Mixer.h" on your filesystem, but it contained C++ code that didn't mention I'll admit this is bizarre. The official distribution has had Can you run the compiler command line with
|
I'll have to check it out.
Good to know it isn't an issue of the compiler not finding the file.
I'm not sure what you're asking me to do. The ./configure script doesn't have an option for '-H'. As for the contents of my SDL_mixer.h file (from the source /usr/include/SDL/SDL_mixer.h, as there are others), here it is:
I take it this is the command you want me to run in the terminal with the second method? Output is here: |
Okay, I think I got it fixed. It is compiling now. From the contents of the command you sent me, I noticed it was using the SDL_mixer.h file from the folder /usr/local/include/SDL and NOT from the folder /usr/include/SDL. So I copied the files over to /usr/local/include/SDL and the configure script was able to run successfully. In the process of compiling now. Thanks for your help! Edit: It compiled clean! Playing now. |
Hello. Sorry to bother you guys. I've done quite a bit of legwork trying to get this to work, installing all the dependencies I can think of, moving around header files and whatnot, but I am just completely unable to get this game to compile on Linux Mint 19.1 (the newest one). I got it to compile on another computer running Linux Mint 18.1 just fine though.
The error I am getting is this:
$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking GL/glew.h usability... no
checking GL/glew.h presence... no
checking for GL/glew.h... no
GLEW header was not found
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking SDL/SDL.h usability... yes
checking SDL/SDL.h presence... yes
checking for SDL/SDL.h... yes
checking SDL/SDL_gfxPrimitives.h usability... yes
checking SDL/SDL_gfxPrimitives.h presence... yes
checking for SDL/SDL_gfxPrimitives.h... yes
checking SDL/SDL_mixer.h usability... no
checking SDL/SDL_mixer.h presence... no
checking for SDL/SDL_mixer.h... no
configure: error: SDL/SDL_mixer.h header was not found
I installed everything I could think of, including compiling the SDL_Mixer stuff from source, and nothing would work. I am guessing I need to include some directories or something, but nothing I used with ./configure --includedir would work.
On a related note, I also could not get the second compiling method to work. For that one, it was looking for various SDL header files in the /usr/local/include/SDL/ folder, which I eventually manually downloaded and moved to the folder. I got this error in the end:
$ make -f Makefile.simple
g++ -O2 -DLINUX -std=c++11 -march=native -W -Wall -Wextra -Werror -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -DCAP_GLEW=0 -DCAP_PNG=0 -c hyper.cpp -o hyper.o
In file included from compileunits.h:88:0,
from init.cpp:4,
from hyper.cpp:18:
sound.cpp: In function ‘void hr::handlemusic()’:
sound.cpp:102:7: error: ‘Mix_FadeInMusicPos’ was not declared in this scope
Mix_FadeInMusicPos(music[id], -1, musfadeval, musicpos[id] / 1000.0);
^~~~~~~~~~~~~~~~~~
sound.cpp:102:7: note: suggested alternative: ‘Mix_FadeInMusic’
Mix_FadeInMusicPos(music[id], -1, musfadeval, musicpos[id] / 1000.0);
^~~~~~~~~~~~~~~~~~
Mix_FadeInMusic
In file included from compileunits.h:40:0,
from init.cpp:4,
from hyper.cpp:18:
pattern2.cpp: In function ‘int hr::patterns::generateCanvas(hr::cell*)’:
pattern2.cpp:1327:9: error: this statement may fall through [-Werror=implicit-fallthrough=]
if(archimedean) return colortables['A'][arcm::current.tilegroup[arcm::id_of(c->master)]];
^~
pattern2.cpp:1328:7: note: here
case 'B':
^~~~
In file included from compileunits.h:70:0,
from init.cpp:4,
from hyper.cpp:18:
screenshot.cpp: In function ‘void hr::anims::show()’:
screenshot.cpp:814:23: error: this statement may fall through [-Werror=implicit-fallthrough=]
dialog::addBreak(100);
~~~~~~~~~~~~~~~~^~~~~
screenshot.cpp:816:5: note: here
case maTranslation:
^~~~
cc1plus: all warnings being treated as errors
Makefile.simple:140: recipe for target 'hyper.o' failed
make: *** [hyper.o] Error 1
Dunno what that means. Any help appreciated!
The text was updated successfully, but these errors were encountered: