Bug 5325 - cannot find popt.h at compile time
Summary: cannot find popt.h at compile time
Status: CLOSED FIXED
Alias: None
Product: rsync
Classification: Unclassified
Component: core (show other bugs)
Version: 3.0.1
Hardware: x86 Linux
: P3 minor (vote)
Target Milestone: ---
Assignee: Wayne Davison
QA Contact: Rsync QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-14 16:39 UTC by Shawn Rutledge
Modified: 2008-07-26 10:46 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Rutledge 2008-03-14 16:39:32 UTC
When compiling I get this:

options.c:24:18: error: popt.h: No such file or directory

The fix is here:

http://lists.samba.org/archive/rsync/2007-April/017641.html

After changing it to #include "popt/popt.h", rsync builds.

I would suggest fixing the configure script to find out whether it will be necessary to use the "system" one or the "local" one.

(apparently on the MontaVista-based system I'm working with, the library is included but the header is not... I'm not sure why.)
Comment 1 Shawn Rutledge 2008-03-14 16:49:14 UTC
Oh now I see the --with-included-popt option :-)

Anyway the configure script should be able to predict that if the header is not found, it's not going to compile.  Maybe if either of the header or the lib are not found, then use the built-in version automatically.
Comment 2 Wayne Davison 2008-03-15 01:00:15 UTC
The configure script was checking for the needed library already, but did not check if the popt.h file was in a weird place.  I made it fall-back to choosing the included popt code if popt.h is in a popt subdir in the system (which avoids a potential conflict between our supplied popt/popt.h and the system's library due to our use of -I.).