Compilation results differ when run over ssh via screen
I've been working on an automated build setup on my Linux Mint 17 server, and I've run into a weird problem.
Here's how my setup works:
I ssh in and run a build script. The script has 3 options for building:
1. Just run the build commands over ssh, showing the results in the ssh terminal.
2. First do 'export DISPLAY=:0.0' and then do exactly what 1 does.
3. Same as 2, but instead of running ./build, run 'screen -m -d -S $NAME ./build'
The reason there are so many options is that I am using a Code::Blocks project. Code::Blocks does allow you to do builds from the console, but it insists on opening a graphical window as it builds, which is a pain over ssh. I was using Xming (in Windows) to allow the graphical window to work so my build process could be done over ssh. However, that got annoying, and so I added option 2, to use the server's X for that stuff. This still tied up the ssh terminal while building, though, so I added option 3, which is 2, but it does everything in a detached screen so I can move on with my day (and not open another terminal).
So that's my setup. Options 1 and 2 work fine. Option 3 works fine, except for one specific target in the Code::Blocks project, which reliably fails to build (but again, ONLY with option 3). Thus, I've narrowed it down (as far as I can tell) to some kind of problem with running the build in a detached screen. The failing target is a cross-compilation using a compiler I built on the machine.
I don't know much about screen, and just recently discovered it when I started doing lots of stuff over ssh. Is there perchance an obvious reason I might have such a problem? Is the screen environment different in some way from my regular ssh shell?
EDIT: I can give more details, like the actual build error (it happens during linking), but this post was already getting really long, and I wanted to make sure there isn't some obvious trait of how screen works that might cause this first.
Last edited by Dark_Oppressor; 10-17-2014 at 08:37 PM.
|