Opened 14 years ago

Closed 13 years ago

#2595 closed Bugs (fixed)

vacpp on linux: library build issues

Reported by: Jay Berkenbilt <ejb@…> Owned by: Vladimir Prus
Milestone: Boost 1.38.0 Component: build
Version: Boost 1.37.0 Severity: Problem
Keywords: Cc:

Description

When building boost libraries with xlc on a PPC64 Linux platform (though building in 32-bit mode -- it's a RHEL5 system), I have two issues. (Actually, I had three, but the third one has already been reported and fixed):

  • Boost is passing -qpic, but we find that we really need -qpic=large in order to avoid problems loading
  • Shared libraries are not built with the -soname option being passed to the linker, which causes several problems, though I believe these are all well understood.

I suspect the vacpp configuration has been tested most thoroughly on AIX, which is the reason for these omissions.

I have attached a patch that addresses both issues. The patch applies cleanly to 1.37.

NOTE This patch is Linux-specific. It would be easy to make these properly conditional on Linux so they don't get applied on non-Linux platforms, but since I have only linux to test with and am not that familiar with bjam, if I were to attempt this, it would just be a guess anyway. I'm sure someone who is familiar with bjam can very easily apply this fix correctly rather than just accepting my incomplete patch as is.

All the patch does is replace -qpic with -qpic=large wherever -qpic is passed to xlc, and add -Wl,-soname -Wl,<libname-without-dir> to vacpp.link.dll.

Attachments (1)

vacpp-linux.patch (1.3 KB ) - added by Jay Berkenbilt <ejb@…> 14 years ago.
Linux-specific patch -- needs to be applied manually with conditionals to not break non-Linux

Download all attachments as: .zip

Change History (7)

by Jay Berkenbilt <ejb@…>, 14 years ago

Attachment: vacpp-linux.patch added

Linux-specific patch -- needs to be applied manually with conditionals to not break non-Linux

comment:1 by Steven Watanabe, 14 years ago

Component: Nonebuild
Owner: set to Vladimir Prus

comment:2 by Vladimir Prus, 14 years ago

Can you clarify which of those changes are known not to work on Linux, or it is unknown? I need to decide which of them to conditionalize.

comment:3 by anonymous, 14 years ago

Unfortunately, I don't have access to vacpp on anything except Linux ppc64. I had decided not to make the patch Linux-specific to isolate the actual changes needed for Linux rather than to guess the behavior of vacpp on AIX or other systems that it might be available for and that I can't test. It might be sufficient just to make those changes conditional upon Linux and not take any chances. I don't know enough bjam to do it off the top of my head, but I'm sure I could figure it out if it would help. I wouldn't be able to test it on a real platform, but I could figure out some other way of faking it out for testing purposes.

comment:4 by ejb@…, 14 years ago

sorry...posted anonymously by mistake... the last comment was mine.

comment:5 by Vladimir Prus, 13 years ago

Status: newassigned

I have asked vacpp/AIX experts about this patch.

comment:6 by Vladimir Prus, 13 years ago

Resolution: fixed
Status: assignedclosed

(In [57756]) Use qpic=large. On Linux, set soname.

Fixes #2595.

Note: See TracTickets for help on using tickets.