Linux build: Ubuntu - executable permissions?

Expanding and utilizing the engine via C++.
8 posts Page 1 of 1
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Wed Jul 20, 2016 6:20 pm
Am attempting to build 3.9 in Ubuntu 14.04, the only real hiccup I had was the CMake version but I installed a PPA for that and seemed to be on my way. However, on completion I had what appeared to be a very large executable file (182 M). Figuring that was weird but could be normal if we're including static libraries instead of dlls or something, I of course tried to run it, but got a "command not found" result. Also noticed that no matter how hard I chmod it, I can't give it any permissions.

Does this sound like I have a corrupt executable file? Would be interested in hearing at least the size of anybody's working executable (I didn't change anything in CMake except to set the project name, so I guess this is probably a debug build, will have to look that up.)

The only clue I saw that anything might be wrong was a failed link to libSDL.so, but I think that was in the build install phase, and the .so appears to be in my game directory. Hmm.

Any advice and/or hand holding would be welcome.
JeffR
DEVGRU
Posts: 957
Joined: Tue Feb 03, 2015 9:49 pm
 
by JeffR » Wed Jul 20, 2016 11:17 pm
The large size isn't unusual. It tends to build in a bunch of debugging stuff. You can trim that down to a more normal size using the strip command.

As for the 'command not found'. I don't think I'd run into that before. Were you trying to launch if with a debugger, or were you just trying to execute the application directly? Though, if you noted a failure of linkage, that could very well be the issue. Maybe try doing a recompile and see if it re-links correctly?
Jason Campbell
Posts: 362
Joined: Fri Feb 13, 2015 2:51 am
 
by Jason Campbell » Thu Jul 21, 2016 4:37 am
I am new to Linux(and in love with it) so might not be of much help. I have compiled it successfully though. My executable is 185.7 MB.

I just followed the Compiling in Linux page, which I assume you did.

Is it possible you somehow compiled without super-user privileges?

Maybe double check your libraries. This part
sudo apt-get install libogg-dev libxft-dev libx11-dev libxxf86vm-dev libopenal-dev libfreetype6-dev libxcursor-dev libxinerama-dev libxi-dev libxrandr-dev libxss-dev libglu1-mesa-dev
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Thu Jul 21, 2016 7:17 am
Hm, it seems like I have some kind of permissions problem on this whole hard drive, it's not my main system drive but rather a mounted spin drive under media/user/... Not sure what's up, there's obviously write permission because CMake and GCC had no problem making files, but I can't seem to set execute permission or grant group or public permissions. Argh. But, doesn't seem to be a Torque problem anyway. I'll see what I can figure out.
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Fri Jul 22, 2016 7:24 am
Sorry, been busy AFK but for anyone interested, I think the issue I'm having is related to Ubuntu's treatment of FAT32 filesystems. Apparently I have to install some libraries or something. The way I got here was throwing an old windows spin drive with a lot of room on it into my Ubuntu system. Will let ya know when I get it sorted.
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Sun Jul 31, 2016 11:53 pm
Okay, the permissions problem is solved, for anyone who runs across this issue with a windows drive on an ubuntu system, my solution involved adding the following line to my /etc/fstab file and making sure contradictory information was not being called in my /etc/mtab file. (You will have to ensure the correct drive names, etc for your system of course.)

Code: Select all

/dev/sdb1 /mnt/sdb1 ntfs default,uid=1000,gid=1000,dmask=027,permissions 0 0
I'm not an expert, so use at your own risk.

But anyway, my new problem has to do with that libSDL issue mentioned before. Namely, it can't seem to use the symlink, because I have symlinks automatically set up by the build system which point from libSDL2-2.0.so to another symlink called libSDL2-2.0.so.0, and thence to libSDL2-2.0.so.0.4.0 which is the actual 6 gig file.

I've tried making these hard links, and then simply copying the actual file to both of the above names, making sure all are executable, but it continues to report "cannot open shared object file: No such file or directory"

Any ideas? Has anybody else compiled 3.9 on ubuntu yet?

EDIT: answering my own questions here, maybe this would have been done for me had I gone the "make install" route rather than copying files manually, but I got past the libSDL problem by copying libSDL2-2.0.so.0.4.0 into my /lib directory under the name libSDL2-2.0.so.0.

So, with that obstacle breached, my next one appears... I get actual console output, starting with "Initializing platform...", and things seem to be going pretty well until it gets to the renderer, where it first tries D3D9, then goes to OpenGL, and can't find OpenGL for some reason. It then tries the Null Device Renderer, makes it for a few more lines and then seg faults.

I know I have OpenGL installed, other 3D apps work and I have freeglut3 and freeglut3-dev up to date.

Hmmm.
Last edited by chriscalef on Mon Aug 01, 2016 12:24 am, edited 1 time in total.
Duion
Posts: 1636
Joined: Sun Feb 08, 2015 1:51 am
 
by Duion » Mon Aug 01, 2016 12:15 am
I just deleted the symlink files and replaced them with the real file, called like the symlink, this allows me to shift the files through windows file system and not breaking them.
chriscalef
Posts: 398
Joined: Mon Feb 09, 2015 7:48 pm
by chriscalef » Mon Aug 01, 2016 12:25 am
Hm, yeah that didn't seem to work for me, I tried that first. But now that that particular issue seems to be out of the way, is there anything weird about how we're looking for OpenGL that might be biting me?
8 posts Page 1 of 1

Who is online

Users browsing this forum: No registered users and 2 guests