You are not logged in.

#1 2011-12-13 15:53:06

marcob
Member
From: B-town USA
Registered: 2004-11-10
Posts: 38
Website

apxs2?

I'm trying to compile apache (2.2.15-2) module mod_auth_cookie_mysql2 for the 64 bit version of Arch. We have a webserver running Arch with the standard LAMP stack and are upgrading to a 64 bit server. I've installed Arch 64 (2.6.34) and have downloaded the mod_auth_cookie_mysql2 source files from 

http://home.digithi.de/digithi/dev/mod_ … kie_mysql/ 

and have attempted to compile, but get an apxs2: command not found error

  • [root@64bitarch]# make
    apxs2 -c -Wc,-Wall `mysql_config --include` -DMODULE_NAME=auth_cookie_mysql2 -DMODULE_NAME_module=auth_cookie_mysql2_module `mysql_config --libs` -o mod_auth_cookie_mysql2.so mod_auth_cookie_sql2.c mod_auth_cookie_sql2_mysql.c
    /bin/sh: apxs2: command not found

Both apxs and mysql_config are in my path. Here is the pertinent sectin of the makefile (entire makefile at bottom of post):

  • #
    # Makefile for mod_auth_cookie_(my)sql2
    #

    # "apxs" is searched in all directories of your PATH variable.
    # If apxs cannot be found during the make process, you can adjust
    # the path, i.e.:
    #APXS = /usr/local/apache2/bin/apxs
    APXS = apxs2

    # mysql_config is searched in all directories of your PATH variable.
    # If apxs cannot be found during the make process, you can adjust the
    # the path, i.e.:
    # MYSQCPPFLAGS = `/opt/mysql/bin/mysql_config --include`
    # MYSQLDFLAGS  = `/opt/mysql/bin/mysql_config --libs`
    MYSQCPPFLAGS = `mysql_config --include`
    MYSQLDFLAGS  = `mysql_config --libs`

    ############### Please don't change anything below this line ###############

    MODULE_NAME = auth_cookie_mysql2
    APACHE_MODULE = mod_auth_cookie_mysql2.so
    [snip]

I've changed the APXS line in the makefile so that it reads

APXS = /usr/sbin/apxs

but when I attempt to compile, I get this error

  • /usr/sbin/apxs -c -Wc,-Wall `mysql_config --include` -DMODULE_NAME=auth_cookie_mysql2 -DMODULE_NAME_module=auth_cookie_mysql2_module `mysql_config --libs` -o mod_auth_cookie_mysql2.so mod_auth_cookie_sql2.c mod_auth_cookie_sql2_mysql.c
    apxs:Error: Unknown option: r.
    apxs:Error: Unknown option: d.
    apxs:Error: Unknown option: y.
    Usage: apxs -g [-S <var>=<val>] -n <modname>
           apxs -q [-S <var>=<val>] <query> ...
           apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
                   [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
                   [-Wl,<flags>] [-p] <files> ...
           apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
           apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
    make: *** [mod_auth_cookie_mysql2.so] Error 1

I have not installed Arch for some time . . . is there an Apache-devel package I need to install, perhaps? Any help much appreciated.

mod_auth_cookie_mysql2 Makefile

  • #
    # Makefile for mod_auth_cookie_(my)sql2
    #

    # "apxs" is searched in all directories of your PATH variable.
    # If apxs cannot be found during the make process, you can adjust
    # the path, i.e.:
    #APXS = /usr/local/apache2/bin/apxs
    #APXS = apxs2
    APXS = /usr/sbin/apxs

    # mysql_config is searched in all directories of your PATH variable.
    # If apxs cannot be found during the make process, you can adjust the
    # the path, i.e.:
    # MYSQCPPFLAGS = `/opt/mysql/bin/mysql_config --include`
    # MYSQLDFLAGS  = `/opt/mysql/bin/mysql_config --libs`
    MYSQCPPFLAGS = `mysql_config --include`
    MYSQLDFLAGS  = `mysql_config --libs`

    ############### Please don't change anything below this line ###############

    MODULE_NAME = auth_cookie_mysql2
    APACHE_MODULE = mod_auth_cookie_mysql2.so

    SRCS = mod_auth_cookie_sql2.c mod_auth_cookie_sql2_mysql.c
    OBJS = mod_auth_cookie_sql2.o mod_auth_cookie_sql2_mysql.o


    RM = rm -f
    LN = ln -sf
    CP = cp -f


    #CFLAGS += -DNDEBUG
    #CFLAGS +=  -DDEBUG

    CFLAGS = -Wc,-Wall $(MYSQCPPFLAGS) -DMODULE_NAME=$(MODULE_NAME) -DMODULE_NAME_module=$(MODULE_NAME)_module
    LDFLAGS = $(MYSQLDFLAGS) -o $(APACHE_MODULE)

    default: all

    all: $(APACHE_MODULE)

    $(APACHE_MODULE): $(SRCS)
            $(APXS) -c $(CFLAGS) $(LDFLAGS) $(SRCS)

    install: all
            $(APXS) -i -a -n $(MODULE_NAME) ./.libs/$(APACHE_MODULE)

    clean:
            $(RM) $(OBJS) $(APACHE_MODULE)

Last edited by marcob (2011-12-13 15:53:57)

Offline

#2 2011-12-14 20:52:54

KingX
Member
From: CA
Registered: 2010-03-24
Posts: 324

Re: apxs2?

I am not familiar with apxs but just something that stood out for me. Is apxs and apxs2 two separate programs (like apxs is version 1 and apxs2 is version 2)? How did you install apxs and is it really installed in /usr/sbin/? Shouldn't that be /usr/bin?

In your makefile did you try "APXS2 = apxs" or "APXS2 = apxs2"

Seems like there are some inconsistencies regarding apxs and apxs2 in your setup.

Offline

#3 2011-12-15 16:22:47

marcob
Member
From: B-town USA
Registered: 2004-11-10
Posts: 38
Website

Re: apxs2?

apxs is the apache extension tool, and is installed (in /usr/sbin) when apache is installed

After furthur reading, it appears part of the problem is that some distros (Debian) refer to 'apxs' as 'apxs2' while others (Arch) refer to it as 'apsx.'

According to the comments in the makefile, all I need to do is put the path for apxs in (as I have,) and the makefile is finding apxs, but apxs isn't recognizing the options (-r, -d, -y) that are being passed to it.

Offline

#4 2011-12-15 16:29:13

marcob
Member
From: B-town USA
Registered: 2004-11-10
Posts: 38
Website

Re: apxs2?

I found this blurb that seems to be relevant:

. . . After the configure step edit the Makefile and change all the -R options to -Wl,-R and it'll work. The problem is that apxs understands that -L is a link option, but it doesn't understand it needs to similarly forward -R to the link command.

http://osdir.com/ml/apache.mod-auth-ker … 00004.html

but as I'm not very experienced with makefiles, I don't know how to apply these changes because I'm not seeing any '-R' options in the makefile.

Offline

#5 2011-12-15 16:51:32

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: apxs2?

Off-topic general Arch advice:

marcob wrote:

I've installed Arch 64 (2.6.34)

Make sure your system is up to date before building/installing additional applications. There is no current 2.6.34 kernel package for Arch - if you're still using it, you're probably also using other out-of-date packages. Run pacman -Syu, and then choose between the 3.1.5 kernel (the default) or the 2.6.32 one (the lts alternative).

Offline

#6 2011-12-15 20:26:05

marcob
Member
From: B-town USA
Registered: 2004-11-10
Posts: 38
Website

Re: apxs2?

Tom, thanks! Upgrading the system did the trick.

Turns out I had a bad mirrorlist too . . . I should've known something was up since nothing ever needed upgrading . . . d'oh!

Offline

#7 2011-12-15 22:20:22

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: apxs2?

Hmm... not so off-topic after all then. smile

Offline

Board footer

Powered by FluxBB