[Bugs] [Bug 1508947] glusterfs: Include path in pkgconfig file is wrong

bugzilla at redhat.com bugzilla at redhat.com
Wed Nov 8 11:12:10 UTC 2017


https://bugzilla.redhat.com/show_bug.cgi?id=1508947



--- Comment #2 from Worker Ant <bugzilla-bot at gluster.org> ---
COMMIT: https://review.gluster.org/18576 committed in master by  

------------- *.pc: Fix include path in Cflags

The include path in glusterfs-api.pc looks like

  -I${includedir}/glusterfs

However, client code will include the glusterfs headers using

  #include <glusterfs/api/glfs.h>

rather than

  #include <api/glfs.h>

which makes the "/glusterfs" part entirely unnecessary.

More importantly, on some platforms such as FreeBSD, the header files
for glusterfs will be installed in /usr/local/include, which is *not*
part of the compiler's default include path, so compilation will fail
with something like

  fatal error: 'glusterfs/api/glfs.h' file not found
  #include <glusterfs/api/glfs.h>
           ^~~~~~~~~~~~~~~~~~~~~~

The fix is to simply drop the extra "/glusterfs". The same change
is applied to other *.pc files as well, althought I haven't actually
tested those.

A test program (gfapi-load-volfile) and the glfsxmp example
application were using the wrong include paths, so they had to be
fixed as well.

Change-Id: I9a16de47fee7ab9c12d1cb823bbe061a69352670
BUG: 1508947
Signed-off-by: Andrea Bolognani <abologna at redhat.com>

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list