Operating System - Linux
1828423 Members
3321 Online
109977 Solutions
New Discussion

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

 
SOLVED
Go to solution
Steve_The_King
Frequent Advisor

Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

We need Apache to run in 32 bit compatibility mode on an Itanium HP-UX11.23. The default installed version of Apache is 64-bit 2.0.54.
We also tried installing Apache 32 bit 2.0.58 from http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPUXWSSUITE

We are trying to load our custom library in Apache httpd process. The library is built on HP PA-RISC 11.11 machine. It loads correctly on HP PA-RISC 11.11 machine.

In both cases, this is the error we are getting:
Syntax error on line 1148 of /opt/hpws/apache32/conf/httpd.conf:
Cannot load /data/steve/webgate704/access/oblix/apps/module_loader/bin/obmodule_loader.sl into server: '/data/steve/webgate704/access/oblix/apps/module_loader/bin/obmodule_loader.sl' is not a valid load module: Bad magic number

Does anyone know how to run/configure HP's Apache distribution for Itanium 11.23 to run in 32 bit mode?

Would building our library on HP PA-RISK 11.23 platform help?

Thanks
27 REPLIES 27
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Let me give more details on what all we
tried :

1. We tried installing the 32 bit apache (2.0.58) from following
location:
https://h20293.www2.hp.com/portal/swdepot/try.do?productNumber=HPUXWS...
Please note from there we installed - "HP-UX 11i version 2 PA-RISC/IPF
32 bit"
Which means we installed - HPUXWSATW-B217-1123-32.depot

This package works on both itanium and pa-risc 11.23 versions. Its a
single binary.

Still we get the same "magic" error. However no issues while
installing as the versions are same.

2. Now next we tried installing "HP-UX 11i PA-RISC with IPv6 support"
Which means we installed - HPUXWSATW-B217-1111.depot

We got installation warnings saying incompatible versions as we were
trying to install a 11.11 depot on 11.23 machine.
However after setting the install option "allow_incompatible=true" we
could proceed successfully.
Our custom library got loaded without any errors. (however since this
gives a incompatibility error Customer might not agree with it.)
Please note here that our custom library is also built on 11.11 PA-
RISC machine only.

Hence we were thinking of building on 11.23 PA-RISC or then may be
Itanium.

Dennis Handly
Acclaimed Contributor
Solution

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

>Would building our library on HP PA-RISC 11.23 platform help?

No. If you have a PA plugin you want to use on IPF, you must run the PA version of apache.

This isn't something that we would want people to do so you have to do a bunch of fiddling to make it work.

>Our custom library got loaded without any errors. (however since this
gives a incompatibility error Customer might not agree with it.)

>Hence we were thinking of building on 11.23 PA-RISC or then may be Itanium.

No need to bother with 11.23 PA. Just port to IPF so you and your customers can use the normal apache installation on IPF.
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

>No. If you have a PA plugin you want to >use on IPF, you must run the PA version of >apache.

There is no seperate installer for pa-risc and itanium. The package works on both itanium and pa-risc.
rick jones
Honored Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

And when you install on an IPF system, it installs only the IPF binaries, and when you install on a PARISC system it only installs the PARISC binaries.

Do not confuse "single depot" with "single binary." A depot can contain many different versions of a binary or binaries.
there is no rest for the wicked yet the virtuous have no pillows
Dennis Handly
Acclaimed Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

>Rick: A depot can contain many different versions of a binary or binaries.

Righ, this is why you'll have problems, it isn't going to want to install the PA version. But somehow it seems Steve was able to do magic?
rick jones
Honored Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

It sounds like the magic was to use an 11.11 depot which by definition would be PA-RISC binaries only.
there is no rest for the wicked yet the virtuous have no pillows
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Thank you, Dennis and Rick.

So it seems that we should build our library on Itanium platform and then test is the better option.

If you guys have any idea about problems/issues that we might face while compiling PA-RISC code on Itanium, Please let us know (we are acc compiler).
Dennis Handly
Acclaimed Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

>If you guys have any idea about problems/issues that we might face while compiling PA-RISC code on Itanium, Please let us know (we are aCC compiler)

It's good that you are using aCC++, what version?

When going to IPF, you need to port to use -AA:
http://h21007.www2.hp.com/dspp/tech/tech_TechDocumentDetailPage_IDX/1,1701,5520,00.html

aCC6 is different from aCC3/aCC5:
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,7274,00.html

To get quicker answers (and if you don't mind everyone on the list seeing your questions), you should sign up to the CXX-DEV mailing list:
http://h21007.www2.hp.com/dspp/comm/comm_Community_Home_IDX/1,1273,,00.html
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Hello guys,

we started building our code with aCC A.05.50 version for compiling the code on Itanium. We got follwing error.

Error 203: "/src/obdev2/csabuild/coreid7043hpport/np_common/util/base/hp-ux/../obmsgcatalog.cpp", line 636 # Cannot assign 'char *' with
'const char *'.
while ((p = strchr(lastp, '%')) != NULL) {
^^^^^^^^^^^^^^^^^^

This error comes even if we specify -AA or -AP in compiler flags.
We did not get this error on PA-RISC 11.11.

It would be great if you can help us out with this. :)
Dennis Handly
Acclaimed Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

>we started building our code with aCC A.05.50

aCC5 is no longer supported. You should be using the latest aCC6, A.06.14.
http://h21007.www2.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,1743,00.html#11.23

Error 203: obmsgcatalog.cpp", line 636 # Cannot assign 'char*' with 'const char*'.
while ((p = strchr(lastp, '%')) != NULL) {

>This error comes even if we specify -AA or -AP in compiler flags. We did not get this error on PA-RISC 11.11.

You should get the error if you compile with -AA but not with -AP, even on 11.11.

The error means what it says. strchr returns a const char* (since lastp is const char*, 21.4(8)) so that p must be a const char*.
Dennis Handly
Acclaimed Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

(You do know that you can assign more than 10 points per thread? The supply is infinite. ;-)
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Thanks Dennis, It compiled correctly. I wish I could give more than 10 pts for your posts :)
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Hello Guys,

Got some more issues regarding this for you.. :)

1. We are building our executable on HP Itanium using aCC 05.50. While executing it we are getting follwing error.

"aCC runtime: Use of "-mt" must be consistent during both compilation and linking.
ABORT instruction (core dumped)"

We get this error even after compiling with -mt option.

This is the stack trace from core file.

#0 0x60000000c02a6410:0 in kill+0x30 () from /usr/lib/hpux32/libc.so.1
#1 0x60000000c019d430:0 in raise+0x30 () from /usr/lib/hpux32/libc.so.1
#2 0x60000000c025f370:0 in abort+0x190 () from /usr/lib/hpux32/libc.so.1
#3 0x60000000c083a9f0:0 in std::terminate+0x50 ()
from /usr/lib/hpux32/libCsup.so.1
#4 0x60000000c0841a90:0 in __cxa_throw+0x1b0 ()
from /usr/lib/hpux32/libCsup.so.1
#5 0x60000000c0aa9b80:0 in __sinit__ZNSbIwSt11char_traitsIwESaIwEE9__nullrefE+0xe0 () from /usr/lib/hpux32/libstd_v2.so.1
#6 0x60000000c0027e90:0 in EM_mark_BOS+0x50 () from /usr/lib/hpux32/dld.so

2. We are also getting some warnings regarding unknown options.
a. aCC: warning 901: unknown option: `+s': use +help for online documentatio

b. aCC: warning 901: unknown option: `-R../../lib': use +help for online documentation.

Do you know how to get rid of these warnings? I could not find the meaning behind these options, so I am reluctant to remove them.
Dennis Handly
Acclaimed Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

>We get this error even after compiling with -mt option.

You need to compile EVERY stinkin' lib, object, etc with -mt. Even your aC++ third party libs.

What aC++ runtime version to you have? You should try the latest, PHSS_35978. There are versions of the runtime that would give false errors like this if you illegally put the aC++ runtime libs in the wrong order.

>2. We are also getting some warnings regarding unknown options.
a. aCC: warning 901: unknown option: `+s'
b. aCC: warning 901: unknown option: `-R../../lib'
>Do you know how to get rid of these warnings? I could not find the meaning behind these options, so I am reluctant to remove them.

These are not valid aC++ options. +s may be a linker option. -R is not the right form for HP-UX linker option.

(I would just remove them until you know what they do on Solaris??)
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Hi Dennis, Thanks alot.
Installing PHSS_35978 did help.
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Hi Dennis, Rick,

we have started with 64 bit porting of the code.
While linking with a third party library, I read that it is Itan2 64 bit compatible. So I want to know, what is "Itan2"? How to find out whether my machine is Itan1 or Itan2? And if my machine is Itan1, will this Itan2 library work on my machine?

Thanks..
rick jones
Honored Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

If you are running 11.23, you can be confident your system is "Itan2" (Itanium2).

The only HP "Itanium1" systems were the early developer protos - the i2000, rx4610 and the rx9610. Noone should be doing anything of substance with those systems.

Everything else is Itanium2
there is no rest for the wicked yet the virtuous have no pillows
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Thanks Rick.

Another one for you experts.. :)

We have created our 64 bit binaries. But it is giving some runtime problem. We have a call to gets() in our code. in 64 bit, this call returns NULL without waiting for the user to enter something. I also tried scanf(), same thing happened.
Is it a known issue? Do you have any pointer for this?
rick jones
Honored Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

I'd probably run the applicatoin under tusc and see what the system calls are saying.

I'd probably also up the warning levels in the compiler to make sure there wasn't some lurking 32 to 64 bit ism in there.

You are including right? If not, I think compilers tend to ass-u-me that the call returns an int, which of course would be bad news for a call returning a pointer in 64-bit mode...
there is no rest for the wicked yet the virtuous have no pillows
Dennis Handly
Acclaimed Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

>call to gets() in our code. in 64 bit, this call returns NULL ...

What is the value of errno?
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

you guys are good.. :)

Running tusc did help. It revealed that the file descriptor for stdin (0) was getting closed somehow. Fixing this solved the problem.

Thanks alot.
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Hello Guys,

We are trying to run Apache 2.2 with our library. But Apache 2.2 does not come bundled with HP Itanium webserver suite. Latest available Apache version in the suite is 2.0.58.
So we downloaded Apache 2.2 open source.

Can we compile it with aCC, or gcc is needed?

We tried compiling with aCC and got the server running. But when we tried loading our library in the server process we got following error.

httpd: Syntax error on line 426 of /data/webservers/apache2.2/conf/httpd.conf: Cannot load /data/7043wg/oblix/apps/webgate/bin/webgate.sl into server: Invalid argument

This is with Apache 2.2 built using config.cache file having these contents,

ac_cv_func_dlopen=${ac_cv_func_dlopen=no}
ac_cv_header_dl_h=${ac_cv_header_dl_h=yes}
ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h=yes}
ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen=no}
ac_cv_lib_dld_shl_load=${ac_cv_lib_dld_shl_load=yes}

This basically tells apache to use shl_load instead of dlopen to load libraries. We did this because we were getting following error with normal build,

httpd: Syntax error on line 426 of /data/webservers/apache2.2/conf/httpd.conf: Cannot load /data/7043wg/oblix/apps/webgate/bin/webgate.sl into server: Unresolved external

I tried tusc, but it doesn't reveal anything.

Do you have any idea on this issue?
Dennis Handly
Acclaimed Contributor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

Cannot load .../bin/webgate.sl into server: Invalid argument

This is pretty meaningless. Is this EINVAL from shl_load?

>We did this because we were getting following error with normal build,
...: Unresolved external

Well, with shl_load, you could OR in BIND_VERBOSE to get details.

>I tried tusc, but it doesn't reveal anything.
>Do you have any idea on this issue?

No EINVAL return status in tusc?

Can you load your plugin into a small test case?
Steve_The_King
Frequent Advisor

Re: Configuring Apache to run in 32 bit compatibility mode on Itanium & HP-UX 11.23

I guess the EINVAL is from shl_load.

I tried adding BIND_VERBOSE and got the symbol error for '_Unwind_Resume' symbol. Which went away when linked to libunwind.so.
But it gave another error for "dlsetnonuniqsymflag".

/usr/lib/hpux32/dld.so: dlsym: Unknown symbol dlsetnonuniqsymflag

How to get rid of this error?

PS: tusc doesn't reveal anything.