Link to home
Start Free TrialLog in
Avatar of AIX25
AIX25Flag for United States of America

asked on

AIX - Compile error

I'm trying to compile and install apache 2.2.23 from source on AIX 6.1.

Here is my configure command, which ran perfectly fine:
 ./configure --prefix=/usr/local/apache --enable-so

Than I run make, and it gives me the following error:

 /bin/sh /usr/local/apache/httpd-2.2.23/srclib/apr/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H -U__STR__ -D_THREAD_SAFE   -I./include -I/usr/local/apache/httpd-2.2.23/srclib/apr/include/arch/unix -I./include/arch/unix -I/usr/local/apache/httpd-2.2.23/srclib/apr/include/arch/unix -I/usr/local/apache-/httpd-2.2.23/srclib/apr/include  -o file_io/unix/filedup.lo -c file_io/unix/filedup.c && touch file_io/unix/filedup.lo
file_io/unix/filedup.c: In function 'file_dup':
file_io/unix/filedup.c:49: error: 'F_GETFD' undeclared (first use in this function)
file_io/unix/filedup.c:49: error: (Each undeclared identifier is reported only once
file_io/unix/filedup.c:49: error: for each function it appears in.)
file_io/unix/filedup.c:52: error: 'FD_CLOEXEC' undeclared (first use in this function)
file_io/unix/filedup.c:53: error: 'F_SETFD' undeclared (first use in this function)
make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 1.

Stop.
make: 1254-004 The error code from the last command is 1.

Stop.
txcawswch802:/tmp/httpd-2.2.23>

Any help please?
Avatar of Scott Madeira
Scott Madeira
Flag of United States of America image

You may have seen this already but it implies a problem with using gcc to compile apache in AIX.  http://mail-archives.apache.org/mod_mbox/apr-dev/201203.mbox/%3CCAN9c_NRHD_f1fCwuZUiTdYFkBhh-5x72Qy3XUw3cutDv=P+XGQ@mail.gmail.com%3E

Why don't you download a precompiled binary instead? That would be easier, I think.
Avatar of AIX25

ASKER

Thanks for the link, but I have already read through it, and upgraded my GCC compiler to the latest version.

The reason I'm compiling my own version is so that I can than have the capability to compile a mssql php module. Unless you know of another way, that would help!
Sorry, I used AIX when it was released for the RS6000s in the early 90s but haven't used it since and my development now is done on a windows box.
SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AIX25

ASKER

woolmilkporc, looks like I may have the XL complier. Can you please verify the below ouput?

server:/> lslpp -l |grep -i xl
  xlC.aix61.rte             11.1.0.2  COMMITTED  XL C/C++ Runtime for AIX 6.1
  xlC.cpp                    9.0.0.0  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.cpp          9.0.0.0  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.rte         11.1.0.2  COMMITTED  XL C/C++ Runtime
  xlC.rte                   11.1.0.2  COMMITTED  XL C/C++ Runtime
  xlC.sup.aix50.rte          9.0.0.1  COMMITTED  XL C/C++ Runtime for AIX 5.2
That's just the preprocessor and the runtime libraries, stuff which comes with the OS.

Run additionally

lslpp -l | grep -i -E "vac|mem|xl"

If the  compiler is installed you should see e.g.

vac.C
vac.aix..
vac.lib
vacpp.*
memdbg.*
xlC.adt (optional)
xlmass.* (optional)


If you don't find that you'll need the trial package (see above).
Avatar of AIX25

ASKER

server:/> lslpp -l | grep -i -E "vac|mem|xl"
                                                 Memory Transport
  xlC.aix61.rte             11.1.0.2  COMMITTED  XL C/C++ Runtime for AIX 6.1
  xlC.cpp                    9.0.0.0  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.cpp          9.0.0.0  COMMITTED  C for AIX Preprocessor
  xlC.msg.en_US.rte         11.1.0.2  COMMITTED  XL C/C++ Runtime
  xlC.rte                   11.1.0.2  COMMITTED  XL C/C++ Runtime
  xlC.sup.aix50.rte          9.0.0.1  COMMITTED  XL C/C++ Runtime for AIX 5.2
                                                 Memory Transport

One more thing...when I install this trial package. Will it upgrade the above filesets that are preprocessor and the runtime libraries, stuff which comes with the OS? If yes, how can I avoid this problem, so that when my trial is up, I can continue to upgrade the filesets up without any issues?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AIX25

ASKER

server:/usr/bin> ls -l cc
ls: 0653-341 The file cc does not exist.

Is the above output normal? I don't have a cc binary, is it necessary?
Avatar of AIX25

ASKER

Also continuing from the above comment.

The the trial compiler verison fixed my error. I ran my configure, make, and make install commands and it has not install Apache. My /usr/local/apache directory is still empty. Configure command below.

./configure --prefix=/usr/local/apache --enable-so
Usually there is a link gcc -> cc, but that's not essential.

Did "make" create all binaries in the build tree? Is e.g. "httpd" present?

If so, it seems that "make install" did not do what it was supposed to.
Any errors wth "make install"?
"make install" should have displayed a log of its activities. What did you see?

If there are no binaries then "make" itself must have failed.
Any errors here?
Avatar of AIX25

ASKER

Ok, I finally was able to install apache now. Ran into another issue though when compliing PHP..please advise.

When I run my make command...I get the following error:

/usr/local/php-5.4.9/ext/iconv/iconv.c: In function 'zm_startup_miconv':
/usr/local/php-5.4.9/ext/iconv/iconv.c:252: error: '_libiconv_version' undeclared (first use in this function)
/usr/local/php-5.4.9/ext/iconv/iconv.c:252: error: (Each undeclared identifier is reported only once
/usr/local/php-5.4.9/ext/iconv/iconv.c:252: error: for each function it appears in.)
make: 1254-004 The error code from the last command is 1.

Here is my libiconv version:
server:/> rpm -qa |grep iconv
libiconv-1.14-2
I assume that vaC needs the installp version of iconv.

Please install

bs.rte.iconv
and optionally
bos.iconv.xxx (xxx according to desired languages, if any)

from the OS installation medium.

You should also apply the latest TL/SP required to bring iconv to your current AIX level.
Avatar of AIX25

ASKER

I have bos.rte.iconv installed already. Would it be better to revert back to using the GCC compiler for the PHP portion install? If yes, what is needed to do this?

server:/> lslpp -l |grep icon
  bos.iconv.com              6.1.7.1  APPLIED    Common Language to Language
  bos.iconv.ucs.com          6.1.7.0  APPLIED    Unicode Base Converters for
  bos.rte.iconv              6.1.7.0  APPLIED    Language Converters
  sysmgt.websm.icons         6.1.7.0  APPLIED    Web-based System Manager Icons
  bos.rte.iconv              6.1.7.0  APPLIED    Language Converters
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AIX25

ASKER

Ok, that worked! But, I received another error, in which the make command did not complete. Do you have any idea about this one?

        echo '\
\
Generating phar.php
/bin/sh[14]: /usr/local/php-5.4.9/sapi/cli/php:  not found.
make: 1254-004 The error code from the last command is 127.


Stop.
server:/usr/local/php-5.4.9>
Try gmake instead of "make".

Get it from here if you don't have it already:

http://www.perzl.org/aix/index.php?n=Main.Make

For some reason AIX' make does not build the PHP CLI. Or did you specify "--disable-cli"?
This doesn't work unless "--disable-phar" is also specified.
Avatar of AIX25

ASKER

This was the configure command I ran:

./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-iconv=/usr/linux
So try "gmake".
Avatar of AIX25

ASKER

I did try gmake and it gave me an error:

ld: 0711-319 WARNING: Exported symbol not defined: php_register_internal_extensions
ld: 0711-317 ERROR: Undefined symbol: php_register_internal_extensions
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: ld returned 8 exit status
gmake: *** [sapi/cli/php] Error 1


Than I ran this:

./configure --prefix=/usr/local/php-airlift --with-apxs2=/usr/local/apache-airlift/bin/apxs --with-iconv=/usr/linux --disable-cli --disable-phar

My make build completed. Than I ran make install and it gave me an error:

server:/usr/local/php-5.4.9> make install
        echo '\
\
Installing PHP SAPI module:       apache2handler
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' libphp5.la /usr/local/apache/modules
rm -f /usr/local/apache/modules/libphp5.so
/usr/local/apache/build/libtool --mode=install cp libphp5.la /usr/local/apache/modules/
cp .libs/libphp5.a /usr/local/apache/modules/libphp5.a
cp .libs/libphp5.lai /usr/local/apache/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /usr/local/php-5.4.9/libs'
chmod 755 /usr/local/apache/modules/libphp5.so
chmod: /usr/local/apache/modules/libphp5.so: A file or directory in the path name does not exist.
apxs:Error: Command failed with rc=65536
.
make: 1254-004 The error code from the last command is 1.

Stop.

Have you ran into this?
rm -f /usr/local/apache/modules/libphp5.so

but

chmod 755 /usr/local/apache/modules/libphp5.so

This cannot work, obviously.

It seems that there is a confusion between "static" and "shared" configure options.

Do you run "make clean" and do you remove "config.log" and "config.status" between "configure" runs?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AIX25

ASKER

Here is the error for when I run my make command. This is a very troublesome install!

libtool: link: the `-o' option requires an argument
Try `libtool --help --mode=link' for more information.
make: 1254-004 The error code from the last command is 1.

Stop.
You have mail in /usr/spool/mail/root
server:/usr/local/php-5.4.9>
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of AIX25

ASKER

Ok, I will try your recommendations. But, if I never run "make install" nothing will get installed in the prefix php directory setup in my "configure" command...correct?
OK,

but with my cp command at least the php shared library will be available to apache, so you can use php as a module.
Avatar of AIX25

ASKER

Ok, I will be working on this tomorrow. I will provide an update.