因为要在我的fedora 9 (2.6.27.5-41)下进行镜像文件的编辑,在网上查了下资料发现kiso软件冒似linux下一款处理镜像文件的好软件,于是就到kiso官网http://kiso.sourceforge.net down了最新的kiso-0.8.3.tar.gz,下载完成解压得到kiso-0.8.3文件夹。
cd kiso-0.8.3
ls
发现configure文件,当然是
./configure
这时候出错了,错误信息如下:
error:
in the prefix, you've chosen, are no KDE libraries installed. This will fail.
So, check this please and use another prefix!"
因为偶用的Gnome 2.0所以KDE一些libs就没有装,现在不装是不行了,于是:
yum install kdelibs
yum install kdelibs-devel
yum install kdelibs3
yum install kdelibs3-devel
yum install kdelibs-common
好像在这之前还出现了个error,要用到qt3和qt3-devel,所以索性一并安上就是了。 呵呵
然后重新
./configure
然后一路顺风,看到以下信息:
。。。
。。。
。。。
config.pl: fast created 6 file(s).
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
Good - your configure finished. Start make now
Ok,配置顺利完成,现在我们可以进行make了,闲话少说,
make
然后又是信息如流水般哗哗的流过屏幕,然后就出现了下面这个
error:
kiso.cpp: In member function `virtual void Mainform::choice()':
kiso.cpp:2392: error: `CdIo' undeclared (first use this function)
kiso.cpp:2392: error: (Each undeclared identifier is reported only once for each function it appears in.)
kiso.cpp:2392: error: `cdio' undeclared (first use this function)
kiso.cpp:2392: error: `cdio_open_cd' undeclared (first use this function)
kiso.cpp:2394: error: `track_t' undeclared (first use this function)
kiso.cpp:2394: error: syntax error before `;' token
kiso.cpp:2400: error: `first_track_num' undeclared (first use this function)
kiso.cpp:2400: error: `cdio_get_first_track_num' undeclared (first use this function)
kiso.cpp:2401: error: `num_tracks' undeclared (first use this function)
kiso.cpp:2401: error: `cdio_get_num_tracks' undeclared (first use this function)
kiso.cpp:2402: error: `TRACK_FORMAT_AUDIO' undeclared (first use this function)
kiso.cpp:2402: error: `cdio_get_track_format' undeclared (first use this function)
kiso.cpp:2404: error: `cdio_destroy' undeclared (first use this function)
kiso.cpp: In member function `virtual void Mainform::createiso(QString)':
kiso.cpp:2607: error: `cdio_open_cd' undeclared (first use this function)
kiso.cpp:2608: error: `cdio_eject_media' undeclared (first use this function)
kiso.cpp:2609: error: `cdio_destroy' undeclared (first use this function)
kiso.cpp: In member function `virtual int Mainform::ProgressBar(QString, QString, KShellProcess*, int)':
kiso.cpp:2727: error: `lba_t' undeclared (first use this function)
kiso.cpp:2727: error: syntax error before `=' token
kiso.cpp:2730: error: `cdio_open_cd' undeclared (first use this function)
kiso.cpp:2731: error: syntax error before `=' token
kiso.cpp:2734: error: `cdio_get_track_format' undeclared (first use this function)
kiso.cpp:2735: error: `first_audio_lba' undeclared (first use this function)
kiso.cpp:2736: error: `cdio_get_track_lba' undeclared (first use this function)
kiso.cpp:2740: error: `cdio_stat_size' undeclared (first use this function)
kiso.cpp:2741: error: `cdio_destroy' undeclared (first use this function)
make[2]: *** [kiso.o] Error 1
make[2]: Leaving directory `/home/brainkilla/Documents/Network/kiso-0.4/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/brainkilla/Documents/Network/kiso-0.4'
make: *** [all] Error 2
从error信息中,我们发现在virtual void Mainform::choice()和virtual int Mainform::ProgressBar(QString, QString, KShellProcess*, int)函数中`CdIo' undeclared,也就是没有CdIo这个数据类型,怎么会呢?是的!确实是这样,因为我们GOME下还有一个依赖函数库没装,马上装上他们吧(其实在kiso官网下载页也是提示要用到libcdio库的):
yum install libcdio
yum install libcdio-devel
ok,安装完成后,不要忘记
make clean
然后,重新
make
原以为万事大吉,谁知人算不如天算,又一个error跳到了屏幕上:
error:
kiso.cpp:3602: error: ‘scsi_mmc_cdb_t’ was not declared in this scope
kiso.cpp:3602: error: expected `;' before ‘cdb’
kiso.cpp:3604: error: ‘cdb’ was not declared in this scope
kiso.cpp:3604: error: ‘CDIO_MMC_GPCMD_GET_CONFIGURATION’ was not declared in this scope
kiso.cpp:3604: error: ‘CDIO_MMC_SET_COMMAND’ was not declared in this scope
kiso.cpp:3605: error: ‘CDIO_MMC_SET_READ_LENGTH8’ was not declared in this scopekiso.cpp:3606: error: ‘CDIO_MMC_GET_CONF_ALL_FEATURES’ was not declared in this scope
kiso.cpp:3609: error: ‘SCSI_MMC_DATA_READ’ was not declared in this scope
kiso.cpp:3609: error: ‘scsi_mmc_run_cmd’ was not declared in this scope
kiso.cpp:3615: error: ‘CDIO_MMC_GET_LEN32’ was not declared in this scope
kiso.cpp:3621: error: ‘CDIO_MMC_GET_LEN16’ was not declared in this scope
kiso.cpp:3625: error: ‘CDIO_MMC_FEATURE_CORE’ was not declared in this scope
make[2]: *** [kiso.o] Error 1
make[2]: Leaving directory `/home/kck/misc/kiso-0.8.2/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/kck/misc/kiso-0.8.2'
make: *** [all] Error 2
细看此eorror,恩?原来是scsi_mmc_cdb_t这个数据类型没有声明,是不是我们还要再装一个libscsimmc**的库函数和它的dev呢?不用。其实在我们安装完libcdio后,你会在/usr/include/下面找到cdio这个文件夹的(可能文件路径有不同,但是肯定会有的),于是:
cd /usr/include
ls|grep cdio
你会发现cdio这个文件夹,不要犹豫,进入这个文件夹:
cd cdio
ls
此时你会发现mmc.h这个头文件,那就用vi或者gedit打开此文件吧:
gedit mmc.h
然后搜索”scsi_mmc_cdb_t”这个字符串,你会发现什么都没有…
但是我要是搜索” mmc_cdb_t’”呢?哎 居然有这个数据类型,看到还是个结构体,而且它还有个field的内部数组,跟我们源文件中kiso.cpp中第3596-3599行中的
(diso.cpp)
CDIO_MMC_SET_COMMAND(cdb.field, CDIO_MMC_GPCMD_GET_CONFIGURATION);
CDIO_MMC_SET_READ_LENGTH8(cdb.field, sizeof(buf));
cdb.field[1] = CDIO_MMC_GET_CONF_ALL_FEATURES;
cdb.field[3] = 0x0;(其中cdb是定义的scsi_mmc_cdb_t类型的变量,由kiso.cpp的第35944行得知)
cdb.filed、cdb.filed[1]…何等的相似,现在你就不要犹豫了,提起笔来,把kiso.cpp源文件中的scsi_mmc_cdb_t全部替换成mmc_cdb_t吧!然后保存,然后
make clean
make
(这个错误估计是mmc.h头文件升级后,有些数据类型的名称被进行了变动,而kiso的开发者们却还是应用了老版本mmc.h中的数据类型名称导致的。)
这时,你就只需要看着屏幕惬意的遐想,然后make顺利完成,最后就是:
make install
安装完成后,你就可以打开kiso软件进行iso文件的编辑了。
Gcmjiu 于 2008-12-10 23:03:40发表:
很强大,致敬