Skip to content

HP-UX local libraries not included #58773

Closed

Description

@adiroiban
mannequin
BPO 14568
Nosy @michael-o
PRs
  • bpo-14568: local libraries paths not passed to linker on HP-UX #8831
  • Files
  • hpux_local_lib.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = None
    created_at = <Date 2012-04-12.21:24:04.865>
    labels = ['extension-modules', '3.7', '3.8']
    title = 'HP-UX local libraries not included'
    updated_at = <Date 2019-04-26.09:17:15.054>
    user = 'https://bugs.python.org/adiroiban'

    bugs.python.org fields:

    activity = <Date 2019-04-26.09:17:15.054>
    actor = 'michael-o'
    assignee = 'none'
    closed = False
    closed_date = None
    closer = None
    components = ['Extension Modules']
    creation = <Date 2012-04-12.21:24:04.865>
    creator = 'adiroiban'
    dependencies = []
    files = ['25198']
    hgrepos = []
    issue_num = 14568
    keywords = ['patch']
    message_count = 4.0
    messages = ['158171', '158191', '324180', '340898']
    nosy_count = 3.0
    nosy_names = ['neologix', 'adiroiban', 'michael-o']
    pr_nums = ['8831']
    priority = 'normal'
    resolution = None
    stage = 'patch review'
    status = 'open'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue14568'
    versions = ['Python 3.6', 'Python 3.7', 'Python 3.8']

    Activity

    1. adiroiban commented on Apr 12, 2012

      adiroibanmannequin
      MannequinAuthor

      Hi,

      Sorry for bothering you.

      In my initial report, I did not added /usr/local/lib paths , since I was thinking that Python should only work with the default library location.
      Now I see that /usr/local is added just at the beginning of module building.

      The default HPUX system comes with openssl, but for example there is no zlib.

      Now, on HPUX one can use the Connect archives from http://hpux.connect.org.uk/

      They come with a nice tool for providing similar functionality like apt-get or yum.

      zlib is included in HPUX Connect archive.

      HPUX Connect packages are installed in /usr/local

      With the initial code I was able to build hashlib and other extensions using libraries from /usr/local

      To include /usr/local/lib/hpux* in the path, I also had to add them to self.compiler.library_dirs as otherwise they were not added in LD.

      I am not sure how it did work in the first place, since on HPUX openssl is in /usr/lib/hpux* and not in /usr/lib/

      Here is the code

              # HP-UX keeps files in lib/hpux folders.
              if platform == 'hp-ux11':
                  for hpux_path in [
                          '/usr/lib/hpux64', '/usr/lib/hpux32',
                          '/usr/local/lib/hpux64', '/usr/local/lib/hpux32',
                      ]:
                      lib_dirs += hpux_path
                      add_dir_to_list(self.compiler.library_dirs, hpux_path)

      With the following code I was able to also build the extensions using libraries from /usr/local on HPUX.

      I am new to python build system and I am not sure if this is the right way to do it.

      I am also new to 'hg'. I have pulled the latest changed for cpython but I can not see the previous changes in 'default' branch.

      I have attached a patch based on 76268:3df2f4a83816

      Thanks!
      Adi

    2. adiroiban commented on Apr 13, 2012

      adiroibanmannequin
      MannequinAuthor

      Hi,

      There was an error in the patch.

      Instead of

      lib_dirs += hpux_path

      it should be:

      lib_dirs += [hpux_path]

      Cheers,

    3. michael-o commented on Aug 27, 2018

      michael-omannequin
      Mannequin

      Can someone review the PR for this?

    4. michael-o commented on Apr 26, 2019

      michael-omannequin
      Mannequin

      Please close because there is actually no /usr/local on HP-UX, System V does use /opt, not /usr/local.

    5. transferred this issue fromon Apr 10, 2022
    6. picnixz commented on Jul 15, 2025

      @picnixz
      Member

      Closing as per the above comment. Also, since we now use a configure script, the latter should pick up the local libs correctly and/or the user should add it to CFLAGS/LDFLAGS.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions