#939 libgphoto2: Put user CPPFLAGS after (not before) your own

closed-fixed
None
5
2013-05-12
2013-02-19
No

When building any software using MacPorts, we automatically put -I${prefix}/include into CPPFLAGS (to help that software find other software it might depend on). (Similarly we put -L${prefix}/lib into LDFLAGS.)

The libgphoto2 2.5.1.1 configure script sets AM_CPPFLAGS to the user-supplied $CPPFLAGS, then appends various -I flags to it for the various build directories.

The problem arises if another version of libgphoto2 is already installed, particularly one whose headers differ from those of the version being built. Because of the user-supplied -I${prefix}/include CPPFLAGS, files in ${prefix}/include get found in preference to files in the build directories, which can cause build failures like this one that was reported to us:

https://lists.macosforge.org/pipermail/macports-users/2009-March/014605.html

Here is the patch we've been using to fix this:

https://trac.macports.org/browser/trunk/dports/devel/libgphoto2/files/patch-configure.diff?rev=48890

We recommend making this change in your sources.

Discussion

  • Marcus Meissner

    Marcus Meissner - 2013-03-10
    • status: open --> pending-fixed
    • assigned_to: Marcus Meissner
     
  • Marcus Meissner

    Marcus Meissner - 2013-03-10

    I rewrote the logic today and I think it should be fixed now.

    CPPFLAGS is at least evalauted after the other -I statements.

     
  • Marcus Meissner

    Marcus Meissner - 2013-03-10

    the libgphoto2_port.la things just work fine for me already, i can build 2.5 libgphoto2 on a system with 2.4 libgphoto2 without issues.

     
  • Marcus Meissner

    Marcus Meissner - 2013-03-10

    ... i have howveer merged a better version of your second patch into svn.

     
  • Marcus Meissner

    Marcus Meissner - 2013-05-12
    • status: pending-fixed --> closed-fixed
     
  • Marcus Meissner

    Marcus Meissner - 2013-05-12

    fixed in 2.5.2

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks