2013年11月18日 How to install partimage-0.6.9 on Slackware-14.0 [長年日記]
_ How to install partimage-0.6.9 on Slackware-14.0
Pre-required newt-0.52.15
$ tar xvvf newt-0.52.15.tar.gz $ cd newt-0.52.15 $ ./configure && make # make install && ldconfig
Build (This was failed)
$ tar xvvf partimage-0.6.9.tar.bz2 $ cd partimage-0.6.9 $ ./configure && make
This build was failed with error messages :(
make[4]: Entering directory `/home/m-ito/tmp/partimage-0.6.9/src/client' CXX netclient.o CXX imagefile.o imagefile.cpp: In member function 'void CImage::write(void*, DWORD, bool)': imagefile.cpp:348:58: error: cannot convert 'gzFile_s**' to 'gzFile' for argument '1' to 'int gzwrite(gzFile, voidpc, unsigned int)' imagefile.cpp: In member function 'void CImage::read(char*, DWORD, bool)': imagefile.cpp:398:48: error: cannot convert 'gzFile_s**' to 'gzFile' for argument '1' to 'int gzread(gzFile, voidp, unsigned int)' imagefile.cpp: In member function 'void CImage::closeReading(bool)': imagefile.cpp:578:35: error: cannot convert 'gzFile_s**' to 'gzFile' for argument '1' to 'int gzclose(gzFile)' imagefile.cpp: In member function 'void CImage::closeWriting()': imagefile.cpp:611:33: error: cannot convert 'gzFile_s**' to 'gzFile' for argument '1' to 'int gzclose(gzFile)' make[4]: *** [imagefile.o] Error 1 make[4]: Leaving directory `/home/m-ito/tmp/partimage-0.6.9/src/client' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/m-ito/tmp/partimage-0.6.9/src/client' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/m-ito/tmp/partimage-0.6.9/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/m-ito/tmp/partimage-0.6.9' make: *** [all] Error 2
Build (This was succeeded)
$ tar xvvf partimage-0.6.9.tar.bz2 $ cd partimage-0.6.9
partimage-0.6.9.diff
diff -crN partimage-0.6.9.ORG/src/client/imagefile.cpp partimage-0.6.9/src/client/imagefile.cpp *** partimage-0.6.9.ORG/src/client/imagefile.cpp 2010-07-26 00:30:31.000000000 +0900 --- partimage-0.6.9/src/client/imagefile.cpp 2013-11-18 15:28:46.748974181 +0900 *************** *** 783,789 **** else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression { showDebug(1, "open gzip\n"); ! m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "wb"); //"wb1h"); if (m_gzImageFile == NULL) { showDebug(1, "error:%d %s\n", errno, strerror(errno)); --- 783,789 ---- else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression { showDebug(1, "open gzip\n"); ! m_gzImageFile = gzdopen(m_nFdImage, "wb"); //"wb1h"); if (m_gzImageFile == NULL) { showDebug(1, "error:%d %s\n", errno, strerror(errno)); *************** *** 1098,1104 **** } else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression { ! m_gzImageFile = (gzFile *) gzdopen(m_nFdImage, "rb"); if (m_gzImageFile == NULL) THROW(ERR_ERRNO, errno); else --- 1098,1104 ---- } else if (m_options.dwCompression == COMPRESS_GZIP) // Gzip compression { ! m_gzImageFile = gzdopen(m_nFdImage, "rb"); if (m_gzImageFile == NULL) THROW(ERR_ERRNO, errno); else diff -crN partimage-0.6.9.ORG/src/client/imagefile.h partimage-0.6.9/src/client/imagefile.h *** partimage-0.6.9.ORG/src/client/imagefile.h 2010-07-26 00:30:31.000000000 +0900 --- partimage-0.6.9/src/client/imagefile.h 2013-11-18 15:28:46.745973800 +0900 *************** *** 41,47 **** COptions m_options; FILE *m_fImageFile; ! gzFile *m_gzImageFile; BZFILE *m_bzImageFile; int m_nFdImage; --- 41,47 ---- COptions m_options; FILE *m_fImageFile; ! gzFile m_gzImageFile; BZFILE *m_bzImageFile; int m_nFdImage; diff -crN partimage-0.6.9.ORG/src/client/netclient.cpp partimage-0.6.9/src/client/netclient.cpp *** partimage-0.6.9.ORG/src/client/netclient.cpp 2010-07-26 00:30:31.000000000 +0900 --- partimage-0.6.9/src/client/netclient.cpp 2013-11-18 15:28:15.936058021 +0900 *************** *** 43,51 **** { showDebug(3, "initializing client ssl\n"); SSLeay_add_ssl_algorithms(); - meth = SSLv2_client_method(); SSL_load_error_strings(); ! ctx = SSL_CTX_new(meth); if (!ctx) THROW(ERR_SSL_CTX); m_bUseSSL = (ctx != NULL); --- 43,50 ---- { showDebug(3, "initializing client ssl\n"); SSLeay_add_ssl_algorithms(); SSL_load_error_strings(); ! ctx = SSL_CTX_new(SSLv23_client_method()); if (!ctx) THROW(ERR_SSL_CTX); m_bUseSSL = (ctx != NULL); diff -crN partimage-0.6.9.ORG/src/server/netserver.cpp partimage-0.6.9/src/server/netserver.cpp *** partimage-0.6.9.ORG/src/server/netserver.cpp 2010-07-26 00:30:31.000000000 +0900 --- partimage-0.6.9/src/server/netserver.cpp 2013-11-18 15:28:15.939058402 +0900 *************** *** 39,46 **** { SSL_load_error_strings(); SSLeay_add_ssl_algorithms(); ! meth = SSLv23_server_method(); ! ctx = SSL_CTX_new(meth); if (!ctx) { ERR_print_errors_fp(stderr); --- 39,45 ---- { SSL_load_error_strings(); SSLeay_add_ssl_algorithms(); ! ctx = SSL_CTX_new(SSLv23_server_method()); if (!ctx) { ERR_print_errors_fp(stderr);
$ patch -p1 <partimage-0.6.9.diff $ ./configure && make # make install && ldconfig
Everything gose fine :)
[ツッコミを入れる]