PDA

View Full Version : Compilation on AIX 5.3



CHM
May 22nd, 2009, 04:50 AM
Hi,

i'm trying to install amanda on a AIX 5.3 (Unix proprietary OS, from IBM).

I downloaded sources of the last version (2.6.1p1), and ran the configure script on the server.

Here is the (end of) output :


[root@dev2]# ./configure --with-user=amandabackup --with-group=disk
[...]
checking size of int... configure: error: cannot compute sizeof (int)
and it stops here.

I looked for this issue on the web, and didn't find any answer that solve this.

I'll post my config.log in a few mins.

Any idea ?

Thanks by advance :)

dustin
May 22nd, 2009, 05:19 AM
I just wrote this up:
http://wiki.zmanda.com/index.php/Configure:_error:_cannot_compute_sizeof_%28int%29

I know of a few other folks who have built Amanda on AIX, and it's been an uphill battle because AIX provides non-standard or deficient versions of so many resource Amanda expects. You may wish to consult amanda-users, which has a broader audience, with any further questions.

CHM
May 22nd, 2009, 05:29 AM
Fast answer; thanks a lot :)



I know of a few other folks who have built Amanda on AIX, and it's been an uphill battle because AIX provides non-standard or deficient versions of so many resource Amanda expects.

Hooo, yes ... i HAVE to work on it, but i really hate this OS :mad:

CHM
May 27th, 2009, 01:40 AM
Wow, this log is amazingly long (~6000 lines :eek: ).
And i don't understand anything :confused:

Here is the result of

grep -v '"define' config.log | tail -1000
Result (http://pastebin.archlinux.fr/348432)

Hope someone will understand what are the problems ... :(

dustin
May 27th, 2009, 05:31 AM
I'm not sure what led you to include all of that. I added http://wiki.zmanda.com/index.php/Reading_config.log. Anyway, here's the interesting part:


configure:50232: checking size of int
configure:50534: gcc -o conftest -g -O2 -fno-strict-aliasing -q32 -D_LARGE_FILES -qlonglong -D_THREAD_SAFE -fno-strict-aliasing -D_GNU_SOURCE -b32 conftest.c -lc -lpthread -lm >&5
gcc: unrecognized option '-q32'
gcc: unrecognized option '-qlonglong'
gcc: unrecognized option '-b32'
collect2: library libm not found
configure:50537: $? = 1
configure: program exited with status 1
configure: failed program was:
| /* confdefs.h. */
| /* end confdefs.h. */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| # include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| # include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| typedef int ac__type_sizeof_;
| static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
| static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
| #include <stdio.h>
| #include <stdlib.h>
| int
| main ()
| {
|
| FILE *f = fopen ("conftest.val", "w");
| if (! f)
| return 1;
| if (((long int) (sizeof (ac__type_sizeof_))) < 0)
| {
| long int i = longval ();
| if (i != ((long int) (sizeof (ac__type_sizeof_))))
| return 1;
| fprintf (f, "%ld\n", i);
| }
| else
| {
| unsigned long int i = ulongval ();
| if (i != ((long int) (sizeof (ac__type_sizeof_))))
| return 1;
| fprintf (f, "%lu\n", i);
| }
| return ferror (f) || fclose (f) != 0;
|
| ;
| return 0;
| }
configure:50556: error: cannot compute sizeof (int)
See `config.log' for more details.


In particular, it looks like glib is expecting to be compiled with the AIX compiler, but you're using gcc. See the updated http://wiki.zmanda.com/index.php/Configure:_error:_cannot_compute_sizeof_%28int%29.

CHM
May 27th, 2009, 06:05 AM
I think I'm going to give up: it seems that there are no compiler installed on this box (other than gcc), and pkg-config isn't present too ...
All my searches lead to IBM website, where we can read a long long text which explain why buying their licence is a good idea ...
I'm going to turn mad ... :(

well, thank you for your help, again ...

dustin
May 27th, 2009, 06:35 AM
I think a lot of folks have reached the same conclusion trying to build on AIX.

If you do want to move forward, probably the easiest solution is to build your own glib using gcc. I think that's what Scott did.

CHM
May 27th, 2009, 10:55 PM
For now, we are going to test dump via NFS.
We will see ..

Thank you.

vincent
December 2nd, 2009, 11:42 AM
Hello there,

For info, I could build amanda 2.6.1 on AIX5.3 with either gcc or with the IBM xl C compiler 7.0.0.0.
If someone has still some interest in my findings, I can summarize. :)

zbackup
December 2nd, 2009, 02:09 PM
Hello there,

For info, I could build amanda 2.6.1 on AIX5.3 with either gcc or with the IBM xl C compiler 7.0.0.0.
If someone has still some interest in my findings, I can summarize. :)

Hello,

There is a significant interest from AIX users to run Amanda. So, your summary and any tips will certainly be helpful to a significant set of community users.

Thanks!

vincent
December 4th, 2009, 05:59 AM
Here is the procedure with xlc7.0.0.0
===========================================

assuming that :
- only the client part is compiled, I haven't tried to compile the server
- compilation works but the program has not been tested yet
- I installed all 3rdparty product on dedicated directory to avoid conflicts.
- the compilation shell is bash

If you use xlc7.0.0.0, you need to first to compile some 3rdparty products :
1- gnu make (3.81)
--> ./configure && make && make install

2- pkgconfig (0.23)
--> ./configure && make && make install

3- gnu gettext (0.17)
--> ./configure --prefix=/some/dir/for/gettext0.17 && make && make install

4- glib (2.22.2)
--> need to specify location of gettext
export CFLAGS="-I /some/dir/for/gettext0.17/include"
export LDFLAGS="-L /some/dir/for/gettext0.17/lib"
export PATH="/some/dir/for/gettext0.17/bin:$PATH"
./configure --disable-visibility && perl -pi -e 's/SUBDIRS = . tests/SUBDIRS = ./' gobject/Makefile && make && make install

5- libiconv (1.13.1)
--> need to specify location of gettext
export CFLAGS="-I /some/dir/for/gettext0.17/include"
export LDFLAGS="-L /some/dir/for/gettext0.17/lib"
export PATH="/some/dir/for/gettext0.17/bin:$PATH"
./configure --prefix=/some/dir/for/libiconv1.13.1 && make && make install

You can then build amanda-2.6.1 (works also with 2.6.1p2) as follow :
--> need to specify localtion of gettext, libconv and need to hack makefiles

./configure --without-server --with-user=amandabackup --with-group=disk --with-amandahosts --without-ipv6 --with-libiconv-prefix=/some/dir/for/libiconv1.13.1 --with-libintl-prefix=/some/dir/for/gettext0.17

perl -pi -e 's;(^LDFLAGS =.*);\1 ../gnulib/.libs/libgnu.a;' amar-src/Makefile oldrecover-src/Makefile recover-src/Makefile

make && make install

That's it !

I can create a tarball with the client and the required 3rdparty libs if someone is interested.

Here is the procedure with gcc 4.2.4 from pware :
===============================================

1- from http://pware.hvcc.edu/download/aix53, download (some utilities like wget, zip, unzip are probably not necessary):
pware53.autoconf.2.63.0.0.bff pware53.flex.2.5.35.0.bff pware53.gmp.4.3.1.0.bff pware53.make.3.81.0.0.bff pware53.readline.5.2.0.0.bff pware53.zip.2.32.0.0.bff
pware53.base.5.3.0.0.bff pware53.gcc-g++.4.2.4.0.bff pware53.libiconv.1.13.1.0.bff pware53.mpfr.2.4.1.5.bff pware53.tar.1.22.0.0.bff pware53.zlib.1.2.3.0.bff
pware53.bash.4.0.24.0.bff pware53.gdb.6.7.1.0.bff pware53.libtool.1.5.26.0.bff pware53.ncurses.5.7.0.1.bff pware53.unzip.6.0.0.0.bff
pware53.expat.2.0.1.0.bff pware53.gettext.0.17.0.0.bff pware53.m4.1.4.12.0.bff pware53.openssl.0.9.8.11.bff pware53.wget.1.11.4.0.bff

2- If needed uncompress them first and install them by typing :
installp -agYX -d. all

3- create a custom getconf to 'abuse' configure scripts
create a file called getconf and store it into a tmp dir (say /tmp/hack/getconf)
==========================================
#!/bin/sh
/usr/bin/getconf $* | sed -e 's/-q32//g' -e 's/-qlonglong//g' -e 's/-b32//g' -e 's/-lc$//g' -e 's/-lc[ \t]*//g' -e 's/-lm$//g' -e 's/-lm[ \t]*//g'
==========================================

4- make sure our hack version is taken first
PATH=/tmp/hack:$PATH

5- compile amanda
./configure --without-server --with-user=amandabackup --with-group=disk --with-amandahosts --without-ipv6 --with-libiconv-prefix=/opt/pware --with-libintl-prefix=/opt/pware

That's it !

zbackup
December 4th, 2009, 04:23 PM
Thanks for providing the details. What would be really awesome is if you consider becoming the resident Amanda AIX Platform Expert. You can add yourself to the list, under AIX, here:

http://wiki.zmanda.com/index.php/Platform_Experts

That is also the best location for your documentation, which can be maintained by you and other Amanda/AIX users.

Also, yes, please do send the client and required libraries tarball. You can use yousendit.com and send it to community@zmanda.com. We will put these on SourceForge or other appropriate location.

vincent
December 7th, 2009, 02:54 PM
Well, I'm not an AIX expert at all ;)

Regarding the tarball, unfortunately all paths are hardcoded : I dont' know how to relocate shared library on AIX.

But I can recompile the whole lot to something like : /opt/amanda-2.6.1

FHogenhout
October 1st, 2010, 04:37 AM
Hi Vincent,
could you send me the tarball liek you offered in your post.

I'm struggling with the installation of the Amanda client on AIX and maybe your tarball can help me.

Thanks in advance.

vincent
October 1st, 2010, 05:30 AM
I've just sent you an email with links to tarballs :)

guo
October 14th, 2010, 01:21 AM
hi,vincent,pls send your amanda setup file for AIX 5.3 to my email guohp@gsta.com, if you have step by step document,pls send it to me.
i try many times in AIX to fail, it show "checking size of int... configure: error: cannot compute sizeof ".
thanks a lot

vincent
October 14th, 2010, 12:17 PM
Hello,

sure, I tried to you some infos by emails but I've got :
<guohp@gsta.com>: host 61.144.66.76[61.144.66.76] said: 554 Invalid recipients or sender blocked (in reply to DATA command)

Regards,

zbackup
October 14th, 2010, 01:55 PM
Vincent,

We would be happy to host your tarball somewhere. If you like, you can send these to us. You can use yousendit.com to send it to community@zmanda.com

thanks

vincent
October 14th, 2010, 02:30 PM
Hello,

well my tarballs have some hardcoded settings which are not standard. I'm not sure it's wise to distribute them.

Here is my ./configure :
cd amanda-2.6.1; ./configure --without-server --with-user=amandabackup --with-group=disk --prefix=/bbpsysadm/aix-5.3-powerpc/xlc-7.0.0.0/amanda-2.6.1 --with-amandahosts --without-ipv6 --with-libiconv-prefix=/bbpsysadm/aix-5.3-powerpc/xlc-7.0.0.0/libiconv-1.13.1 --with-libintl-prefix=/bbpsysadm/aix-5.3-powerpc/xlc-7.0.0.0/gettext-0.17 --with-gnutar=/bbpsysadm/aix-5.3-powerpc/xlc-7.0.0.0/tar-1.22/bin/tar

I defined a custom deployment directory tree as follow :
/bbpsysadm/
--> our company sysadmin root
$platform/
--> compiler platform : here I've compiled under aix-5.3-powerpc
$compiler/
--> compiler version : here I've used IBM xlC compiler version 7.0.0.0

For maintenance purposes, having a global deployment tree eases my life. -> I have a kind of flat "source control system" for my binaries and my builds.
Following the same concept, I have also :
/bbpsysadm/sunos-5.10/suncc-5.8-121017-14 and
/bbpsysadm/linux-debian-3.0/gcc-3.3.5
By doing so I have consistent deployment but I'm getting off standards, that's why I'm not very keen on distributing them. But if you don't mind, I can share the tarballs, or I can redo a compilation with another --prefix. Just tell me.

Regards,

guo
October 14th, 2010, 07:12 PM
hi,vincent, my command is "./configure --without-server --with-user=amandabackup --with-group=disk --prefix=/home/mysql/gccsetup/amanda-2.6.1 --with-amandahosts --without-ipv6 --with-libiconv-prefix=/home/mysql/amdsetup/libiconv-1.13.1 --with-libintl-prefix=/home/mysql/amdsetup/gettext-0.17 --with-gnutar=/usr/bin/gtar",

but i got errors, it is "checking size of int... configure: error: cannot compute sizeof(size_t)" yet!!!

vincent
October 14th, 2010, 09:52 PM
Compiling under AIX was quite tricky. Your problem reminds me the following hack I had to apply

extract from my previous post ...
================================================== ==============
3- create a custom getconf to 'abuse' configure scripts
create a file called getconf and store it into a tmp dir (say /tmp/hack/getconf)
==========================================
#!/bin/sh
/usr/bin/getconf $* | sed -e 's/-q32//g' -e 's/-qlonglong//g' -e 's/-b32//g' -e 's/-lc$//g' -e 's/-lc[ \t]*//g' -e 's/-lm$//g' -e 's/-lm[ \t]*//g'
==========================================

4- make sure our hack version is taken first
PATH=/tmp/hack:$PATH
================================================== ==============

If it does not help, you can check your config.log (near the end) to see what's going wrong.

Regards,

guo
October 15th, 2010, 12:32 AM
1, my config.log's end line is "configure: exit 77"

2,when i excute "/usr/bin/getconf $* | sed -e 's/-q32//g' -e 's/-qlonglong//g' -e 's/-b32//g' -e 's/-lc$//g' -e 's/-lc[ \t]*//g' -e 's/-lm$//g' -e 's/-lm[ \t]*//g'
", i got infomation "Usage: getconf [ -v specification ] System_var
getconf [ -v specification ] Path_var Pathname
getconf Device_var Device_Path
getconf -a"
3, can you send your tarball for aix and step by step document to my email hp.guo@126.com? thanks very much

vincent
October 15th, 2010, 01:27 AM
Hello,

I've just sent you the links to tarballs.

Regarding your getconf problem you must create a new '/tmp/hack/getconf' script which contains the horrible getconf line with sed patterns.

If you like, you can send me your config.log file.

Regards,

guo
November 4th, 2010, 07:00 PM
hi,everybody,thanks for your help! i compile amanda server, configure is successful, when i excute to "make", i got the following error:

tape-posix.c: In function 'tape_rewind':
tape-posix.c:54: error: storage size of 'mt' isn't known
tape-posix.c:55: error: 'MTREW' undeclared (first use in this function)
tape-posix.c:55: error: (Each undeclared identifier is reported only once
tape-posix.c:55: error: for each function it appears in.)
tape-posix.c:58: error: 'MTIOCTOP' undeclared (first use in this function)
tape-posix.c:54: warning: unused variable 'mt'
tape-posix.c: In function 'tape_fsf':
tape-posix.c:68: error: storage size of 'mt' isn't known
tape-posix.c:69: error: 'MTFSF' undeclared (first use in this function)
tape-posix.c:71: error: 'MTIOCTOP' undeclared (first use in this function)
tape-posix.c:68: warning: unused variable 'mt'
tape-posix.c: In function 'tape_bsf':
tape-posix.c:75: error: storage size of 'mt' isn't known
tape-posix.c:76: error: 'MTBSF' undeclared (first use in this function)
tape-posix.c:78: error: 'MTIOCTOP' undeclared (first use in this function)
tape-posix.c:75: warning: unused variable 'mt'
tape-posix.c: In function 'tape_fsr':
tape-posix.c:82: error: storage size of 'mt' isn't known
tape-posix.c:83: error: 'MTFSR' undeclared (first use in this function)
tape-posix.c:85: error: 'MTIOCTOP' undeclared (first use in this function)
tape-posix.c:82: warning: unused variable 'mt'
tape-posix.c: In function 'tape_bsr':
tape-posix.c:89: error: storage size of 'mt' isn't known
tape-posix.c:90: error: 'MTBSR' undeclared (first use in this function)
tape-posix.c:92: error: 'MTIOCTOP' undeclared (first use in this function)
tape-posix.c:89: warning: unused variable 'mt'

.......................
make[3]: *** [tape-posix.lo] Error 1
make[3]: Leaving directory `/home/mysql/source/amanda-2.6.1/device-src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/home/mysql/source/amanda-2.6.1/device-src'

Franky
November 5th, 2010, 01:08 AM
We ran into the same problems compiling Amanda on AIX 5.x servers.

I have recieved the binaries from Vincent for running Amanda on our AIX-systems and it works fine (after setting some links). Thanks again Vincent!

vincent
November 5th, 2010, 02:24 AM
Hello there,

I had the same problem when compiling the server. Since we didn't need the server, I just skip it with "--without-server". I did not invest time in fixing this problem.
You should probably consider running the server part on another system (linux, solaris). Maybe that's the fastest way to get your backup setup running.

Cheers,

martineau
November 5th, 2010, 03:37 AM
AIX tape device is not posix compliant.
tape-aix.c should be compiled, not tape-posix.c
Amanda doesn't detect it is an AIX system.
What's the output of: grep 'host=' config.log

You can try to copy device-src/tape-aix.c to device-src/tape-posix.c
I'm not sure it can work.

btw. aix tape support is removed in newer version.

guo
November 10th, 2010, 12:32 AM
thank everybody, i use tape_aix.c to instead of tape_posix.c, it compile to success, thanks.
when i excute command "amlabel DailySet1 DailySet1-01 slot 1", i got the following error info:
"amlabel: could not load slot 1 : Unexpected EOF",
when i excute command "amcheck -s DailySet1", i got the following error info:
"Changer problem: unexpected EOF".
please help me:mad:

guo
November 17th, 2010, 11:50 PM
when i excute command "amcheck -s DailySet1", i got the following error info:
"Changer problem: unexpected EOF".

amcheck.20101118164551.debug's content is:

1290069951.796243: amcheck: pid 385034 ruid 205 euid 205 version 2.6.1p1: start at Thu Nov 18 16:45:51 2010
1290069951.848795: amcheck: pid 385034 ruid 205 euid 205 version 2.6.1p1: rename at Thu Nov 18 16:45:51 2010
1290069951.852404: amcheck-server: changer: >> -info
Can't load '/opt/perl588/lib/site_perl/5.8.8/auto/Amanda/Debug/libDebug.a' for module Amanda::Debug: 0509-022 Cannot load module
/opt/perl588/lib/site_perl/5.8.8/auto/Amanda/Debug/libDebug.a.
0509-103 The module has an invalid magic number. at /opt/perl588/lib/5.8.8/aix-64all/DynaLoader.pm line 230.
at /opt/perl588/lib/site_perl/5.8.8/Amanda/Debug.pm line 11
Compilation failed in require at /opt/perl588/lib/site_perl/5.8.8/Amanda/Util.pm line 80.
BEGIN failed--compilation aborted at /opt/perl588/lib/site_perl/5.8.8/Amanda/Util.pm line 80.
Compilation failed in require at /opt/perl588/lib/site_perl/5.8.8/Amanda/Changer.pm line 28.
BEGIN failed--compilation aborted at /opt/perl588/lib/site_perl/5.8.8/Amanda/Changer.pm line 28.
Compilation failed in require at /home/mysql/forsetup/amanda-2.6.1p1/libexec/amanda/chg-glue line 39.
BEGIN failed--compilation aborted at /home/mysql/forsetup/amanda-2.6.1p1/libexec/amanda/chg-glue line 39.
1290069951.908238: amcheck-server: changer: ERROR <error> unexpected EOF
1290069951.909377: amcheck: pid 385034 finish time Thu Nov 18 16:45:51 2010