I have migrated an Oracle database and Oracle HTTP server install from the 32-bit machine to some 64-bit machine - both machines running Linux. Oracle Database is 64-bit, however the (Apache) HTTP server is 32-bit.

I personally use some non-Oracle DSOs (mod_ntlm for just one) but whenever I run the conventional "make install" type factor I finish track of a 64-bit module.

It is possible to standard method to compile 32-bit Apache modules on the 64-bit machine?

Instead of Andrew Medico's answer, use '-m32' for 32-bit compilations and '-m64' for 64-bit compilations on PPC or SPARC or Apple machines - because you don't really mention which nick architecture you're using which notation creates many of these.

I frequently use:

CC="gcc -m32" ./configure

to make sure a 32-bit compilation (or, more often, CC="gcc -m64" to make sure 64-bit compilation).


Question: "Is CC an atmosphere variable utilized by make?"

Answer: Yes, though within this situation, it's also identified by configure, the industry spend script produced by autoconf. The notation I made use of - that is things i use in the command line - sets CC within the atmosphere as the configure command operates. Another answer indicates using:

./configure CC="gcc -m32"

I suppose that actually works and accomplishes very similar effect I have not attempted it so I'm not sure it works.

Should you run ./configure --help | less, you will notice information (frequently just standard information) about ways to use the script. And also at the finish, it'll list (a few of the) relevant atmosphere variables, which CC is a.

The benefit of setting the C compiler to "gcc -m32" would be that the 32-bit flag is placed each time the compiler can be used - there's hardly any room for this to visit wrong. Should you set a flags variable (CFLAGS, etc), there's an opportunity that some command will not utilize it, after which things will go awry.

Also, returning towards the question, make certainly utilizes a variable (macro) known as CC. And you will set that around the make command line:

make CC="gcc -m32"

That overrides any establishing the makefile. By comparison, utilizing an atmosphere variable, the establishing the makefile overrides the worthiness within the atmosphere, so setting CC being an atmosphere variable is less useful. Although make -e provides the atmosphere priority within the makefile, it is almost always a harmful choice to use - it may have unpredicted side-effects.

./configure CFLAGS="-march=i686"

must do it

Together with the -m32 flag in gcc, you may want to range from the -melf_i386 flag for ld to correctly link the 32bit object files towards the 32bit libraries for those who have both 32bit and 64bit libraries. The conventional ld on 64bit linux boxes will default towards the 64bit libraries and you receive a compatibility error once the connecting happens.