Thursday, July 26, 2007

More on mldonkey and loongson

My little patch to mldonkey's Makefile donesn't satisfy mldonkey developer. I didn't come up with a better solution. So I resorted to modify mldonkey's ebuild. Maybe not so elegant, but it works, at least for me.

I added the following snippet to src_install():
EXE="mlnet mld_hash get_range copysources make_torrent subconv"

if [ -f mlnet.byte ]; then
for i in $EXE; do
mv $i.byte $i
done
fi
dobin $EXE || die "dobin failed"
The ebuild could found here:
http://www.gentoo-cn.org/loongson-overlay/net-p2p/mldonkey/

This overlay is independent from the one on dev.lemote.com, although the latter was actually registered by me. Because I can't access dev.lemote.com's svn repository, probably due to network problem. So I just maintain this overlay locally, using git. To get it, run:
git-clone http://www.gentoo-cn.org/loongson-overlay/.git
BTW, I have just registered a domain name: gentoo-cn.org. I will make it theportal site of Chinese Gentoo community. As of this writing, this site is hosting latest Chinese Gentoo handbook and zh_cn GWN. Take a look:
http://www.gentoo-cn.org/doc/zh_cn/handbook/
http://www.gentoo-cn.org/news/zh_cn/gwn/gwn.xml

I have been translating Gentoo handbook with my translation teammates for several months. We hope we can setup an official translation team soon.
Current progress: http://gentoo.linuxsir.org/doc/progress.xml
Our activities could be found here: http://groups.google.com/group/gentoo-china

Labels: , , , ,

Wednesday, July 18, 2007

Mldonkey can work on Loongson

In short, ocaml doesn't have native code compiler for mips linux, but it can compile byte code which is also an ELF executable. The only difference is that bytecode runs slower than native code. But there is a little problem with mldoney's Makefile. I will try to make a patch to solve the problem.

PS: maybe i misunderstood something. I found that mlnet.byte can't run on its own, it needs bytecode file.

PPS: I found the mlnet.byte i have installed into /usr/bin is not the right one.

PPPS: it is the right one, but gentoo stripped it, haha, now it works, finally!
http://caml.inria.fr/pub/ml-archives/caml-list/2002/08/492887df149fb58b1c21ffa89e6fee66.en.html

The following is a conversation happened on #mldonkey @ freenode

(r0bertz) what is the difference between mlnet and mlnet.byte
* lb001_ has quit (Remote closed the connection)
* lb001_ (i=irc@gateway/tor/x-f2c1251672831851) has joined #mldonkey
(jave) r0bertz: mlnet.byte is byte compiled
(jave) you will normaly use plain mlnet binary, if you are not interested in debugging and stuff
(r0bertz) it seems that it is also ELF executable
(r0bertz) not like java bytecode
(r0bertz) i mean mlnet.byte
* lanwin has quit (Read error: 104 (Connection reset by peer))
* belZe^ is now known as belZe
* pango has quit (Remote closed the connection)
(spiralvoice) r0bertz, Ocaml can produce two types of binaries, byte- or native code
(spiralvoice) r0bertz, native code is not available for all platforms
(spiralvoice) r0bertz, byte code is available on all Ocaml-supported platforms
(spiralvoice) r0bertz, native code is faster than byte code
(r0bertz) spiralvoice, any differences other than speed?
(spiralvoice) no, both do the same
(spiralvoice) for MLDonkey there are no limitations when using mlnet.byte instead of a native code mlnet binary
(spiralvoice) having mlnet.byte either means your platform does not support Ocaml native code or you did not install the native code compilers
(r0bertz) i understand that
(spiralvoice) r0bertz, which CPU do you use?
(r0bertz) thank you
(r0bertz) mips
(r0bertz) loongson to be exact
* pango (i=iiiiiiii@gateway/tor/x-ac4b6990098162f7) has joined #mldonkey
(r0bertz) i know ocaml only has native compiler on irix on sgi machines
(spiralvoice) http://caml.inria.fr/ocaml/portability.en.html
(spiralvoice) correct
(r0bertz) it seems that there is a little problem with mldonkey's Makefile, if i only have *.byte, make install doesn't work
(spiralvoice) make install was never tested in all situations, copying the binary is not that complicated;-) you can send in a patch if you like
(r0bertz) ok
(r0bertz) i will try

Labels: , , ,

Friday, July 06, 2007

Misunderstanding of free in free software

I bought a digital product magazine this afternoon.
It is called e-zone. It is issue 464, released on July 05 2007.
This magazine is the No.1 computer/digital product magazine in Hong Kong.
There is an article talked about GPLv3 in this issue.
However, they translate "free software foundation" as "免费软件基金会"(gratis software foundation).
This is an unacceptable mistake.
Free here means freedom, not gratis.
I've already send them an email.
I hope they can fix it immediately.

Labels:

my patch to strace was accepted

https://sourceforge.net/tracker/?func=detail&atid=102861&aid=1659465&group_id=2861
This is a mips related patch.
I made this patch when I porting Gentoo to loongson.
--
Zhang Le, Robert
http://r0bertz.blogspot.com
http://zh.gentoo-wiki.com
http://savannah.nongnu.org/projects/pgubook
http://groups.google.com/group/gentoo-china
http://groups.google.com/group/szlug

Labels: , ,