Migration Solutions for ColdFusion Applications to ASP.NET
      
New Atlanta Product Forums Profile | Search | Login | RSS
New Topic Reply   Previous Page  Page: 1   Next Page

Thread: mod_servletexec.c fails to compile
Created on: 03/10/11 01:45 PM Replies: 8
rkogelhe


Joined: 03/10/11
Posts: 6
mod_servletexec.c fails to compile
03/10/11 1:45 PM

Hello Everyone,

I'm running ServletExec_AS_60.sh on Solaris 10 Sparc for Apache 2.0.64 64-bit and getting:

mod_servletexec.c:1317: warning: function definition has qualified void return type
mod_servletexec.c: In function 'sendAddlInfo':
mod_servletexec.c:2489: warning: passing argument 2 of 'strcmp' makes pointer from integer without a cast
mod_servletexec.c: In function 'getConnection':
mod_servletexec.c:2703: warning: passing argument 4 of 'apr_socket_create' makes pointer from integer without a cast
mod_servletexec.c:2703: error: too many arguments to function 'apr_socket_create'
apxs:Error: Command failed with rc=65536

Apache was compiled using gccfss:

sparc-sun-solaris2.10-gcc (GCC) 4.3.3 (20091210) (gccfss)

and configure:

CC=gcc \
CFLAGS="-m64 -mcpu=niagara2 -O3 -DSSL_EXPERIMENTAL -DSSL_ENGINE" \
CXX=$CC \
CXXFLAGS="$CFLAGS" \
LDFLAGS="-m64 -mcpu=niagara2 -O3 -R${GCCRT_DIR}/lib/sparcv9 -L${GCCRT_DIR}/lib/sparcv9 -R${OPENSSL_DIR}/lib -L${OPENSSL_DIR}/lib -R/usr/sfw/lib/64 -L/usr/sfw/lib/64" \
./configure \
"--with-mpm=worker" \
"--enable-unique-id=shared" \
"--enable-ssl=shared" \
"--enable-headers=shared" \
"--enable-rewrite=shared" \
"--enable-proxy=shared" \
"--prefix=${HTTPD_DIR}" \
"--enable-rule=SSL_EXPERIMENTAL" \
"--with-ssl=${OPENSSL_DIR}"

Anyone had something similar? Is this an incompatability with my gcc, my Apache, or something else?

Cheers,

Ryan
Link | Top | Bottom
paulbonfanti


Joined: 10/04/07
Posts: 451
RE: mod_servletexec.c fails to compile
03/10/11 2:11 PM

My best guess is that for some reason the ServletExec installer thinks your Apache is 2.2.x instead of 2.0.x. In Apache 2.2.x the apr_socket_create method takes 5 parameters while in Apache 2.0.x it only takes 4 parameters.

The installer should have generated a log file at /tmp/SEinstall.log. Could you send this log file to support@newatlanta.com so I can see if it gives any clues as to what went wrong?

The installer determines the version of Apache by sending the output from 'httpd -v' to /tmp/apacheVersionOutput.txt. Could you send this file to support@newatlanta.com too?
Paul Bonfanti, New Atlanta
Link | Top | Bottom
rkogelhe


Joined: 03/10/11
Posts: 6
RE: mod_servletexec.c fails to compile
03/10/11 2:46 PM

Ahh... that is perhaps the explanation. Our instance configuration is in a different directory from the software, so the shell script couldn't find httpd. I'll create a link to it and see how it goes.
Link | Top | Bottom
rkogelhe


Joined: 03/10/11
Posts: 6
RE: mod_servletexec.c fails to compile
03/10/11 2:54 PM

Ugh... now it doesn't like the ELF class:

/dsk01/apache/app/build2064/httpd-2.0.64/build/libtool --silent --mode=link gcc -o mod_servletexec.la -rpath /dsk01/apache/app/build2064/httpd-2.0.64/modules -module -avoid-version mod_servletexec.lo
ld: fatal: file .libs/mod_servletexec.o: wrong ELF class: ELFCLASS64
ld: fatal: File processing errors. No output written to .libs/mod_servletexec.so
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536

Does this distribution only support 32-bit Apache builds?
Link | Top | Bottom
rkogelhe


Joined: 03/10/11
Posts: 6
RE: mod_servletexec.c fails to compile
03/10/11 2:55 PM

Wait a sec... that looks like the opposite problem. I wonder why it's confused.
Link | Top | Bottom
paulbonfanti


Joined: 10/04/07
Posts: 451
RE: mod_servletexec.c fails to compile
03/10/11 3:58 PM

Make sure you're using a 64-bit compiler and linker. I believe this error will occur if a 32-bit compiler or linker is used.

Also, googling 'wrong ELF class: ELFCLASS64' might give you some clues.
Paul Bonfanti, New Atlanta
Link | Top | Bottom
rkogelhe


Joined: 03/10/11
Posts: 6
RE: mod_servletexec.c fails to compile
03/10/11 4:32 PM

I did a bit of reading and I think I know what's happening. One of the object files encountered before .libs/mod_servletexec.o is 32-bit. I would assume this is an object file included in the original ServletExec distribution.

According to Sun:

The man page for ld(1) hints at the issue.

No command-line option is required to distinguish 32-bit objects or 64-bit objects. The link-editor uses the ELF class of the first relocatable object file that is found on the command line, to govern the mode in which to operate.

So IMO I've probably done something to make the install script think it needs to extract the 32-bit pre-compiled objects instead of the 64-bit ones.
Link | Top | Bottom
rkogelhe


Joined: 03/10/11
Posts: 6
RE: mod_servletexec.c fails to compile
03/10/11 4:34 PM

Uh... just to be sure, does anyone know if:

1) The distro includes object files.
2) The distro includes 64-bit object files.

?
Link | Top | Bottom
paulbonfanti


Joined: 10/04/07
Posts: 451
RE: mod_servletexec.c fails to compile
03/11/11 8:14 AM

The only object file included/installed by the SE installer is the 32-bit ServletExec_Adapter.so. During the installation process it is copied to <installation directory>/ServletExecAS/bin.

If you're installing against Apache then it should be ignored. This object file is only needed when installing against Sun's web server.

With Apache, no pre-compiled objects are used. Instead mod_servletexec.c is installed and Apache's apxs tool is used to compile it into the object file mod_servletexec.so.

Maybe you could try the following:

1. copy all of the object files in the libs directory to a different directory.

2. run the SE installer.

3. copy the object files back to the libs directory
Paul Bonfanti, New Atlanta
Link | Top | Bottom

New Post
Please login to post a response.


company media information terms of use privacy policy contact us
This page was dynamically built on the BlueDragon CFML Engine