Bug - Cmake ext2fs, ntfs, parted module comilation - installation

Asked by snguyen

Hello, I'm compiling partimage-ng in Mandriva 2008 here's some bugs that I've found and resolved:
When i try to type cmake .. (in ~/partimage-ng/src/build): some error messages like: Ext2fs_Dir is not set .... etc or ext2fs is not found ....
So I've tried to do:
- In ~/partimage-ng/src/CMakeLists.txt:
  + with the line: SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/src/cmake_modules/")
  + resolved with: SET(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake_modules/") without the "/src" because when i try to print the complete path with MESSAGE("${PROJECT_SOURCE_DIR}/src/cmake_modules/") the output is ~/partimage-ng/src/src/cmake_modules/ so it's not good.

- After that i redo cmake .., no problem with the ext2fs package but with ntfs package, i have to do some modification in ~/partimage-ng/src/cmake-modules/FindNtfs.cmake:
  + with the line : FIND_PATH(NTFS_INCLUDE_DIR NAMES volume.h mft.h PATHS /usr/include/ntfs /usr/local/include/ntfs)
  + resolved with : FIND_PATH(NTFS_INCLUDE_DIR NAMES volume.h mft.h PATHS /usr/include/ntfs-3g /usr/local/include/ntfs-3g)
  + with the line : FIND_LIBRARY(NTFS_LIBRARY NAMES ntfs PATHS /usr/lib /usr/local/lib)
  + resolved with: FIND_LIBRARY(NTFS_LIBRARY NAMES ntfs-3g PATHS /usr/lib /usr/local/lib)
==> the link for ntfs library isn't correct because with Mandriva 2008, it use ntfs-3g ( or we can do a link symbolic with the ntfs-3g directory)

- I've to modify also in ~/partimage-ng/src/ntfspartition_c.c for the links of ntfs headers files location:
 + replace #include <ntfs/volume.h> and #include <ntfs/attrib.h>
 + with respectively: #include <ntfs-3g/volume.h> and #include <ntfs-3g/attrib.h>

- And finally finally in ~/partimage-ng/src/CMakeLists.txt:
 + replace TARGET_LINK_LIBRARIES(partimage-ng parted ext2fs ntfs)
 + with TARGET_LINK_LIBRARIES(partimage-ng parted ext2fs ntfs-3g)

then everything go well after.

Question information

Language:
English Edit question
Status:
Expired
For:
partimage-ng Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dmitry Ivanov (vonami) said :
#1

On 7/8/08, snguyen <email address hidden> wrote:
> Hello, I'm compiling partimage-ng in Mandriva 2008 here's some bugs that I've found and resolved:
> When i try to type cmake .. (in ~/partimage-ng/src/build): some error messages like: Ext2fs_Dir is not set .... etc or ext2fs is not found ....

You should create the build dir in the top-level source dir, ie.
'~/partimage-ng/build' and start cmake from there.

Dmitry

Revision history for this message
snguyen (snguyen-cergy) said :
#2

Ok, i thought that the build directory have to be created in ~/partimage-ng/src/.... And do you think that can resolve the problems with the ntfs-3g link ?

Revision history for this message
Dmitry Ivanov (vonami) said :
#3

On 7/8/08, snguyen <email address hidden> wrote:
> Ok, i thought that the build directory have to be created in
> ~/partimage-ng/src/.... And do you think that can resolve the problems
> with the ntfs-3g link ?

No, that won't resolve the linkage problem. You should install a
package containing
libntfs from ntfsprogs-2.0 (not ntfs-3g) if Mandriva provides it.
Otherwise, grab it from
linux-ntfs.org. In Debian/Ubuntu, for instance, the packages you need
are called
libntfs10 and libntfs-dev.

Dmitry

Revision history for this message
Dmitry Ivanov (vonami) said :
#4

It was not a bug really.

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.