SLES 12 with 32 bit apache modules: wrong ELF class error

Hi,

We have some old software that has been working fine on SLES 10 32bit.
Because of some virtualization issues we couldn’t fix (clock drift), we set up a SLES 12 64 bit.
I copied the httpd.conf and the required modules over to the new machine.
When I tried restarting apache2, I got:

httpd2: Syntax error on line 252 of /etc/apache2/httpd.conf: Cannot load modules/SisTemSrvA20K30.so into server: /usr/local/apache2/modules/SisTemSrvA20K30.so: wrong ELF class: ELFCLASS32

There are hundreds of modules such as this.

Our software is written for crosskylix (very old 32bit compiler). Converting it to some other language or making it compilable with FPC 64bit is an enormous task that the management cannot afford to start. Therefore we have to load it into a 32bit apache.

Is it possible to install 32bit apache on SLES12 ?

Hi nurettin,

[QUOTE=nurettin;29540]Hi,
[…]
Is it possible to install 32bit apache on SLES12 ?[/QUOTE]

Yes, of course ;), the only problem I see is that from what I can tell, there’s no 32bit Apache httpd included in the distribution. So you’ll probably be on your own getting a version cross-compiled. Do you already have a development environment to provide 32bit packages for SLES12?

Regards,
Jens

[QUOTE=jmozdzen;29544]Hi nurettin,

[…] Do you already have a development environment to provide 32bit packages for SLES12?

Regards,
Jens[/QUOTE]

Hi Jens,

What dependencies are needed to cross-compile and run apache2 where host=x86_64 and target is i686 (or i586) ?
Can I find the apache2 sources among SLES12 packages?

PS: I tried compiling and linking like gcc -m32 helloworld.c but it was missing stub-32 headers. When I installed libstdc++32bit, it became a linker error where it couldn’t find suitable 32bit library for -lgcc

Thank you for responding.

Hi nurettin,

[QUOTE=nurettin;29546]Hi Jens,

What dependencies are needed to cross-compile and run apache2 where host=x86_64 and target is i686 (or i586) ?
Can I find the apache2 sources among SLES12 packages?[/QUOTE]

I cannot tell what dependencies are required, it’ll likely be some try&err - but you’ll probably need plenty of the devel-32bit packages (and rpmbuild them yourself, if not readily available in the SDK).
The sources come with the distribution, typically already packages in an rpmbuild-conforming way. So it’ll “only” be providing the prereq 32bit development packages (plus run-time, if using shared libs) and then rpmbuilding httpd as 32bit.

Did you have a look at software.opensuse.org, if someone by chance already completed this task? It’ll be quite some work, and I rather suggest to fix the time-base problems with your virtualization environment than to take the plunge into the world of 32bit-on-64bit compiling.

Regards,
Jens

Silly note: it may be worthwhile to just go back to SLES 11 which still
supports x86_32 options. Keep in mind that no system built in many years
is x86_32 only, so at some point you need to port this or move away from it.


Good luck.

If you find this post helpful and are logged into the web interface,
show your appreciation and click on the star below…