Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

search.h-No such file or directory while porting libtiff on Android-tiff 4.0.1

I am trying to port libtiff on Android. The source version I am using is tiff 4.0.1. I am building this source inside u1 android OS. I am getting the below error when I run mmm external/tiff 4.0.1/

In file included from external/tiff-4.0.1/libtiff/tiffiop.h:33,
                 from external/tiff-4.0.1/libtiff/tif_dirread.c:42:
external/tiff-4.0.1/libtiff/tif_config.h:93:1: warning: "HAVE_MALLOC_H" redefined
In file included from <command-line>:0:
./system/core/include/arch/linux-arm/AndroidConfig.h:221:1: warning: this is the location of the previous definition
In file included from external/tiff-4.0.1/libtiff/tif_dirread.c:42:
external/tiff-4.0.1/libtiff/tiffiop.h:54:21: error: search.h: No such file or directory

I tries searching a lot on internet but could not get the issue. Can any one provide me just an approx idea what could be wrong or which package is missing.

like image 570
Ankit Jain Avatar asked Jun 27 '12 03:06

Ankit Jain


2 Answers

I resolved this issue finally. I hope this will help someone who is doing this work in future. We just need to remove the lines from libtiff/tiffiop.h where header file is being referenced.That worked for me.

like image 167
Ankit Jain Avatar answered Sep 20 '22 01:09

Ankit Jain


Depending on your libtiff version, you can also just undefine HAVE_SEARCH_H in the config file tif_config.h which will then no longer include <search.h>:

In tif_config.h:

#ifndef ANDROID
/* Define to 1 if you have the <search.h> header file. */
#define HAVE_SEARCH_H 1
#endif
like image 40
Philip Allgaier Avatar answered Sep 19 '22 01:09

Philip Allgaier