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

Fixed SDL related header includes for linux #1212

Closed
wants to merge 2 commits into
base: development
from

Conversation

Projects
None yet
3 participants
@pbrand

pbrand commented Feb 20, 2015

When trying to compile the development branch on Fedora 21 (x86_64) I ran into the following error:

  • fatal error: SDL.h: No such file or directory

This micro contribution fixes the the SDL related header includes, so that the previously mentioned fatal error is resolved. This way the inclusion of SDL related headers is consistent with the the includes of these headers in other classes of this directory as well.

@crabmusket crabmusket added this to the 3.7 milestone Feb 20, 2015

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Feb 20, 2015

Contributor

Thanks for the fix! Glad to hear of people working in Linux. Did you manage to get everything working after this?

Contributor

crabmusket commented Feb 20, 2015

Thanks for the fix! Glad to hear of people working in Linux. Did you manage to get everything working after this?

@LuisAntonRebollo

This comment has been minimized.

Show comment
Hide comment
@LuisAntonRebollo

LuisAntonRebollo Feb 20, 2015

Contributor

We need to do some work for a stable linux version... but we are on the way :)

Not sure why other ppl dont have this problem on Ubuntu and VM.

Contributor

LuisAntonRebollo commented Feb 20, 2015

We need to do some work for a stable linux version... but we are on the way :)

Not sure why other ppl dont have this problem on Ubuntu and VM.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Feb 21, 2015

Contributor

@LuisAntonRebollo merge if it looks good!

Contributor

crabmusket commented Feb 21, 2015

@LuisAntonRebollo merge if it looks good!

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Feb 21, 2015

Unfortunately I have not been able to get everything working yet.
I copied the Empty template to My Projects and ran make debug in the Make_Ded directory.
Everything goes well until it hits:

  • Debug/Empty/app/mainLoop.cpp.o: In function `StandardMainLoop::handleCommandLine(int, char const_)':_

From then on I receive many many undefined reference to ***** errors.
I will look into that soon. If you wish to see the errors, I can provide them. Just let me know how you prefer to receive them e.g. in a link to a file, or embedded in a code block :)

pbrand commented Feb 21, 2015

Unfortunately I have not been able to get everything working yet.
I copied the Empty template to My Projects and ran make debug in the Make_Ded directory.
Everything goes well until it hits:

  • Debug/Empty/app/mainLoop.cpp.o: In function `StandardMainLoop::handleCommandLine(int, char const_)':_

From then on I receive many many undefined reference to ***** errors.
I will look into that soon. If you wish to see the errors, I can provide them. Just let me know how you prefer to receive them e.g. in a link to a file, or embedded in a code block :)

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Feb 21, 2015

Contributor

Interesting. So not using CMake? Any luck following instructions similar to this?

Contributor

crabmusket commented Feb 21, 2015

Interesting. So not using CMake? Any luck following instructions similar to this?

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Feb 27, 2015

Sorry for the late reply. At first I followed the steps of the readme at github so I just used make.
Now that I tried the instructions at your wiki page (thanks for the link, I didn't know there was another guide) it seems to build when using CMake to generate files with the default configuration.
Afterwards, I am able to run the executable, although I'm not completely sure what I should see.
Am I supposed to get errors like: Missing file: core/parseArgs.cs! ? I don't have a core directory for instance.
Nevermind, if I copy the content of Template/Full to my own project, then everything is fine.

pbrand commented Feb 27, 2015

Sorry for the late reply. At first I followed the steps of the readme at github so I just used make.
Now that I tried the instructions at your wiki page (thanks for the link, I didn't know there was another guide) it seems to build when using CMake to generate files with the default configuration.
Afterwards, I am able to run the executable, although I'm not completely sure what I should see.
Am I supposed to get errors like: Missing file: core/parseArgs.cs! ? I don't have a core directory for instance.
Nevermind, if I copy the content of Template/Full to my own project, then everything is fine.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Feb 27, 2015

Contributor

I'm working on updating the readme and github wiki to have the latest information - the previous method is a little old, though it's weird that it doesn't work any more 😂

Contributor

crabmusket commented Feb 27, 2015

I'm working on updating the readme and github wiki to have the latest information - the previous method is a little old, though it's weird that it doesn't work any more 😂

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Feb 28, 2015

I don't know if you are interested in updating the wiki for fedora as well?
If so, I've created a file with the Fedora equivalent of the Ubuntu libraries and how to install them under Fedora, which you can find here

pbrand commented Feb 28, 2015

I don't know if you are interested in updating the wiki for fedora as well?
If so, I've created a file with the Fedora equivalent of the Ubuntu libraries and how to install them under Fedora, which you can find here

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 1, 2015

Contributor

Awesome! Which version of Fedora do you think is a reasonable compatibility indicator? I've added the instructions to this page.

Contributor

crabmusket commented Mar 1, 2015

Awesome! Which version of Fedora do you think is a reasonable compatibility indicator? I've added the instructions to this page.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 1, 2015

Contributor

@pbrand is this change required for you when using CMake to compile? For me, this breaks compiling with gcc in Ubuntu. Is it just me that's screwing something up? CI seems to have had no problems.

Contributor

crabmusket commented Mar 1, 2015

@pbrand is this change required for you when using CMake to compile? For me, this breaks compiling with gcc in Ubuntu. Is it just me that's screwing something up? CI seems to have had no problems.

@crabmusket crabmusket removed the Final review label Mar 1, 2015

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Mar 1, 2015

Regarding your question about which version of Fedora is a reasonable compatibility indicator. I tried to build this project under Fedora 21 (latest stable release at this moment) and Fedora 20 and both were successful.
I think, although I haven't tested this, that other distributions who use the RPM package manager (e.g. RHEL, CentOS, (open)SUSE) might be able to follow the fedora guide to some extent as well. I quickly compared the package naming for openSUSE and Fedora and found them to be quite similar.

pbrand commented Mar 1, 2015

Regarding your question about which version of Fedora is a reasonable compatibility indicator. I tried to build this project under Fedora 21 (latest stable release at this moment) and Fedora 20 and both were successful.
I think, although I haven't tested this, that other distributions who use the RPM package manager (e.g. RHEL, CentOS, (open)SUSE) might be able to follow the fedora guide to some extent as well. I quickly compared the package naming for openSUSE and Fedora and found them to be quite similar.

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Mar 1, 2015

I had problems when using CMake too. However it would be strange to address that to the includes, as some of the other classes already used the SDL/SDL.h before my changes.
I synced my fork with this repository and rebased my branch linux-build. After a ninja-build clean followed by ninja-build the problem was solved for me. Can you please retry to compile it at your machine and notify me if your problem still occurs?

pbrand commented Mar 1, 2015

I had problems when using CMake too. However it would be strange to address that to the includes, as some of the other classes already used the SDL/SDL.h before my changes.
I synced my fork with this repository and rebased my branch linux-build. After a ninja-build clean followed by ninja-build the problem was solved for me. Can you please retry to compile it at your machine and notify me if your problem still occurs?

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 1, 2015

Contributor

Heh, that's definitely not on purpose - feel free to raise a separate issue about it. Indeed, the OpenGL driver should be selected.

Hmm, I wonder why the SDL/SDL.h path was causing problems with just some files. I'll investigate further. It's probably an issue with my setup 😓

Contributor

crabmusket commented Mar 1, 2015

Heh, that's definitely not on purpose - feel free to raise a separate issue about it. Indeed, the OpenGL driver should be selected.

Hmm, I wonder why the SDL/SDL.h path was causing problems with just some files. I'll investigate further. It's probably an issue with my setup 😓

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Mar 1, 2015

So even after the rebase you still experience problems?

pbrand commented Mar 1, 2015

So even after the rebase you still experience problems?

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 1, 2015

Contributor

Yeah, bizarrely the #include in processControl.cpp fails. This is using standard make and gcc. I just reran cmake, let's see how it goes... nope, no deal. No such file or directory. That's weird as.

Contributor

crabmusket commented Mar 1, 2015

Yeah, bizarrely the #include in processControl.cpp fails. This is using standard make and gcc. I just reran cmake, let's see how it goes... nope, no deal. No such file or directory. That's weird as.

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Mar 1, 2015

Okay, make (still) doesn't work for me either, just CMake -> ninja works for me.

pbrand commented Mar 1, 2015

Okay, make (still) doesn't work for me either, just CMake -> ninja works for me.

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 1, 2015

Contributor

Okay, got it. Strange. My setup has been causing issues a bit recently, in cases where CI is fine. Not sure if it's because our CMake setup is only tested using ninja/clang or what. I'll have a chat to some of the other SC members about it. My setup appears to be more pedantic, so I'm not convinced it's wrong... but it's still bizarre, especially in this case.

Contributor

crabmusket commented Mar 1, 2015

Okay, got it. Strange. My setup has been causing issues a bit recently, in cases where CI is fine. Not sure if it's because our CMake setup is only tested using ninja/clang or what. I'll have a chat to some of the other SC members about it. My setup appears to be more pedantic, so I'm not convinced it's wrong... but it's still bizarre, especially in this case.

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Mar 1, 2015

By the way, I just noticed something for the 'Build using Qt Creator' section of the wiki.
I had to go to Projects and override the default 'Make: ninja' command by 'ninja-build' for both 'Build Steps' and 'Clean Steps'. I don't know the command for 'ninja' under Ubuntu, but for fedora it is 'ninja-build'.

pbrand commented Mar 1, 2015

By the way, I just noticed something for the 'Build using Qt Creator' section of the wiki.
I had to go to Projects and override the default 'Make: ninja' command by 'ninja-build' for both 'Build Steps' and 'Clean Steps'. I don't know the command for 'ninja' under Ubuntu, but for fedora it is 'ninja-build'.

@crabmusket crabmusket added the Linux label Mar 1, 2015

@crabmusket

This comment has been minimized.

Show comment
Hide comment
@crabmusket

crabmusket Mar 1, 2015

Contributor

That section is somewhat incomplete just FYI, but thanks, I'll add a note about that.

Contributor

crabmusket commented Mar 1, 2015

That section is somewhat incomplete just FYI, but thanks, I'll add a note about that.

@LuisAntonRebollo

This comment has been minimized.

Show comment
Hide comment
@LuisAntonRebollo

LuisAntonRebollo Mar 8, 2015

Contributor

I get errors, compiler can't get SDL headers :(

This way the inclusion of SDL related headers is consistent with the the includes of these headers in other classes of this directory as well.

It's posible those includes are dead code we dont use.

I think those changes make T3D to search on OS libraries instead of T3D lib folder.

@pbrand, you can compile with CMAKE without this changes?

Contributor

LuisAntonRebollo commented Mar 8, 2015

I get errors, compiler can't get SDL headers :(

This way the inclusion of SDL related headers is consistent with the the includes of these headers in other classes of this directory as well.

It's posible those includes are dead code we dont use.

I think those changes make T3D to search on OS libraries instead of T3D lib folder.

@pbrand, you can compile with CMAKE without this changes?

@pbrand

This comment has been minimized.

Show comment
Hide comment
@pbrand

pbrand Mar 8, 2015

Yes, it works fine if I compile the code of your development branch with CMAKE.
Sorry, I was not aware that you wished to use libraries of the lib folder (at the time when I submitted this pull request).
Like I mentioned earlier, for this fix I used the build instructions for version 3.6.3, which showed me to install the sdl-dev package, that's why I thought I had to use the library of the system.
The SDL/SDL.h should indeed point you to the OS libraries at /usr/include/SDL.
I see that this package is not longer required according to the new build instructions at your wiki.
Maybe that's the difference between the old make files and the new CMAKE method?

pbrand commented Mar 8, 2015

Yes, it works fine if I compile the code of your development branch with CMAKE.
Sorry, I was not aware that you wished to use libraries of the lib folder (at the time when I submitted this pull request).
Like I mentioned earlier, for this fix I used the build instructions for version 3.6.3, which showed me to install the sdl-dev package, that's why I thought I had to use the library of the system.
The SDL/SDL.h should indeed point you to the OS libraries at /usr/include/SDL.
I see that this package is not longer required according to the new build instructions at your wiki.
Maybe that's the difference between the old make files and the new CMAKE method?

@LuisAntonRebollo

This comment has been minimized.

Show comment
Hide comment
@LuisAntonRebollo

LuisAntonRebollo Mar 8, 2015

Contributor

Old linux instruction are for DEDICATED build.. used only for game servers.

Sorry we are a bit in the middle of the change :P

Contributor

LuisAntonRebollo commented Mar 8, 2015

Old linux instruction are for DEDICATED build.. used only for game servers.

Sorry we are a bit in the middle of the change :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment