Re: [beagleboard] Re: C compiler

2016-03-26 Thread Przemek Klosowski
On Fri, Mar 25, 2016 at 9:03 PM, William Hermans wrote: > william@beaglebone:~/ti$ gcc test.c -o test > william@beaglebone:~/ti$ test > That's because it's the wrong test. type 'which test' and it'll probably say /usr/bin/test. If you don't specify the path, it's using the

Re: [beagleboard] Re: C compiler

2016-03-26 Thread William Hermans
@Richard Cook First thing one needs to understand. Just because the hardware is a beaglebone, does not mean it needs anything special in regards to toolchain's. As long as the tools have an ABI compatible binary, we're fine. The ABI it's self we do not really need to worry about. It's already in

Re: [beagleboard] Re: C compiler

2016-03-26 Thread Graham Haddock
To Richard Cook: My personal recommendation is Derek Molloy's: Exploring BeagleBone: Tools and Techniques for Building with Embedded Linux by Derek Molloy for John Wiley & Sons, 2014 -- ISBN 9781118935125 Book WebSite: includes errata, discussion http://exploringbeaglebone.com/ Source Code:

[beagleboard] Re: C compiler

2016-03-26 Thread cl
William Hermans wrote: > [-- text/plain, encoding 7bit, charset: UTF-8, 52 lines --] > > No chmod needed *IF* you precede the command with a dot slash "./". So when > you run a regular Linux command do you have to type this dot slash ? No > because chmod +x is run on the

[beagleboard] Re: C compiler

2016-03-26 Thread cl
Dieter Wirz wrote: > On Fri, Mar 25, 2016 at 3:57 PM, Graham Haddock > wrote: > > Yes. > > sudo chmod 755 myprogram > > or > > sudo chmod 755 myprogram.o > > > Graham, please do not tell fairy tails on this list! > > $ echo '#include ' > hello.c > $

[beagleboard] Re: C compiler

2016-03-26 Thread Richard Cook
Not to belabor the point but I am in about the same situation as Brainiac. Is there a cookbook guide to compiling, linking, and running C programs on beaglebone? It seems that most BB folks are comfortable with linux toolchain but many people come to this board with little linux knowledge, eg.

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
lol . . . way off the point by now. But since we're way off point I will make my disappointment known. First, Linux is purportedly know as the developers OS by developers, yes ? So with that in mind it's probably a good assumption that many people are going to be developing software on it. So . .

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Mike
On 03/25/2016 09:44 PM, William Hermans wrote: ooops forgot to add this. william@beaglebone:~/ramfs$ which test william@beaglebone:~/ramfs$ sudo su root@beaglebone:/home/william/ramfs# which test root@beaglebone:/home/william/ramfs# exit exit* * On Fri, Mar 25, 2016 at 6:42 PM, William Hermans

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Mike
On 03/25/2016 09:51 PM, William Hermans wrote: /Careful. '/usr/bin/test' is often a real program for/ /shells that don't have builtin 'test'. Which you just/ /overwrote./ I had no idea . . . good thing this is a test image - heh. Thanks Peter :) root@ticktock:/dev# type test

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
> > *Careful. '/usr/bin/test' is often a real program for* > * shells that don't have builtin 'test'. Which you just* > * overwrote.* > I had no idea . . . good thing this is a test image - heh. Thanks Peter :) On Fri, Mar 25, 2016 at 6:49 PM, Peter Hurley wrote: > On

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Peter Hurley
On 03/25/2016 06:03 PM, William Hermans wrote: > william@beaglebone:~/ti$ gcc test.c -o test > william@beaglebone:~/ti$ test 'test' is a bash builtin > william@beaglebone:~/ti$ ./test > 32.540001 > > william@beaglebone:~/ti$ sudo ln -s /home/william/ti/test /usr/bin/test Careful.

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
ooops forgot to add this. william@beaglebone:~/ramfs$ which test william@beaglebone:~/ramfs$ sudo su root@beaglebone:/home/william/ramfs# which test root@beaglebone:/home/william/ramfs# exit exit On Fri, Mar 25, 2016 at 6:42 PM, William Hermans wrote: >

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
william@beaglebone:~/ramfs$ cat test.c #include int main() { printf("hello world !\n"); return 0; } william@beaglebone:~/ramfs$ gcc test.c -o test william@beaglebone:~/ramfs$ la -al test -bash: la: command not found william@beaglebone:~/ramfs$ ls -al test -rwxr-xr-x 1 william

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Mike
On 03/25/2016 09:22 PM, William Hermans wrote: So be a little bit clearer for you folks that are wondering what's going on. ~/ti for william on this system is the mount point for an NFS share. Both machines have user william, but it is possible that the UID for each is different. I've run into

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
So be a little bit clearer for you folks that are wondering what's going on. ~/ti for william on this system is the mount point for an NFS share. Both machines have user william, but it is possible that the UID for each is different. I've run into this problem before, and it creates all sorts of

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
umask has no effect on the current situation. None, period, zip. On Fri, Mar 25, 2016 at 6:16 PM, Mike wrote: > On 03/25/2016 09:03 PM, William Hermans wrote: > > william@beaglebone:~/ti$ gcc test.c -o test > william@beaglebone:~/ti$ test > william@beaglebone:~/ti$ ./test

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Mike
On 03/25/2016 09:03 PM, William Hermans wrote: william@beaglebone:~/ti$ gcc test.c -o test william@beaglebone:~/ti$ test william@beaglebone:~/ti$ ./test 32.540001 william@beaglebone:~/ti$ sudo ln -s /home/william/ti/test /usr/bin/test william@beaglebone:~/ti$ test william@beaglebone:~/ti$ cd ..

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
> > *chmod +x test* > > *Regards,* > Yeah, thats what I thought too, but it doesn't work. I suspect in my case the symbolic link is getting in the way. But thats not the only issues thats going on. Looking into it On Fri, Mar 25, 2016 at 6:10 PM, Robert Nelson wrote: >

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Robert Nelson
On Mar 25, 2016 8:03 PM, "William Hermans" wrote: > > william@beaglebone:~/ti$ gcc test.c -o test > william@beaglebone:~/ti$ test > william@beaglebone:~/ti$ ./test > 32.540001 > > william@beaglebone:~/ti$ sudo ln -s /home/william/ti/test /usr/bin/test > william@beaglebone:~/ti$

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
william@beaglebone:~/ti$ gcc test.c -o test william@beaglebone:~/ti$ test william@beaglebone:~/ti$ ./test 32.540001 william@beaglebone:~/ti$ sudo ln -s /home/william/ti/test /usr/bin/test william@beaglebone:~/ti$ test william@beaglebone:~/ti$ cd .. william@beaglebone:~$ test william@beaglebone:~$

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
> > *Nothing at all to do with gcc, reread what I already posted...* Your system, and mine behave nothing alike. For instance if I attempt to run an executable without using dot slash prefixed. The executable will simple fail silently. On Fri, Mar 25, 2016 at 5:30 PM, Mike

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Mike
On 03/25/2016 08:11 PM, William Hermans wrote: Im guessing that perhaps gcc's -o option now days enables the executable bit on the output file ? I haven't looked into that however. Nothing at all to do with gcc, reread what I already posted... Mike On Fri, Mar 25, 2016 at 5:08 PM, William

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
Im guessing that perhaps gcc's -o option now days enables the executable bit on the output file ? I haven't looked into that however. On Fri, Mar 25, 2016 at 5:08 PM, William Hermans wrote: > No, Mike is absolutely correct. dot's meaning in this context is current >

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
No, Mike is absolutely correct. dot's meaning in this context is current directory, and slash is just a path modifier / separator. Putting the file in ones $PATH would solve the "problem" of having to use dot slash I've know this forever, I do not know why I was thinking that chmod +x would solve

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Mike
On 03/25/2016 02:03 PM, William Hermans wrote: No chmod needed *IF* you precede the command with a dot slash "./". So when you run a regular Linux command do you have to type this dot slash ? No because chmod +x is run on the executable at some point . . . So be nice to fellow group users who

Re: [beagleboard] Re: C compiler

2016-03-25 Thread William Hermans
No chmod needed *IF* you precede the command with a dot slash "./". So when you run a regular Linux command do you have to type this dot slash ? No because chmod +x is run on the executable at some point . . . So be nice to fellow group users who actually know what they're talking about, and have

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Dieter Wirz
On Fri, Mar 25, 2016 at 3:57 PM, Graham Haddock wrote: > Yes. > sudo chmod 755 myprogram > or > sudo chmod 755 myprogram.o > Graham, please do not tell fairy tails on this list! $ echo '#include ' > hello.c $ echo 'int main (void) { printf ("Hello, world!\n"); return 0;

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Graham Haddock
Yes. sudo chmod 755 myprogram or sudo chmod 755 myprogram.o --- Graham On Fri, Mar 25, 2016 at 9:50 AM, Seppo Nikkilä < seppo.nikk...@innovativeideas.fi> wrote: > myprogram.o > > On Fri, Mar 25, 2016 at 3:27 PM, Graham wrote: > >> And after you create the file for the

Re: [beagleboard] Re: C compiler

2016-03-25 Thread Seppo Nikkilä
myprogram.o On Fri, Mar 25, 2016 at 3:27 PM, Graham wrote: > And after you create the file for the first time, you will need to change > its permissions > so that it is executable. > use an incantation like: > sudo chmod 755 myprogram.c > > You will really need to become

[beagleboard] Re: C compiler

2016-03-25 Thread Graham
And after you create the file for the first time, you will need to change its permissions so that it is executable. use an incantation like: sudo chmod 755 myprogram.c You will really need to become familiar with the basics of Linux, if you are working on a Linux platform like the BeagleBone

[beagleboard] Re: C compiler

2016-03-25 Thread cl
Wadi Ben Rhouma wrote: > [-- text/plain, encoding quoted-printable, charset: UTF-8, 66 lines --] > > thx ,sorry i have another question, i'm not failiar with LINUX , so can u > help me with this , how can i write a C code on the terminal and excute it > on my BBB ?? >