Problem compiling libapreq

Hello all,

New to the list and first post. I am having a problem compiling libapreq
so that I can get Apache::Cookie in my testdep. This is what I get:

apache_request.c:372: DECLINED' undeclared (first use in this function) apache_request.c:375:NULL’ undeclared (first use in this function)
apache_request.c:376: table' undeclared (first use in this function) apache_request.c:376:header’ undeclared (first use in this function)
apache_request.c:376: invalid lvalue in assignment
apache_request.c:377: parse error before const' apache_request.c:381:OK’ undeclared (first use in this function)
apache_request.c:384: cd' undeclared (first use in this function) apache_request.c:387: request for memberpool’ in something not a
structure or union
apache_request.c:387: warning: assignment makes pointer from integer
without a cast
apache_request.c:394: request for member pool' in something not a structure or union apache_request.c:394: warning: assignment makes pointer from integer without a cast apache_request.c:396:param’ undeclared (first use in this function)
apache_request.c:396: request for member pool' in something not a structure or union apache_request.c:399:filename’ undeclared (first use in this function)
apache_request.c:399: request for member pool' in something not a structure or union apache_request.c:528: warning: return makes pointer from integer without a cast apache_request.c: At top level: apache_request.c:531: parse error before*‘
apache_request.c: In function ApacheRequest_expires': apache_request.c:533: request for memberr’ in something not a structure
or union
apache_request.c:533: time_str' undeclared (first use in this function) make[1]: *** [apache_request.o] Error 1 make[1]: Leaving directory/usr/local/src/software/libapreq-0.31/c’
make: *** [subdirs] Error 2

I am running this on Mandrake 8.0 with gcc-2.96-0.48 and I installed
binary version of Apache and mod_perl. Browsing the net/list archives didn’t turn
anything out. Anyone had this problem?

TIA

Gashaw

( This message is aimed for the archives and anyone trying to solve a
particular problem. It contains broad advice )

If you are attempting to install any of the perl modules listed in the
subject line, please remember to have installed the include files and
libraries that may be an optional part of the software package.

Some, well-known, OS distributions offer you a choices of binary-only,
binary-with-include, binary-with-lib (etc) installations of a given
software package. For RT, these software packages are generally Apache
and MySQL

Please install the software package with the include files and with
the libraries.

You may not to be able to install certain perl modules (CPAN) without the
software package’s include and library files. Installing these may solve
your problems.

Linux ‘binary’ packages are the main culprits in this regards.

Regards,

                         Bruce Campbell                            RIPE
               Systems/Network Engineer                             NCC
             www.ripe.net - PGP562C8B1B                      Operations

Quoting Gashaw Mengistu gashaw@asosa.org [Feb 27, 2002 16:10]:

New to the list and first post. I am having a problem compiling
libapreq so that I can get Apache::Cookie in my testdep.

[-- snip --]

I am running this on Mandrake 8.0 with gcc-2.96-0.48 and I
installed binary version of Apache and mod_perl. Browsing the
net/list archives didn’t turn anything out. Anyone had this
problem?

You need to have the Apache source in order to build libapreq,
which is in reality an Apache add-on for writing C extensions
that just happens to have a Perl counterpart. With the Apache
source, it compiles effortlessly. Mandrake most likely has an
apache-src or apache-devel package you can install.

(darren)

There is nothing like returning to a place that remains unchanged
to find the ways in which you yourself have altered.
– Nelson Mandela

Hi,

Following Bruce’s lead, I’d like to add a few notes on perl and CPAN:

  1. Before installing anything (else), manually upgrade CPAN.pm to the most
    recent version. Download the tarball from cpan.org, unpack, and install as
    any other perl module (perl Makefile.PL; make; make test; make install).

Do not use CPAN to install CPAN.pm. CPAN.pm versions 1.48 and earlier do not
ask permission before upgrading core perl when installing modules that are
now maintained as part of core perl (Data::Dumper, File::Spec, etc.) For this
reason, it’s important to install a recent version of CPAN.pm and configure
it to ask permission before installing prerequisites, e.g.:

perl -MCPAN -e shell

cpan> o conf prerequisites_policy ask
cpan> o conf commit
cpan> quit

You can also do this when you initialize CPAN for the first time.

  1. Set CPAN to uninstall old modules when conflicts occur with

perl -MCPAN -e shell

cpan> o conf make_install_arg UNINST=1
cpan> o conf commit
cpan> quit

You can also do this when you initialize CPAN for the first time.

  1. CPAN stores downloaded modules under
    $HOME/.cpan/sources/authors/id/Z/ZZ/ZZZ… so if you have trouble
    installing modules automatically, you can find fresh sources here.

  2. Solaris 8 users: I feel your pain. You have two choices with regards to
    CPAN:

a) Scrape out the heinously borked version of perl 5.005_03 that Sun supplies
you and install a new (5.6.1 or later) clean copy from source so that all the
files go in the right places (Hint: /usr/perl5/bin is where vital utilities
like h2xs, h2ph, perldoc, and find2perl live. Paraphrasing Dave Barry, “Who
installed this code? Vandals?”) Also, make sure the C compiler you build perl
with is available after installation (see below.)

b) Presuming you don’t have Sun’s C compiler (and who does?), save a backup
copy of
/usr/perl5/5.00503/sun4-solaris/Config.pm
and in the original, replace references to cc with gcc, being careful to
change the values of ‘optimize’ and ‘cccdlflags’ to reflect the appropriate
gcc options (’-KPIC’ -> ‘-fPIC’, ‘-xO3 -xdepend’ -> ‘-O3’).

/usr/perl5/5.00503/sun4-solaris/Config.pm ‘remembers’ how perl was built and
is used by CPAN (via MakeMaker) to build makefiles to install modules. You
can change some of the options in CPAN to convince it to use gcc instead of
Sun’s hypothetical compiler but it’s often much cleaner to erase cc from
Config.pm or just install a recent version of perl from scratch. I don’t have
many comments about the Solaris packages of perl on sunfreeware.com or
sunsite/ibiblio; I’ve had good results with packages from both archives but I
simply don’t trust anyone’s package of perl, especially when Sun is
involved.

  1. Perl 5.6.0 is a troubled version. If feasible, upgrade to 5.6.1 or later.

  2. Rarely do I have to force-install a package. Tests generally fail for a
    reason and really, you should investigate the failed tests before forcing an
    installation, just to ensure the test results can be safely neglected. Some
    tests fail if they’re run as root. Common problems are missing library paths
    (requiring LD_LIBRARY_PATH and LD_RUN_PATH to be specified) and missing or
    outdated .ph files (perl-massaged include files for system libraries.) Update
    the .ph files with:

cd /usr/include; h2ph -r -l .

You should only need to do this once, or whenever you update the contents of
/usr/include. See the h2ph manpage for details (Solaris users should use
’/usr/perl5/bin/perldoc /usr/perl5/bin/h2ph’ instead…)

– BobOn Wednesday 27 February 2002 15:25, you wrote:

( This message is aimed for the archives and anyone trying to solve a
particular problem. It contains broad advice )

If you are attempting to install any of the perl modules listed in the
subject line, please remember to have installed the include files and
libraries that may be an optional part of the software package.

Some, well-known, OS distributions offer you a choices of binary-only,
binary-with-include, binary-with-lib (etc) installations of a given
software package. For RT, these software packages are generally Apache
and MySQL

Please install the software package with the include files and with
the libraries.

You may not to be able to install certain perl modules (CPAN) without the
software package’s include and library files. Installing these may solve
your problems.

Linux ‘binary’ packages are the main culprits in this regards.

Regards,

Ok … Apache_source and mod_perl-devel took care of that.

Thank youOn Wed, 27 Feb 2002, darren chamberlain wrote:

Quoting Gashaw Mengistu gashaw@asosa.org [Feb 27, 2002 16:10]:

New to the list and first post. I am having a problem compiling
libapreq so that I can get Apache::Cookie in my testdep.

[-- snip --]

I am running this on Mandrake 8.0 with gcc-2.96-0.48 and I
installed binary version of Apache and mod_perl. Browsing the
net/list archives didn’t turn anything out. Anyone had this
problem?

You need to have the Apache source in order to build libapreq,
which is in reality an Apache add-on for writing C extensions
that just happens to have a Perl counterpart. With the Apache
source, it compiles effortlessly. Mandrake most likely has an
apache-src or apache-devel package you can install.

(darren)