Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#1228 closed Bugs (fixed)

bug in toolset gcc + HP/UX PA-RSIC

Reported by: oliver.kowalke@… Owned by: Vladimir Prus
Milestone: To Be Determined Component: build
Version: Boost 1.34.1 Severity: Showstopper
Keywords: Cc:

Description

On HP/UX PA-RSIC only aCC (HP compiler) version 3.x is available form HP. It is not able to compile to compile boost. aCC version 6.x and newer will never be ported to HP/UX PA-RISC. gcc is available for this platform - I suggest this should be the default compiler (PA-RISC not Itanium version of HP/UX). The config scripts pass wrong linker flags (which are only valid for gnu linker which is not available on the target platform). So the compilation failed.

I provide two patches with following modifiactions:

  • gcc.jam:
    • threading support (from gcc version 3.x up -> compiler version needs to be checked in the file -> not done yet)
    • enable build of shared libraries as default
    • change shared libraries extension to .sl
    • pass required '-fPIC'
    • add correct5 linker flags for HP/UX linker
  • site_config.jam
    • use HP/UX linker for gcc on HP/UX (but it needs a modification because I could not find out how to get the os version from bjam language -> os.version seams not to work)

kind regards, Oliver

Attachments (4)

gcc.jam.patch (1.8 KB ) - added by anonymous 15 years ago.
site-config.jam.patch (391 bytes ) - added by anonymous 15 years ago.
gcc.jam.2.patch (1.9 KB ) - added by oliver.kowalke@… 15 years ago.
some corrections
gcc.jam.3.patch (2.7 KB ) - added by Boris Gubenko 15 years ago.
patch for gcc.jam tested on both HP-UX/ia64 and HP-UX PA-RISC

Download all attachments as: .zip

Change History (13)

by anonymous, 15 years ago

Attachment: gcc.jam.patch added

by anonymous, 15 years ago

Attachment: site-config.jam.patch added

comment:1 by oliver.kowalke@…, 15 years ago

gcc.jam.2.patch contains another compiler option in order to compile date_time library on HPUX

by oliver.kowalke@…, 15 years ago

Attachment: gcc.jam.2.patch added

some corrections

by Boris Gubenko, 15 years ago

Attachment: gcc.jam.3.patch added

patch for gcc.jam tested on both HP-UX/ia64 and HP-UX PA-RISC

comment:2 by Boris Gubenko, 15 years ago

I've just added attachement: gcc.jam.3.patch. This patch was tested on both HP-UX/ia64 and PA-RISC with gcc 4.2.1 and 3.4.2, respectively. The results are on the web: see tables for runner_id HP-UX_ia64_gcc and HP-UX_pa_risc_gcc, respectively. Oliver did independent testing on PA-RISC with gcc 3.4.4 and confirmed that modified gcc.jam works.

Both Oliver and I agree that modified gcc.jam which adds support for HP-UX, both ia64 and PA-RISC, is ready for the prime time. Please review changes and, if they look OK, either apply the patch or let me know and I'll check gcc.jam in myself.

Thanks,

Boris

comment:3 by Vladimir Prus, 15 years ago

I have applied the gcc.jam patch, thanks. I did not apply site-config.jam patch -- first, it appears to be against already modified version -- the one in SVN has nothing but copyright, and second, the file is intentionally empty. Finally, you comment say you've changed the extension of shared lib files on HP-UX, and I don't see any such change -- did you forgot to attach something?

comment:4 by Boris Gubenko, 15 years ago

Thanks for applying the patch (and for moving flags gcc.link OPTIONS <runtime-link>static to a more logical spot).

As for the file extension, Oliver and I have discussed this issue and have agreed that this is more of a "cosmetic" one because the existing file extension: .so, common to all Unix platforms, does not prevent Linker or loader on HP-UX from linking/activating shared Boost libraries. This is why I did not do anything about file extension in the patch for gcc.jam.

If we want to change file extension for Boost shared libraries on HP-UX (and I'm not sure we do), it is more than just gcc.jam and it deserves a separate ticket, I believe.

Thanks again,

Boris

comment:5 by Vladimir Prus, 15 years ago

Resolution: fixed
Status: newclosed

Okay, I'm closing this issue. Thanks.

comment:6 by Oliver, 15 years ago

I did not apply site-config.jam patch -- first, it appears to be against already modified version -- the one in SVN has nothing but copyright, and second, the file is intentionally empty.

Isn't it required that I put 'using gcc : : : <compileflags>"-fPIC" ;' into site-config.jam or user-config.jam in order to get the possition idepended code? Oliver

comment:7 by Vladimir Prus, 15 years ago

Usually, -fPIC is needed only for shared libraries. This is handled by this code:

    flags gcc.compile OPTIONS <link>shared : -fPIC ;

is there a reason this is not sufficient on HP-UX?

comment:8 by Oliver, 15 years ago

Yes - I've checked it. The patch works. Thanks! Oliver

in reply to:  7 comment:9 by Boris Gubenko, 15 years ago

Replying to vladimir_prus:

Usually, -fPIC is needed only for shared libraries. This is handled by this code:

    flags gcc.compile OPTIONS <link>shared : -fPIC ;

is there a reason this is not sufficient on HP-UX?

Just for the record: on HP-UX/PA-RISC, -fPIC on the compile command is not sufficient. On this platform, when building shared library, -fPIC should also be explicitly specified on the link command. This is handled by:

flags $(toolset).link OPTIONS $(condition)/<link>shared : -fPIC

: unchecked ;

inside 'case hpux :'.

On HP-UX/ia64, -fPIC is not necessary, but specifying it does not do any harm.

Thanks,

Boris

Note: See TracTickets for help on using tickets.