[FriBidi] Compiling fribidi-0.19.2 in MinGW/MSYS environment, fix to benchmark.c file
mailmur
mailmur at yahoo.com
Mon May 11 00:00:47 PDT 2009
(winXP, msys-1.0.11, mingw_runtime-3.15.2, w32api-3.13-mingw32-dev, gcc-4.2.1-sjlj)
Hello, I was trying to compile fribidi-0.19.2 source in MinGW/MSYS environment. This environment does not have a sys/times.h header file out of the box.
Step 1 is what probably could go to the official source code. I am not sure about step2 if it created any side effects on compiling.
1) fix to utime(void) method
bin/fribidi-benchmark.c file has a minor bug, it uses a a conditional #if HAVE_SYS_TIMES_H+0 tag in import and utime(void) method.
Able to compile one must move "struct tms tb;" row inside #if...#endif block, initial sys/times.h was not enabled so struct is not found.
2) lib/Makefile gives "two or more extra-symbols are not allowed" error message. I had to edit makefile and clear am__append_1 variable then went ok.
See here my steps to compile fribidi package in MinGW/MSYS console.
fribidi-0.19.2.tar.gz
$ tar xvfz zipfile
$ cd libfolder
$ ./configure --prefix=/mingw
edit lib/Makefile and comment extra export-symbols argument
am__append_1 =
##am__append_1 = -export-symbols $(srcdir)/fribidi.def
edit bin/fribidi-benchmark.c, method utime(void), move "struct tms tb;" inside #if....#else block
static double utime (void) {
#if HAVE_SYS_TIMES_H+0
struct tms tb;
times (&tb);
return 0.01 * tb.tms_utime;
#else
#warning Please fill in here to use other functions for determining time.
#endif
}
$ make
$ make install
More information about the fribidi
mailing list