Omnimaga
Calculator Community => TI Calculators => Calculator C => Topic started by: sammyMaX on August 14, 2011, 12:17:29 pm
-
I posted this in the "Tutorial - Setting up C Development Environment for the TI-Nspire" section, but the topic hasn't been active for several months so I started a new one.
Anyways, here's my problem: I've added ...blah/ndless2/sdk/bin to my PATH variable (in Ubuntu) but when after typing in "make" in the hello sample folder, I get this error: "make: execvp: nspire-gcc: Permission denied." If I type in "sudo make", I get "make: nspire-gcc: Command not found." What's wrong?
-
Though it probably is outdated at this point, that tutorial was meant for setup in Windows. I think some steps must be performed differently when setting up on Linux, but since I don't use Linux, I can't be of any help. :(
Sorry. :(
-
I've received some help from Lionel Debroux back in the main "Setting up the Development Environment" topic, although I'm still having some problems (and he hasn't responded yet :o) Hopefully I can still get this thing going in Linux. I do also have Windows 7 installed, and I'll install YAGARTO as a last resort. Meanwhile, if you're interested, I'm making a bignum program (currently very slow but operational in Lua) that I'm porting over to C as soon as this is done: http://ourl.ca/12521 (http://ourl.ca/12521)
-
Please take the time to update the tutorial on Hackspire with any additional setup required for your Linux installation: http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction
-
I haven't gotten the toolchain to actually work yet... it still doesn't compile samples. I'm waiting on Lionel Debroux (or anyone with knowledge) to help me through this...
-
What error(s) do you get when you try to compile the samples?
-
The terminal gives me "make: nspire-gcc: Command not found."
The line after, it gives error 127 with "command not found."
-
for that, you need to add [ndless directory]/sdk/bin to your path
-
Yeah, I did :( I also installed the package gcc-4.5-arm-linux-gnueabi, but Lionel told me it was better to use the script he posted for non-Ubuntu versions of Linux, found here: http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction (http://hackspire.unsads.com/wiki/index.php/C_and_assembly_development_introduction) I ran the script and got an error while installing gcc.
-
Sorry for the double post, but I found something REALLY weird. I type in "nspire-gcc" into the console, and it gives me "/home/anonymous/ndless2/sdk/bin/nspire-gcc: 26: : Permission denied." It knows where nspire-gcc is!!! But then, I type "sudo nspire-gcc," and then it can't find the command!
My guess is that the PATH variable doesn't include /sdk/bin folder for the root user, but for the normal user PATH does include the bin folder. Does anyone have any ideas?
EDIT: I also tried copying and pasting the contents of my sdk/bin folder into /user/bin, since it's in the PATH variable no matter what, but now I get a permission error even with sudo...
-
Try changing the permissions of the bin directory, so that anyone can execute.
-
How do I change the permissions of a folder? (chmod on a folder?)
-
Try "sudo chmod 777" in that directory.
Or, you can run a file browser as root, and in the properties of that folder, change the permissions there. You may also have to do this for the files in that folder, I'm not sure if they inherit permissions from their parent or not.
-
Try "sudo chmod 777" in that directory.
Or, you can run a file browser as root
It should not be necessary to use sudo or run anything as root in order to change the permissions on a directory that you created.
Edit: On Linux, read permission on a directory means being able to list the files in it, while execute permission means being able to access the files in it (provided you also have access to the individual files). These are probably already both set. It's execute permission on the nspire-gcc file that might be missing.
-
I still can't get it to work, even after changing permissions. :( I guess installing MSYS and YAGARTO are my only options...
EDIT: Could the Nspire-gcc errors be due to the ARM toolchain not being set up correctly? I installed an arm-linux-gnueabi instead of the recommended arm-none-eabi.
-
Sorry for the double post, but I found something REALLY weird. I type in "nspire-gcc" into the console, and it gives me "/home/anonymous/ndless2/sdk/bin/nspire-gcc: 26: : Permission denied." It knows where nspire-gcc is!!!
26 could mean line 26, the last line of the nspire-gcc script, where it calls gcc. Maybe it's the permissions on gcc that are wrong?
Try running
which arm-elf-gcc arm-none-eabi-gcc arm-linux-gnueabi-gcc
to find the ARM gcc, and check that that's executable.
-
That may me the case. Can you try using arm-none-eabi-gcc? Or, you could change the nspire-gcc script to use the version you have.
-
Yes, the last line of the script is definitely the problem. Nspire-gcc should be able to run without elevated privileges, right?
Too many posts at once! Yes, I will try installing gcc as arm-none-eabi.
-
Uhmm... how do you configure gcc to be arm-none-eabi? I downloaded the source and I have no idea what to do. In the meantime, I will be installing MSYS and YAGARTO.
-
Odd, the nspire-gcc i have is configured to work with both versions of gcc.
-
I still can't get it to work, even after changing permissions. :( I guess installing MSYS and YAGARTO are my only options...
Could just show us what a ls -l outputs in Ndless's bin/ directory to be sure?
-
The console outputs:
total 4
drwxrwxrwx 6 philip philip 4096 2011-08-15 20:16 sdk
EDIT: Finished installing toolchain in Windows.
-
Could you please do the same in the bin/ directory containing the nspire-* scripts?
-
The terminal outputs:
total 36
-rwxrwxrwx 1 philip philip 20715 2011-06-11 09:55 MakeLoader.exe
-rwxrwxrwx 1 philip philip 872 2011-06-11 09:55 nspire-as
-rwxrwxrwx 1 philip philip 1029 2011-08-16 15:32 nspire-gcc
-rwxrwxrwx 1 philip philip 1935 2011-06-11 09:55 nspire-ld
I noticed the "d" in the front when I did this for the ndless2 folder disappeared. What does the "d" represent?
-
d = directory, l = symlink.
-
And if you just run "./nspire-gcc" from this folder, what happens?
-
Hmmm... I still get permission denied... as sudo.
Edit: and as a standard user.
-
Ok.
And now what does this returns from the same folder: sh -x ./nspire-gcc ?
Sorry for all these tests, but I can't see any other way.
-
I don't mind these tests at all! As long as you're trying to help, it's fine.
The console outputs:
+ uname -s
+ tr [A-Z] [a-z]
+ UNAME=linux
+ dirname ./nspire-gcc
+ DIRNAME=.
+ which readlink
+ readlink ./nspire-gcc
+ [ linux = cygwin ]
+ GCC=
+ -mcpu=arm7tdmi -I ./../include -fpic -fno-builtin
./nspire-gcc: 1: : Permission denied
-
Hmmm... I still get permission denied... as sudo.
Edit: and as a standard user.
Are you running this from a device with a FAT filesystem? Linux will tend to return permission denied when the filesystem doesn't properly support permissions.
-
I installed Linux under the default file system (I'm pretty sure this is ext4)
-
EDIT: Could the Nspire-gcc errors be due to the ARM toolchain not being set up correctly? I installed an arm-linux-gnueabi instead of the recommended arm-none-eabi.
Ok:
- Make sure "which arm-linux-gnueabi-gcc" returns something in a console
- Replace all the occurences of "arm-linux-gnueabi-gcc" with "arm-linux-gnueabi-gcc" in the scripts nspire-gcc, nspire-as and nspire-ld.
-
Okay, I found the problem. I typed in which "arm-linux-gnueabi-gcc" and got nothing back, so I went into Synaptic and found out that while I had packages like "gcc-4.5-arm-linux-gnueabi" and "gcc-4.5-arm-linux-gnueabi-base", I never installed "gcc-arm-linx-gnueabi" because I thought it was the same thing. I already got the environment set up in Windows, but thanks so much for helping me through this!