PDA

View Full Version : Cannot configure MFS_Tools



lrhorer
05-23-2009, 03:49 PM
I posted this over on the MFS_Live forum but got zero replies. Perhaps someone here will have some suggestions. I downloaded the source code for MFS_Tools and attempted to compile the code on a Debian "Lenny" machine, but it won't configure. The configure script looks for a file canned install.sh in the source directory and its parents, and aborts with an error if it is not found. The file does not exist, and I don't see where the script is supposed to create it. What do I need to do to get the source to configure and make?

Jamie
05-23-2009, 04:09 PM
install-sh is part of automake. You need automake and autoconfig installed on your system to build from source, then run "premake.sh", followed by, configure, then make. Works for me on x86 Fedora10. Needs a few tweaks to build an x64 version.

lrhorer
05-23-2009, 05:09 PM
Prompt and helpful as ever! Jamie, you are a tremendous asset to this hobby.

Thanks, I'll load automake on the system. I was unaware of this package, obviously. Autoconfig seems to be included in the package. This is a 64 bit system, so do you have any other hints as to what problems I may encounter in compiling the code?

Jamie
05-23-2009, 05:45 PM
Prompt and helpful as ever! Jamie, you are a tremendous asset to this hobby.

Thanks, I'll load automake on the system. I was unaware of this package, obviously. Autoconfig seems to be included in the package. This is a 64 bit system, so do you have any other hints as to what problems I may encounter in compiling the code?I just recall seeing some problems with off64_t not being defined under Fedora10 x64. I punted and built a 32 bit version instead.

lrhorer
05-24-2009, 12:27 AM
Apparently it's not defined under Debian "Lenny", either. When I perform the make, I get:


readwrite.c: In function ‘tivo_partition_read’:make[1]: Entering directory `/mfstools/mfstools-src/lib'
gcc -DHAVE_CONFIG_H -I. -I../include -I../include -g -O2 -MT readwrite.o -MD -MP -MF .deps/readwrite.Tpo -c -o readwrite.o readwrite.c
readwrite.c:146: error: ‘off64_t’ undeclared (first use in this function)
readwrite.c:146: error: (Each undeclared identifier is reported only once
readwrite.c:146: error: for each function it appears in.)
readwrite.c:146: error: expected ‘)’ before ‘sector’
readwrite.c:146: error: expected ‘)’ before ‘sector’
readwrite.c: In function ‘tivo_partition_write’:
readwrite.c:261: error: ‘off64_t’ undeclared (first use in this function)
readwrite.c:261: error: expected ‘)’ before ‘sector’
readwrite.c:261: error: expected ‘)’ before ‘sector’
make[1]: *** [readwrite.o] Error 1
make[1]: Leaving directory `/mfstools/mfstools-src/lib'
make: *** [all-recursive] Error 1

How should I proceed? Do you think it would help if I included something like


typedef off_t off64_t

in lib/readwrite.c?

Jamie
05-24-2009, 12:34 PM
This works for me:

CFLAGS="-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE" ./configure --enable-debug
It compiles cleanly for me when configured with thoese options. I didn't test the result though. It is possible the code isn't really 64bit clean, so test carefully..

lrhorer
05-24-2009, 12:58 PM
No, I still get the same error.

Jamie
05-24-2009, 01:04 PM
The other option is to do a 32 bit compile. Configuring with CFLAGS="-m32 -march=i686" may be enough, but you'll need to have a 32 bit glibc and zlib installed too.