[Python-bugs-list] [ python-Bugs-416181 ] 2.1c1 builds strangely on Solaris

noreply@sourceforge.net noreply@sourceforge.net
Sat, 28 Jul 2001 10:47:40 -0700


Bugs item #416181, was opened at 2001-04-14 13:18
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416181&group_id=5470

Category: Build
Group: Platform-specific
>Status: Closed
>Resolution: Works For Me
Priority: 2
Submitted By: David M. Beazley (beazley)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.1c1 builds strangely on Solaris

Initial Comment:
Python 2.1c1 has problems with its build process on the
following
configuration:

     - Solaris 2.8 SPARC
     - gcc-2.95-2 compilers *AND* Sun Workshop 5.0
compilers
        installed.

Although the interpreter builds without problems, the
process of building various extension modules fails
under gcc, but works under the Sun compilers.  (for
example, I get tons of unresolved symbols in curses,
ncurses, etc. with gcc).

This appears to be a problem related to linker/compiler
options with gcc, but I don't see anything obvious
offhand.   I will post a followup if I am able to make
a fix.








----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2001-07-28 10:47

Message:
Logged In: YES 
user_id=21627

Since there was no further feedback, I close this as 
"works for me".


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2001-04-24 10:49

Message:
Logged In: YES 
user_id=21627

I also have both gcc and the workshop installed, and it
works fine for me. Can you report one of the gcc invocation
lines to build a dynamically-loaded module? Also, can you
try invoking this gcc command manually, passing the -v
option?

ld does not need to support -shared, since gcc *should*
translate that option into -G when invoking the linker.
It would be also interesting to know what errors exactly you
get, since, when building a shared library, you should not
get reports of missing symbols - only when you try to open
the shared library.


----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-04-15 13:50

Message:
Logged In: YES 
user_id=6380

Jeremy, if Eric fixed this, can you close it?  He doesn't 
appear to know how to use SF.  (Funny, for a VA Linux board 
member. :-)

----------------------------------------------------------------------

Comment By: David M. Beazley (beazley)
Date: 2001-04-15 11:24

Message:
Logged In: YES 
user_id=7557

Making the _XOPEN_SOURCE_EXTENDED change did not seem to fix
the problem.   I am primarily getting linker errors
(compilation is fine) for Python modules that involves
libraries like ncurses, readline, zlib, etc...
This almost certainly looks like some conflict between
static and shared linking to me.  In fact, I'm fairly
convinced that doing

     gcc -shared  $(OBJS) ...

is completely broken on my machine.  If I change the
Makefile to this, everything suddenly works:

LDSHARED = $(CC) -Xlinker -G
BLDSHARED = $(CC) -Xlinker -G

Caveats:

I'm not sure if there is a general fix to this problem. 
Since I have the Sun Workshop compilers installed, I also
have the Sun linker installed.  I know that this linker does
not recognize the -shared option so this is almost certainly
why gcc -shared doesn't work.  On the other hand, if I only
had the GNU tools installed, I suspect that the GNU linker
would probably work with gcc -shared.   The -Xlinker option
hack above would also fail with the Sun cc compiler (so this
isn't a general solution).

Is anyone else reporting problems with Solaris?  If not, I'd
say don't worry about my peculiar circumstances (maybe I
have a hosed installation of gcc).   

-- Dave



----------------------------------------------------------------------

Comment By: Guido van Rossum (gvanrossum)
Date: 2001-04-14 20:07

Message:
Logged In: YES 
user_id=6380

David, can you try adding #define _XOPEN_SOURCE_EXTENDED to
the _cursesmodule.c source file?

That worked for the same system on Compaq Tru64.

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416181&group_id=5470