Mailing List Archive

executing compiled programs outside /usr/bin (Go language on maemo N900?)
Hi, some months ago I started playing with Go on my n900.

after compiling a simple HelloWorld.go file I have to move the 5.out
result file to /usr/bin and chmod +x to be able to execute it and have
it output "Hello World !". (Details in forwarded message).

Can I avoid this? Is there any configurations?

This might be a very simple matter but I don't know what to do.

thanks
f(t)

---------- Forwarded message ----------
From: Francisco Diaz Trepat - gmail <francisco.diaztrepat@gmail.com>
Date: Mon, 21 Jun 2010 19:15:05 -0300
Subject: Re: [go-nuts] anyone trying Go language on maemo N900?
To: Mathieu Lonjaret <mathieu.lonjaret@gmail.com>, chris dollin
<ehog.hedge@googlemail.com>
Cc: golang-nuts <golang-nuts@googlegroups.com>

Thanks your replies.

First of all, sorry I forgot to add ./5.out to the list of thing I tried out
"tried as root also _. 5.out_ chmod +x, etc."

This is how I got it to work:
~/MyDocs/Workspace/Go/hello $ root

BusyBox v1.10.2 (Debian 3:1.10.2.legal-1osso30+0m5) built-in shell (ash)
Enter 'help' for a list of built-in commands.

Nokia-N900:~# cd /home/user/MyDocs/Workspace/Go/hello/
Nokia-N900:/home/user/MyDocs/Workspace/Go/hello# ./5.out
-sh: ./5.out: Permission denied
Nokia-N900:/home/user/MyDocs/Workspace/Go/hello# chmod +x ./5.out
Nokia-N900:/home/user/MyDocs/Workspace/Go/hello# ./5.out
-sh: ./5.out: Permission denied
Nokia-N900:/home/user/MyDocs/Workspace/Go/hello# cp 5.out /usr/bin/
Nokia-N900:/home/user/MyDocs/Workspace/Go/hello# cd /usr/bin/
Nokia-N900:/usr/bin# chmod +x 5.out
Nokia-N900:/usr/bin# 5.out
Hellow World, my N900 kicks @#%$#, and I tell it with Go. Awesome!!!

Nokia-N900:/usr/bin# rm 5.out
Nokia-N900:/usr/bin# 5.out

-sh: 5.out: not found

Second should I build a make script or something of the sort that:
Compiles
Links
Copy to usr/bin/Gobuild (or something like that)


How are you guys handling this? Suggestions?

f(t)
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: executing compiled programs outside /usr/bin (Go language on maemo N900?) [ In reply to ]
On Tue, Oct 26, 2010 at 7:57 AM, Francisco Diaz Trepat - gmail
<francisco.diaztrepat@gmail.com> wrote:
> Hi, some months ago I started playing with Go on my n900.
>
> after compiling a simple HelloWorld.go file I have to move the 5.out
> result file to /usr/bin and chmod +x to be able to execute it and have
> it output "Hello World !". (Details in forwarded message).
>
> Can I avoid this? Is there any configurations?
>
> This might be a very simple matter but I don't know what to do.

MyDocs on N900 is a FAT32 partition and does not support proper linux
permissions (so your chmod +x is not having effect). If you move your
workspace directory to /home/user/Workspace instead of
/home/user/MyDocs/Workspace, then it should hopefully work.
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: executing compiled programs outside /usr/bin (Go language on maemo N900?) [ In reply to ]
Hi,

Paul Hartman wrote:
> On Tue, Oct 26, 2010 at 7:57 AM, Francisco Diaz Trepat - gmail
>> Can I avoid this? Is there any configurations?
>
> MyDocs on N900 is a FAT32 partition and does not support proper linux
> permissions (so your chmod +x is not having effect). If you move your
> workspace directory to /home/user/Workspace instead of
> /home/user/MyDocs/Workspace, then it should hopefully work.

It's also mounted noexec. Anywhere outside $HOME/MyDocs should work,
doesn't have to be Workspaces.

Cheers,
Dave.

--
maemo.org docsmaster
Email: dneary@maemo.org
Jabber: bolsh@jabber.org

_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: executing compiled programs outside /usr/bin (Go language on maemo N900?) [ In reply to ]
Just what I was looking for.

Thanks man.

Why is that though? the vfat? why not ext3?

f(t)

On 10/26/10, Paul Hartman <paul.hartman+maemo@gmail.com> wrote:
> On Tue, Oct 26, 2010 at 7:57 AM, Francisco Diaz Trepat - gmail
> <francisco.diaztrepat@gmail.com> wrote:
>> Hi, some months ago I started playing with Go on my n900.
>>
>> after compiling a simple HelloWorld.go file I have to move the 5.out
>> result file to /usr/bin and chmod +x to be able to execute it and have
>> it output "Hello World !". (Details in forwarded message).
>>
>> Can I avoid this? Is there any configurations?
>>
>> This might be a very simple matter but I don't know what to do.
>
> MyDocs on N900 is a FAT32 partition and does not support proper linux
> permissions (so your chmod +x is not having effect). If you move your
> workspace directory to /home/user/Workspace instead of
> /home/user/MyDocs/Workspace, then it should hopefully work.
> _______________________________________________
> maemo-users mailing list
> maemo-users@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-users
>
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: executing compiled programs outside /usr/bin (Go language on maemo N900?) [ In reply to ]
On Tue, Oct 26, 2010 at 3:15 PM, Francisco Diaz Trepat - gmail
<francisco.diaztrepat@gmail.com> wrote:
> On 10/26/10, Paul Hartman <paul.hartman+maemo@gmail.com> wrote:
>> MyDocs on N900 is a FAT32 partition and does not support proper linux
>> permissions (so your chmod +x is not having effect). If you move your
>> workspace directory to /home/user/Workspace instead of
>> /home/user/MyDocs/Workspace, then it should hopefully work.
> Just what I was looking for.
>
> Thanks man.
>
> Why is that though? the vfat? why not ext3?

Because MyDocs partition is what gets mounted when you plug your N900
into a computer, and the typical filesystem for USB-attached storage
is FAT32. For example, if you buy a USB hard drive or MicroSD card it
will almost always come formatted as FAT32...

Good news is that with N900 you are free to repartition that as you
like, see the wiki for more info:

http://wiki.maemo.org/Repartitioning_the_flash

Have fun :)
_______________________________________________
maemo-users mailing list
maemo-users@maemo.org
https://lists.maemo.org/mailman/listinfo/maemo-users
Re: executing compiled programs outside /usr/bin (Go language on maemo N900?) [ In reply to ]
I just openned the link.
I looks like I will have fun. :-)

f(t)

On Tue, Oct 26, 2010 at 6:12 PM, Paul Hartman
<paul.hartman+maemo@gmail.com<paul.hartman%2Bmaemo@gmail.com>
> wrote:

> On Tue, Oct 26, 2010 at 3:15 PM, Francisco Diaz Trepat - gmail
> <francisco.diaztrepat@gmail.com> wrote:
> > On 10/26/10, Paul Hartman <paul.hartman+maemo@gmail.com<paul.hartman%2Bmaemo@gmail.com>>
> wrote:
> >> MyDocs on N900 is a FAT32 partition and does not support proper linux
> >> permissions (so your chmod +x is not having effect). If you move your
> >> workspace directory to /home/user/Workspace instead of
> >> /home/user/MyDocs/Workspace, then it should hopefully work.
> > Just what I was looking for.
> >
> > Thanks man.
> >
> > Why is that though? the vfat? why not ext3?
>
> Because MyDocs partition is what gets mounted when you plug your N900
> into a computer, and the typical filesystem for USB-attached storage
> is FAT32. For example, if you buy a USB hard drive or MicroSD card it
> will almost always come formatted as FAT32...
>
> Good news is that with N900 you are free to repartition that as you
> like, see the wiki for more info:
>
> http://wiki.maemo.org/Repartitioning_the_flash
>
> Have fun :)
> _______________________________________________
> maemo-users mailing list
> maemo-users@maemo.org
> https://lists.maemo.org/mailman/listinfo/maemo-users
>