apache2 apxs & libtool problem

  • Follow


Hi all,

I execute fhe following command:

/usr/apache2/bin/apxs -S CC=/usr/sfw/bin/gcc -S CFLAGS="-O4 -fPIC \
-I/usr/include/libxml2" -Wl,-R/usr/apache2/lib \
-lapr-0 -lexpat -lxml2 -c -a -i mod_flvx.c

and get the following result:

/var/apache2/build/libtool --silent --mode=compile /usr/sfw/bin/gcc -O4 -fPIC -I/usr/include/libxml2 -I/usr/apache2/include  -I/usr/apache2/include   -I/usr/apache2/include -I/usr/sfw/include  -c -o mod_flvx.lo mod_flvx.c && touch mod_flvx.slo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
apxs:Error: Command failed with rc=65536


Question: How to fix this problem about libtool?

Thank you.

-- 
Johnson Chow
0
Reply Mr 11/16/2009 9:19:27 AM

Mr. Chow Wing Siu <wschow@Comp.HKBU.Edu.HK> wrote:
> libtool: compile: unable to infer tagged configuration
> libtool: compile: specify a tag with `--tag'
> apxs:Error: Command failed with rc=65536
----------------------------------------------

Hi I followup my case:

I do the following command:
LTFLAGS="--tag=CC"; export LTFLAGS
/usr/apache2/bin/apxs -S CC=gcc -S CFLAGS="-O -prefer-non-pic -DSOLARIS2=10 -D_P
OSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE_SOURCE -DSSL_EXPERIMENTAL -DSSL
_ENGINE" -i -a -c mod_flvx.c

and get the following error when starting apache2.

Cannot load /usr/apache2/libexec/mod_flvx.so into server: ld.so.1: httpd: fatal:
 relocation error: file /usr/apache2/libexec/mod_flvx.so: symbol apr_strtoff: re
ferenced symbol not found

-- 
Johnson Chow
0
Reply Mr 11/22/2009 2:00:17 AM


It compiles with Sun's compilers.
<URL:http://developers.sun.com/sunstudio/downloads/index.jsp>

John
groenveld@acm.org
0
Reply groenvel 11/22/2009 1:36:33 PM

Mr. Chow Wing Siu <wschow@Comp.HKBU.Edu.HK> wrote:
> Hi I followup my case:
-----------------------------------------

Solution:

===========================================================================
I compiled by:
===========================================================================

LTFLAGS="--tag=CC"; export LTFLAGS
/usr/apache2/bin/apxs -S CC=gcc -S CFLAGS="-O -prefer-non-pic -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE_SOURCE -DSSL_EXPERIMENTAL -DSSL_ENGINE" -i -a -c mod_flvx.c

===========================================================================
I added the following code within the mod_flvx.c
===========================================================================
#if APR_HAS_LARGE_FILES
#define APR_OFF_T_STRFN       strtoll
#else
#define APR_OFF_T_STRFN       strtol
#endif

/* A "safe" maximum bucket size, 1Gb */
#define MAX_BUCKET_SIZE (0x40000000)

APU_DECLARE(apr_bucket *) apr_brigade_insert_file(apr_bucket_brigade *bb,
                                                  apr_file_t *f,
                                                  apr_off_t start,
                                                  apr_off_t length,
                                                  apr_pool_t *p)
{
    apr_bucket *e;

    if (sizeof(apr_off_t) == sizeof(apr_size_t) || length < MAX_BUCKET_SIZE) {
        e = apr_bucket_file_create(f, start, (apr_size_t)length, p,
                                   bb->bucket_alloc);
    }
    else {
        /* Several buckets are needed. */
        e = apr_bucket_file_create(f, start, MAX_BUCKET_SIZE, p,
                                   bb->bucket_alloc);

        while (length > MAX_BUCKET_SIZE) {
            apr_bucket *ce;
            apr_bucket_copy(e, &ce);
            APR_BRIGADE_INSERT_TAIL(bb, ce);
            e->start += MAX_BUCKET_SIZE;
            length -= MAX_BUCKET_SIZE;
        }
        e->length = (apr_size_t)length; /* Resize just the last bucket */
    }

    APR_BRIGADE_INSERT_TAIL(bb, e);
    return e;
}

APR_DECLARE(apr_status_t) apr_strtoff(apr_off_t *offset, const char *nptr, char **endptr, int base)
{
 errno = 0;
 *offset = APR_OFF_T_STRFN(nptr, endptr, base);
 return APR_FROM_OS_ERROR(errno);
}


0
Reply Mr 11/24/2009 9:35:39 AM

3 Replies
734 Views

(page loaded in 0.01 seconds)


Reply: