[maemo-users] executing compiled programs outside /usr/bin (Go language on maemo N900?)

From: Francisco Diaz Trepat - gmail francisco.diaztrepat at gmail.com
Date: Tue Oct 26 15:57:56 EEST 2010
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.


---------- Forwarded message ----------
From: Francisco Diaz Trepat - gmail <francisco.diaztrepat at 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 at gmail.com>, chris dollin
<ehog.hedge at googlemail.com>
Cc: golang-nuts <golang-nuts at 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:
Copy to usr/bin/Gobuild (or something like that)

How are you guys handling this? Suggestions?

More information about the maemo-users mailing list