adamk has asked for the wisdom of the Perl Monks concerning the following question:
I'm building a Perl distribution, and having some trouble with building Perl modules that link to C libraries.
Different modules seem to use a variety of different methods to build/define the include path that will ultimately be provided to gcc.
For example "$ENV{INCLUDE}", "perl Makefile.PL INC=-I..." and "$Config{libpth}". And some Makefile.PL do their own stuff to locate include paths beyond these.
Unfortunately, many of them use one method and ignore the others, some overwrite one with the other, and I can't find one way of providing the include path to the modules in a way that all modules can handle correctly.
Now, I'm ok with talking to authors or taking over modules and converting them to support the correct way, but I have no idea what that is.
What is the "correct" way to provide the include paths via CPAN.pm such that all modules in a recursive install will receive and understand the include path to use for finding libs?
Different modules seem to use a variety of different methods to build/define the include path that will ultimately be provided to gcc.
For example "$ENV{INCLUDE}", "perl Makefile.PL INC=-I..." and "$Config{libpth}". And some Makefile.PL do their own stuff to locate include paths beyond these.
Unfortunately, many of them use one method and ignore the others, some overwrite one with the other, and I can't find one way of providing the include path to the modules in a way that all modules can handle correctly.
Now, I'm ok with talking to authors or taking over modules and converting them to support the correct way, but I have no idea what that is.
What is the "correct" way to provide the include paths via CPAN.pm such that all modules in a recursive install will receive and understand the include path to use for finding libs?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: What is the "correct" way to provide the C include path(s) to C/XS modules (CCFLAGS)
by tye (Sage) on Nov 16, 2007 at 07:18 UTC | |
Re: What is the "correct" way to provide the C include path(s) to C/XS modules
by Anonymous Monk on Nov 16, 2007 at 08:11 UTC | |
Re: What is the "correct" way to provide the C include path(s) to C/XS modules
by Anonymous Monk on Nov 16, 2007 at 08:08 UTC | |
Re: What is the "correct" way to provide the C include path(s) to C/XS modules
by eserte (Deacon) on Nov 17, 2007 at 10:40 UTC | |
Re: What is the "correct" way to provide the C include path(s) to C/XS modules
by syphilis (Archbishop) on Nov 22, 2007 at 10:36 UTC | |
by adamk (Chaplain) on Jan 02, 2008 at 11:07 UTC |
Back to
Seekers of Perl Wisdom