Re: Problem compiling sample plugin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Thanks for the answer, now it works fine; I had to add this to the Makefile:

INCLUDE_FLAGS=-I/usr/include/nspr4 -I/usr/include/mozldap
CFLAGS = $(INCLUDE_FLAGS) -fPIC

But, IMHO, shouldn'd slapi-plugin.h make referende to
"nspr4/prtypes.h" instead of "prtypes.h" and "mozldap/ldap.h" instead
of "ldap.h"?

Regards.


2012/8/20 Justin Piszcz <jpiszcz@xxxxxxxxxxxxxxx>:
> On Mon, Aug 20, 2012 at 7:32 AM, Juan Asensio Sánchez <okelet@xxxxxxxxx> wrote:
>> Hi
>>
>> I am trying to compile a sample plugin, based on the documentation
>> from https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Directory_Server/9.0/html/Plug-in_Guide/Plugin_Programming_Guide-An_Example_Plug_in.html#Plugin_Programming_Guide-An_Example_Pre_Operation_Plug_in-Writing_the_Plug_in_Example
>>
>> I have created the .c, makefile, and installed required packages in
>> centos 5.5 i386 (gcc, kernel-devel, kernel-headers,
>> 389-ds-base-devel), but when i try to make, I get
>>
>> gcc -fPIC -c smbattrsync.c
>> In file included from smbattrsync.c:3:
>> /usr/include/dirsrv/slapi-plugin.h:65:21: error: prtypes.h: No such
>> file or directory
>> /usr/include/dirsrv/slapi-plugin.h:66:18: error: ldap.h: No such file
>> or directory
>> /usr/include/dirsrv/slapi-plugin.h:67:19: error: prprf.h: No such file
>> or directory
>> In file included from smbattrsync.c:3:
>> /usr/include/dirsrv/slapi-plugin.h: In function 'NSPR_API':
>>
>> In my machine, I have prtypes.h in /usr/include/nspr4/, not in
>> /usr/include/dirsrv, neither /usr/include, and so compiler does not
>> find it. I am not a experienced programmer; this looks something
>> basic, but I can not get it to work. Any idea?
>
> Check the makefile to see if there is a variable you can add to
> include that path.
> Otherwise, man make and check the script that makes the plugin, e.g.
> you will want to add:
>
> make -I /usr/include/nspr4
>
> Another option (may be easier)
>
> export C_INCLUDE_PATH=/usr/include/nspr4:$C_INCLUDE_PATH
> export CPLUS_INCLUDE_PATH=/usr/include/nspr4:$CPLUS_INCLUDE_PATH
>
> Then re-try the make.
>
> Some more details here:
> http://www.network-theory.co.uk/docs/gccintro/gccintro_23.html
>
> Justin.
> --
> 389 users mailing list
> 389-users@xxxxxxxxxxxxxxxxxxxxxxx
> https://admin.fedoraproject.org/mailman/listinfo/389-users
--
389 users mailing list
389-users@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-users



[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux