Skip to content

Python 2.3a2 Build fails on HP-UX11i #38068

Closed

Description

@rptownsend
BPO 694431
Files
  • py.tar
  • 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 = <Date 2003-05-24.14:25:31.000>
    created_at = <Date 2003-02-27.15:44:38.000>
    labels = ['build']
    title = 'Python 2.3a2 Build fails on HP-UX11i'
    updated_at = <Date 2003-05-24.14:25:31.000>
    user = 'https://bugs.python.org/rptownsend'

    bugs.python.org fields:

    activity = <Date 2003-05-24.14:25:31.000>
    actor = 'rptownsend'
    assignee = 'nnorwitz'
    closed = True
    closed_date = None
    closer = None
    components = ['Build']
    creation = <Date 2003-02-27.15:44:38.000>
    creator = 'rptownsend'
    dependencies = []
    files = ['812']
    hgrepos = []
    issue_num = 694431
    keywords = []
    message_count = 15.0
    messages = ['14877', '14878', '14879', '14880', '14881', '14882', '14883', '14884', '14885', '14886', '14887', '14888', '14889', '14890', '14891']
    nosy_count = 2.0
    nosy_names = ['rptownsend', 'nnorwitz']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue694431'
    versions = ['Python 2.3']

    Activity

    1. rptownsend commented on Feb 27, 2003

      rptownsendmannequin
      MannequinAuthor

      While building Python 2.3a2 on HP-UX11i I got the
      following error:

      ld -b build/temp.hp-ux-B.11.11-9000/785-
      2.3/_iconv_codec.o -L/opt/python/lib -
      L/usr/local/lib -o build/lib.hp-ux-B.11.11-
      9000/785-2.3/_iconv_codec.sl
      /usr/lib/dld.sl: Unresolved symbol: libiconv_open
      (code) from build/lib.hp-ux-B.11.11-9000/785-
      2.3/_iconv_codec.sl
      sh[3]: 25624 Abort(coredump)
      *** Error exit code 134

    2. nnorwitz commented on Feb 28, 2003

      nnorwitzmannequin
      Mannequin

      Logged In: YES
      user_id=33168

      Richard, can you try the latest version from CVS. I don't
      have this problem on hp-ux-B.11.00-9000/829

      I do have a problem with readline, but I think that's
      specific to the machine I'm building on.

    3. nnorwitz commented on Feb 28, 2003

      nnorwitzmannequin
      Mannequin

      Logged In: YES
      user_id=33168

      This iconv_codec problem may be fixed. Please test with
      current CVS to verify.
      See SF bug bpo-690012.

    4. rptownsend commented on Mar 3, 2003

      rptownsendmannequin
      MannequinAuthor

      Logged In: YES
      user_id=200117

      Sorry for the delay but I had to download from CVS at
      home yesterday (Sunday 2nd) and build on HP-UX at
      work today.

      Unfortunately I'm still getting the same linker error.

    5. nnorwitz commented on Mar 3, 2003

      nnorwitzmannequin
      Mannequin

      Logged In: YES
      user_id=33168

      Richard, can you help diagnose further since I can't
      reproduce on HP-UX 11.00? My initial guess is that
      iconv_open is in a different location, therefore the linking
      is faililng. Does man iconv_open reveal what library
      iconv_open is in? To add directories, etc. to the
      build/link of iconv, you will need to edit setup.py (or test
      on the command line). Check around line 620 in setup.py.

    6. rptownsend commented on Mar 4, 2003

      rptownsendmannequin
      MannequinAuthor

      Logged In: YES
      user_id=200117

      Neal, I will try to help, but internet access is difficult at
      work so responses may not be prompt.

      I had a look at the man page but it was not clear to me
      which library contains iconv_open. I will attach text
      copy of the man page for you.

      I also include some nm output from libc.sl which refers
      to iconv_open, but I'm not sure if it means that it
      contains the code for the function.

      Let me know if I can try anything else.

    7. nnorwitz commented on Mar 23, 2003

      nnorwitzmannequin
      Mannequin

      Logged In: YES
      user_id=33168

      Richard, in the manpage it says that iconv has a dependancy
      on libdld.sl. Perhaps you need to configure python
      --with-dld. Can you try that?

    8. nnorwitz commented on Mar 23, 2003

      nnorwitzmannequin
      Mannequin

      Logged In: YES
      user_id=33168

      Looking further into the python configure, I see that the
      option is --with-dl-dld, however, this option is not
      supported. Can try to play with the build options to find
      the magic that works on your version of HPUX?

    9. rptownsend commented on Mar 25, 2003

      rptownsendmannequin
      MannequinAuthor

      Logged In: YES
      user_id=200117

      Neal,

      The original error referred to unresolved
      symbol 'libiconv_open'.

      The source module _iconv_codec.c contains calls to
      iconv_open(), not libiconv_open().

      However, if I recompile it with the -E flag there is a pre-
      processor substitution happening which is converting
      all instances of 'iconv' to 'libiconv'

      Here I grepped the pre-processor output for 'iconv'...

      extern int _libiconv_version;
      typedef void* libiconv_t ;
      extern libiconv_t  libiconv_open  (const char* tocode, 
      const char* fromcode);
      extern size_t libiconv  (libiconv_t  cd,  char* * inbuf, 
      size_t *inbytesleft, char* * outbuf, size_t *outbytesleft);
      extern int libiconv_close  (libiconv_t  cd);
      extern int libiconvctl  (libiconv_t  cd, int request, void* 
      argument);
          libiconv_t   enchdl, dechdl;
              if (libiconv (self->enchdl, (char**)&inp, &inplen, 
      &out, &outlen)
              size_t res = libiconv (self->dechdl, (char**)&inp, 
      &inplen, &out, &outlen);
          new->enchdl = new->dechdl = (libiconv_t )(-1);
          new->dechdl = libiconv_open ("ucs-2-internal" , 
      new->encoding);
          if (new->dechdl == (libiconv_t )(-1)) {
          new->enchdl = libiconv_open (new->encoding, "ucs-
      2-internal" );
          if (new->enchdl == (libiconv_t )(-1)) {
              libiconv_close (new->dechdl);
              new->dechdl = (libiconv_t )(-1);
          if (self->enchdl != (libiconv_t )-1)
              libiconv_close (self->enchdl);
          if (self->dechdl != (libiconv_t )-1)
              libiconv_close (self->dechdl);
          libiconv_t  hdl = libiconv_open ("ucs-2-
      internal" , "ISO-8859-1");
          if (hdl == (libiconv_t )-1) {
          res = libiconv (hdl, &inptr, &insize, &outptr, &outsize);
              libiconv_close (hdl);
          libiconv_close (hdl);

      Is this supposed to be happening??

      If not, what could be causing it??

    10. rptownsend commented on Mar 26, 2003

      rptownsendmannequin
      MannequinAuthor

      Logged In: YES
      user_id=200117

      Hi Neal,

      I have now discovered that there is a different version of
      iconv.h on my workstation in /usr/local/include.

      It appears to be part of the zlib package and it contains
      the pre-processor macros which are converting the
      iconv statements to libiconv.

      It is being used instead of the one in /usr/include,
      because the compile command contains
      -I/usr/local/include

      Is there any easy to prevent this path from being added
      to the compile commands?

    11. rptownsend commented on Mar 26, 2003

      rptownsendmannequin
      MannequinAuthor

      Logged In: YES
      user_id=200117

      Hi Neal,

      I edited Modules/Setup line 483 like this:

      _iconv_codec _iconv_codec.c -I/usr/include

      I can now build Python!

      However test_iconv_codecs fails:

      capulet:dist/src 
      > ./python ./Lib/test/test_iconv_codecs.py
      Traceback (most recent call last):
        File "./Lib/test/test_iconv_codecs.py", line 3, in ?
          import codecs, _iconv_codec
      RuntimeError: can't initialize the _iconv_codec module: 
      iconv_open() failed

      I tried adding '-l:libdld.sl' to line 483 (as suggested by
      the man page) but
      the test still fails.

    12. nnorwitz commented on Mar 29, 2003

      nnorwitzmannequin
      Mannequin

      Logged In: YES
      user_id=33168

      This means the iconv_open() call is failing. Unless you
      know you need this module, you probably don't. And if you
      do need this module, you probably know more than I do. :-)
      So if you are just trying to get this working, I don't think
      it's a big deal. It seems to work on some HPUX machines. I
      suspect the reason the iconv_open() is failing is because of
      a configuration on your machine. This call is for
      translating character sets.

    13. rptownsend commented on Mar 31, 2003

      rptownsendmannequin
      MannequinAuthor

      Logged In: YES
      user_id=200117

      Yes, I was just trying to get Python to compile. I'm not
      aware that we have any need for the iconv codec module.

      What is the best way to get the build process to omit it
      from the build?

    14. nnorwitz commented on May 22, 2003

      nnorwitzmannequin
      Mannequin

      Logged In: YES
      user_id=33168

      Richard, is this still a problem? iconv has been removed.
      Should this bug be closed?

    15. rptownsend commented on May 24, 2003

      rptownsendmannequin
      MannequinAuthor

      Logged In: YES
      user_id=200117

      Neal, since iconv was removed I can build Python 2.3 OK,
      therfore I'm happy for the bug report to be closed.

    16. transferred this issue fromon Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      buildThe build process and cross-build

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions