Opened 14 years ago

Closed 14 years ago

#28850 closed defect (duplicate)

mod_mono builds with old problem

Reported by: vulcan_@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: mod_mono

Description

i was able to get back to trying to get mod_mono working today. I was getting a config error that stopped my apache2 server from running. It was complaining that it could not find the mod_mono.so file .. which is a link in /opt/local/apache2/modules/ to mod_mono.0.0.0.0.so which was not there.

I started with a search for any existing reports and found #8939 and #17217.

five years ago (so 2006) #8939 was marked fixed with no indication of what the problem was nor what fixed it, but the report included these messages

mod_mono.c: In function 'connection_get_remote_port': mod_mono.c:334: warning: implicit declaration of function 'apr_sockaddr_port_get'
mod_mono.c: In function 'try_connect': mod_mono.c:829: warning: implicit declaration of function 'apr_connect'
mod_mono.c: In function 'setup_socket': mod_mono.c:1167: warning: passing argument 4 of 'apr_socket_create' makes integer from pointer without a cast
mod_mono.c:1167: error: too few arguments to function 'apr_socket_create' 
make[1]: *** [mod_mono_la-mod_mono.lo] Error 1 make: *** [all-recursive] Error 1

we will come back to these

4 years ago #17217 reported that the mod_mono.0.0.0.0.so file was not being copied to /opt/local/apache/modules as it should be .. and nothing further was ever done.

today i used "port build mod_mono" to get the libraries to build, but not to allow the installation. Note that the libs are built into ../build/../src/.libs which is thus a hidden dir in a shell .. took me a while to find them. I manually copied the mod_mono.0.0.0.0.so file from .libs to apache/modules and tested the config again. Now i got this message:

:info:build mkdir .libs
:info:build  /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I. -I../include -I/opt/local/include -pipe -O2 -arch i386 -I/opt/local/apache2/include -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -DDARWIN -DSIGP
ROCMASK_SETS_THREAD_MASK -no-cpp-precomp -pipe -O2 -arch i386 -I/opt/local/apache2/include -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -I/opt/local/include -Wall -DDFLT_MONO_CONFIG_DIR=\"/opt/local
/apache2/conf/mod-mono-applications\" -pipe -O2 -arch i386 -I/opt/local/apache2/include -I/opt/local/include/apr-1 -I/opt/local/include/apr-1 -pipe -O2 -arch i386 -I/opt/local/include -MT mod_mono_la-mod_mon
o.lo -MD -MP -MF .deps/mod_mono_la-mod_mono.Tpo -c mod_mono.c  -fno-common -DPIC -o .libs/mod_mono_la-mod_mono.o
:info:build mod_mono.c: In function 'connection_get_remote_port':
:info:build mod_mono.c:365: warning: implicit declaration of function 'apr_sockaddr_port_get'

notice how 'apr_sockaddr_port_get' is not properly defined? Remember that is one of the problems reported in #8939 as excerpted above? interesting eh?

Googling for the error message i found this clue in a mod_python mailing list back in 2006. Note that the respondent mentions that 'apr_sockaddr_port_get' is no longer in the APR as of v 1.2.x. Cory goes on to mention that he has a patch for mod_python that fixes the problem .. but the patch is no longer available, the link he provides is dead.

I have to conclude that the version of mod_mono that MacPorts is offering is very old and needs to be updated to remove the use of 'apr_sockaddr_port_get'.

Change History (2)

comment:1 Changed 14 years ago by vulcan_@…

ah ha!'''

looking at the code in mod_mono.c

static int
connection_get_remote_port (conn_rec *c)
{
#ifdef APACHE13
        return  ntohs (c->remote_addr.sin_port);
#elif defined(APACHE22)
        return c->remote_addr->port;
#else
        apr_port_t port;
        apr_sockaddr_port_get (&port, c->remote_addr);
        return port;
#endif

}

we can see that the deprecated apr_sockaddr_port_get() should not be called ... IFF APACHE22 is defined, which is obviously is not. This starts to smell like a portfile fix is needed to add a -DAPACHE22 to the compile commands

comment:2 Changed 14 years ago by jmroot (Joshua Root)

Resolution: duplicate
Status: newclosed

There's no reason to open another ticket just because the existing one is old. The mod_mono port has no maintainer, so it's not surprising that nothing has happened. If you come up with a fix, attach the patch to #17217.

Note: See TracTickets for help on using tickets.