Subject: can't find include file (using libelf)
To: None <tech-pkg@netbsd.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 12/13/2005 16:56:05
I am packaging up ltrace (library call tracer) which uses 
pkgsrc/devel/libelf/buildlink3.mk.

I am consistently getting the following no matter what I added to my 
CPPFLAGS. (I patched Makefile.in to make sure it was included).

  plt.c:1:18: gelf.h: No such file or directory
  In file included from plt.c:3:
  /tmp/pkgsrc/new/ltrace/work.montecristo/ltrace-0.3.36/elf.h:4:18: gelf.h:
  No such file or directory

My pkgsrc Makefile also has:
CPPFLAGS+=              -I${BUILDLINK_PREFIX.libelf}/include/libelf
CPPFLAGS+=              -I${BUILDLINK_DIR}/include/libelf
BUILDLINK_INCDIRS.libelf+=      include/libelf

The last line of my .work.log has:

<.> /tmp/pkgsrc/new/ltrace/work.montecristo/.gcc/bin/gcc -Wall -O2 
-I/usr/include/libelf 
-I/tmp/pkgsrc/new/ltrace/work.montecristo/.buildlink/include 
-I/tmp/pkgsrc/new/ltrace/work.montecristo/.buildlink/include/libelf 
-I/tmp/pkgsrc/new/ltrace/work.montecristo/ltrace-0.3.36 
-I/tmp/pkgsrc/new/ltrace/work.montecristo/ltrace-0.3.36/sysdeps/linux-gnu 
-I- -DHAVE_CONFIG_H -DSYSCONFDIR=\"/etc\" 
-I/tmp/pkgsrc/new/ltrace/work.montecristo/ltrace-0.3.36/sysdeps/linux-gnu/i386 
-c -o plt.o plt.c -L/tmp/pkgsrc/new/ltrace/work.montecristo/.buildlink/lib

The symlink 
/tmp/pkgsrc/new/ltrace/work.montecristo/.buildlink/include/libelf/gelf.h
goes to existing /usr/include/libelf/gelf.h file.

Any ideas? Something I should add to devel/libelf/buildlink3.mk??

  Jeremy C. Reed

  	  	 	 BSD News, BSD tutorials, BSD links
 	  	 	 http://www.bsdnewsletter.com/