views:

785

answers:

1

I've been reading and researching this for a couple of days now, and decided I need some outside assistance!

(and this site seemed like a nice place, so I thought I'd post my question here and see how it goes)

our little company hasn't built our applications on AIX for several years, and I've been assigned this task (good thing I like a challenge).

the problem I'm having is easy to describe, and I can see other folks are experiencing it also, although I can't seem to find an answer.

if I link the app "non static", meaning I don't use "-static" in the build commands, the app runs fine on the development machine, but not on our other AIX machine that we use for testing.

[quick notes on the two machines;

dev:

~$ uname -a
AIX aix3 2 5 000BA50D4C00

test:

~$ uname -a
AIX aix4 1 5 002459A64C00

]

if I link with "-static", the app "breaks" at run-time on the development machine when an exception is thrown:

terminate called after throwing an instance of 'MyAppError'
Segmentation fault      (core dumped)

AND (as if that wasn't enough), the app still doesn't run on the test machine:

exec(): 0509-036 Cannot load program ./myapp because of the following errors:
        0509-130 Symbol resolution failed for myapp because:
        0509-136   Symbol _sigqueue (number 65) is not exported from
                   dependent module /unix.
        0509-136   Symbol ra_attachrset (number 95) is not exported from
                   dependent module /unix.
        0509-136   Symbol __rs_pickmcm (number 99) is not exported from
                   dependent module /unix.
        0509-136   Symbol _timer_create (number 122) is not exported from
                   dependent module /unix.
        0509-136   Symbol _timer_delete (number 123) is not exported from
                   dependent module /unix.
        0509-136   Symbol _timer_getoverrun (number 124) is not exported from
                   dependent module /unix.
        0509-136   Symbol _timer_gettime (number 125) is not exported from
                   dependent module /unix.
        0509-136   Symbol _timer_settime (number 126) is not exported from
                   dependent module /unix.
        0509-136   Symbol count_event_waiters (number 159) is not exported from
                   dependent module /unix.
        0509-192 Examine .loader section symbols with the
                 'dump -Tv' command.

I should note here that we're linking with "-pthead", and I've read several articles that say it isn't ok to link statically when using pthread.

my brain hurts.

I'd be very grateful for any input on this.

+1  A: 

Part of your trouble is that you are building on AIX 5.2 and trying to test on AIX 5.1 (the uname -a info shows that - thank you for including it). You can usually build on an older platform and run on a newer, but not the other way around. So, that is the start of your troubles.

Both AIX 5.1 and 5.2 are long in the tooth; you should be on at least AIX 5.3 and arguably AIX 6.x.

Jonathan Leffler