AIX 上使用 pthread 的静态链接

发布于 2024-07-10 01:56:36 字数 2163 浏览 13 评论 0原文

我已经阅读和研究了几天 现在,我决定需要一些外部帮助!

(这个网站看起来是个好地方,所以我想我会 在这里发布我的问题,看看进展如何)

我们的小公司还没有在 AIX 上构建我们的应用程序 好几年了,我被分配了这个任务(很好 我喜欢挑战的事情)。

我遇到的问题很容易描述,我可以看到 其他人也正在经历它,尽管我似乎看不到 寻找答案。

如果我链接应用程序“非静态”,这意味着我不使用“-static” 在构建命令中,应用程序在开发中运行良好 机器,但不在我们使用的其他 AIX 机器上 测试。

[关于两台机器的快速说明;

dev:

~$ uname -a
AIX aix3 2 5 000BA50D4C00

test:

~$ uname -a
AIX aix4 1 5 002459A64C00

]

如果我链接“-static”,应用程序会在运行时“中断” 在开发机器上,当抛出异常时:

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

并且(好像这还不够),应用程序仍然没有 在测试机器上运行:

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.

我应该在这里注意到我们正在与“-pthead”链接, 我读过几篇文章说这不行 使用 pthread 时静态链接。

我的脑袋疼。

如果您对此提出任何意见,我将不胜感激。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦冥 2024-07-17 01:56:36

您遇到的部分问题是您正在 AIX 5.2 上构建并尝试在 AIX 5.1 上进行测试(uname -a 信息显示了这一点 - 感谢您将其包含在内)。 您通常可以在较旧的平台上构建并在较新的平台上运行,但反之则不然。 所以,这就是你麻烦的开始。

AIX 5.1 和 5.2 都是长期存在的。 您至少应该使用 AIX 5.3,并且可以说是 AIX 6.x。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文