This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Python 2.3a2 Build fails on HP-UX11i
Type: Stage:
Components: Build Versions: Python 2.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: nnorwitz Nosy List: nnorwitz, rptownsend
Priority: normal Keywords:

Created on 2003-02-27 15:44 by rptownsend, last changed 2022-04-10 16:07 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
py.tar rptownsend, 2003-03-04 17:09
Messages (15)
msg14877 - (view) Author: Richard Townsend (rptownsend) Date: 2003-02-27 15:44
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
msg14878 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-28 03:45
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.
msg14879 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-02-28 17:37
Logged In: YES 
user_id=33168

This iconv_codec problem may be fixed.  Please test with
current CVS to verify.
See SF bug #690012.
msg14880 - (view) Author: Richard Townsend (rptownsend) Date: 2003-03-03 09:14
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.
msg14881 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-03 22:15
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.
msg14882 - (view) Author: Richard Townsend (rptownsend) Date: 2003-03-04 17:09
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.
msg14883 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-23 15:48
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?
msg14884 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-23 15:52
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?
msg14885 - (view) Author: Richard Townsend (rptownsend) Date: 2003-03-25 17:51
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??

msg14886 - (view) Author: Richard Townsend (rptownsend) Date: 2003-03-26 14:43
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? 

msg14887 - (view) Author: Richard Townsend (rptownsend) Date: 2003-03-26 16:26
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.

msg14888 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-03-29 21:55
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.
msg14889 - (view) Author: Richard Townsend (rptownsend) Date: 2003-03-31 07:36
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?


msg14890 - (view) Author: Neal Norwitz (nnorwitz) * (Python committer) Date: 2003-05-22 21:48
Logged In: YES 
user_id=33168

Richard, is this still a problem?  iconv has been removed. 
Should this bug be closed?
msg14891 - (view) Author: Richard Townsend (rptownsend) Date: 2003-05-24 14:25
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.
History
Date User Action Args
2022-04-10 16:07:13adminsetgithub: 38068
2003-02-27 15:44:38rptownsendcreate