Showing posts from August, 2006


怎么样打印出一个函数的stack backtrace,也就是函数的调用路径?
int i;
void *bt[128];
int bt_size;
char **bt_sym;
printf("\n########## Backtrace ##########\n");
bt_size = backtrace(bt, sizeof(bt) / sizeof(void *));
printf("Number of elements in backtrace: %d\n", bt_size);
bt_sym = backtrace_symbols(bt, bt_size);

for (i = 0; i < bt_size; i++) {
printf("%s\n", bt_sym[i]);
printf("########## Done ##########\n");

sed -e 's/[^(]\+(/c++filt /' -e 's/+0x.*$//g' | xargs -0 sh -c



d4rkstar, how should i learn to program using bayonne script language, i am really frustrated
also i was :)
i adopted a tecnique
the sources are always update
the documentation often not
so i use a text editor and greps the sources for the keywords i need
for example
search "foreach" in all .cpp files in bayonne directory and subdirectories (i include ccscript and bayonne in my search)
so i look at the sources for keyword requirements
thank you, may i can follow your way, :)

Simplify or not to simplify, this is a question.


# fortune-zh V1.0
# Copyright (C) 2006 Zhang Le
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

CMD=`basename "$0"`

if [ -f "${HOME}"/.fortune-zh.conf ] ; then
elif [ -f /etc/fortune-zh.conf ]; then

emake -j1

If you can manually make, but always fail in src_compile(), look at your MAKEOPTS, if it is "-j2", consider using "emake -j1"

I committed bayonne2-1.5.26.ebuild to voip overlay

First of all, thanks to genstef!
Two days ago, I was very happy to see that bayonne2 was in voip overlay.
After a while I was disappointed, coz I found the version was too old and would not compile sip driver.
So I modified the original ebuild to make a ebuild for bayonne2's latest version.
Now I have commited it to voip overlay.
It was not that easy(well, at least not for a newbie like me). I made a patch for it, otherwise sandbox violation would occur.
It is here:

nogetch = on in prozilla.conf

If you want to enable parallel-fetch FEATURE and use prozilla as your fetch command, DO remember to enbale nogetch option in prozilla.conf.
Otherwise there exists the possibility that you'll be driven mad, :)

I talked to Redhatter on #gentoo-mips about Godson

Wikipedia article about Godson.

(zhllg) Linux running on China's Godson CPU
(zhllg) Godson's instruction set is compatible with MIPS
(redhatter) wmv?
* Redhatter points out that Microsoft don't produce a Linux version of Windows Media Player
(redhatter) s/don't/doesn't/ rather
(zhllg) however, we can play it with mplayer if win32codec USE flag is enabled.
(zhllg) btw, i just find that link somewhere else, i am not the publisher
(redhatter) we can play it with mplayer on x86 with win32codecs USE flag :-)
(redhatter) Those Godson machines _do_ look nice though... pity they're damn hard to get hold of outside of China.
(zhllg) i have a dream that one day Gentoo could have Godson support, haha
(redhatter) Indeed... although that won't happen unless one of us can get hold of one.
(zhllg) Maybe you have known this,
(redhatter) Indeed, those are the ones I h…

Compile kernel as a normal user

I just heard this trick from my friend, rae.
It is quite easy:
make a dir, cd into itcp /boot/config .config (suppose you use "make install" to install kernel, :-D)make -C /usr/src/linux O=$PWD oldconfig, (and optionally make menuconfig to tweak a little bit)make && sudo make modules_install && sudo make installThe trick is on step 3, ;)

PS: However, there is a problem with this approach.
My original intention is to avoid touching the sources in /usr/src/linux and running as root.
But in fact, before you emerge kernel modules such as x11-drm, you still have to run 'make modules_prepare' in /usr/src/linux as root. Even I have used this command:
sudo env KBUILD_OUTPUT=/home/zhangle/build emerge x11-drmWhat's worse, the hints given in the output of the above command can't solve the problem:
* Found kernel source directory:
* /usr/src/linux
* Found kernel object directory:
* /home/zhangle/build
* Found sources for kernel version:
* 2.6.17-suspend…


本来如果严格按照中文Gentoo wiki上的这篇文章来做的话应该是没有问题的,这篇文章使用的字符集是GBK。


strace dvipdfmx test.dvi 2>&1 | grep


今天重温了去年与一个Fedora Core使用者的吵架贴


#gentoo-cn on freenode

I registered #gentoo-cn several days ago. I am still a irc newbie op. But I am trying my best to catch up.
I am playing with supybot. It is interesting. I will try to write some plugins for it. That will be more interesting!
Yesterday Alastair Tse dropped in #gentoo-cn, I asked him if there are some better irc bot. To my surprise, he is the maintainer of supybot. Such a coincidents! hehe.

PS: The number of people hanging on #gentoo-cn reached 23 yesterday, although 2-3 of them are bots, :).


My friend midx's desktop

Fwd: zh_cn GWN 20060731

Thanks to ALL members of zh_CN GWN translations team!!!!
This is not just my honur, but also everyone else's honor!!!
Thank you!!!

---------- Forwarded message ----------
From: Chris Gianelloni
Date: Aug 8, 2006 11:26 PM
Subject: Re: zh_cn GWN 20060731
To: Zhang Le
Cc: gwn-feedback AT gentoo DOT org, neysx AT gentoo DOT org

On Sun, 2006-08-06 at 19:23 +0800, Zhang Le wrote:
> Please help to commit, thanks!
> --
> Zhang Le, Robert

They're now committed to the tree.

I'm going to put you in touch with Xavier Neys, who is the Gentoo
Documentation Project lead. He (or someone from his team) is going to
mentor you so you can become a Gentoo staff member. This will allow you
to commit your translations directly, as you and your team have been
doing an excellent job, and I'm just holding you guys back now.

Chris Gianelloni
Release Engineering - Strategic Lead
x86 Architecture Team
Games - Developer
Gentoo Linux

Zhang Le, Robert
Linux Engineer/Trainer…

Gentoo takes you a lot of time?

I saw someone expressed this concern about Gentoo in a Chinese Linux forum. His original word is "Gentoo and LFS are only suitable for those who have a lot of time and a good machine".

I replied him. Here are my main points:
Maybe inevitable at the beginning, especially for Chinese users. Lots of apps need to be tuned, configured.
But not necessarily afterwards, especially if the number of packages on your systme remains unchanged or fluctuates not so much.
Your time maybe wasted under probably only one situation, i.e. you need a software desperately, but you haven't installed it yet.
But if someone really often faces this situation, my suggestion to him is to choose something else, be it Debian or Arch.
Also, I expressed one of my speculations of the future: Software compiling speed and the complexity of software, which increases faster? I think it's the former. :) But will OOo be compiled in minutes someday in the future? I am not sure.

[Gentoo]Two things for me to remember

Never try to use x11-drivers/ati-drivers, it stopped to function normally on my hp pavilion zt3000 since several months ago.Never try to enable option "FastAGPWrite" in xorg.conf, my notebook simply hangs whenever I startx with this option enabled.