Author Topic: Setting Up Ndless C Compiler  (Read 15996 times)

0 Members and 2 Guests are viewing this topic.

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Setting Up Ndless C Compiler
« 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?

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline apcalc

  • The Game
  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1393
  • Rating: +120/-2
  • VGhlIEdhbWUh (Base 64 :))
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #1 on: August 14, 2011, 12:22:04 pm »
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. :(


Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #2 on: August 15, 2011, 05:48:18 pm »
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

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #3 on: August 15, 2011, 05:55:09 pm »
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
Ndless.me with the finest TI-Nspire programs

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #4 on: August 15, 2011, 06:01:42 pm »
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...

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #5 on: August 15, 2011, 06:03:02 pm »
What error(s) do you get when you try to compile the samples?

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #6 on: August 15, 2011, 06:09:42 pm »
The terminal gives me "make: nspire-gcc: Command not found."
The line after, it gives error 127 with "command not found."

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #7 on: August 15, 2011, 06:21:40 pm »
for that, you need to add [ndless directory]/sdk/bin to your path

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #8 on: August 15, 2011, 06:27:07 pm »
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 I ran the script and got an error while installing gcc.

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #9 on: August 15, 2011, 08:09:13 pm »
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...
« Last Edit: August 15, 2011, 08:26:57 pm by sammyMaX »

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #10 on: August 15, 2011, 09:10:59 pm »
Try changing the permissions of the bin directory, so that anyone can execute.
« Last Edit: August 15, 2011, 09:11:16 pm by t0xic_kitt3n »

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #11 on: August 16, 2011, 01:30:23 pm »
How do I change the permissions of a folder? (chmod on a folder?)

Are you wondering who Sammy is? My avatar is Sammy.
   

Offline fb39ca4

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1749
  • Rating: +60/-3
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #12 on: August 16, 2011, 02:56:52 pm »
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.

Offline Goplat

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 289
  • Rating: +82/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #13 on: August 16, 2011, 03:17:34 pm »
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.
« Last Edit: August 16, 2011, 03:22:19 pm by Goplat »
Numquam te deseram; numquam te deficiam; numquam circa curram et te desolabo
Numquam te plorare faciam; numquam valedicam; numquam mendacium dicam et te vulnerabo

Offline sammyMaX

  • LV5 Advanced (Next: 300)
  • *****
  • Posts: 204
  • Rating: +9/-0
    • View Profile
Re: Setting Up Ndless C Compiler
« Reply #14 on: August 16, 2011, 03:21:44 pm »
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.
« Last Edit: August 16, 2011, 03:27:00 pm by sammyMaX »

Are you wondering who Sammy is? My avatar is Sammy.