Compile error: Python 2.2.1 in Solaris 2.5.1, with GCC 2.95.3

Martin v. Loewis martin at v.loewis.de
Fri Apr 19 03:27:45 EDT 2002
Jesus Cea Avion <jcea at argo.es> writes:

> CAUTION: This patch is not intented to be included *as is* in future
> Python 2.2.2. That bugfix will be work for Python maintainers :-).
> Its only mission is to allow correct Python 2.2.1 compilation under
> my environment.

If you want your patches considered for inclusion into Python, please
post them to sf.net/projects/python.

> @@ -94,8 +94,8 @@
>  
>  # Symbols used for using shared libraries
>  SO=            @SO@
> -LDSHARED=      @LDSHARED@
> -BLDSHARED=     @BLDSHARED@
> +LDSHARED=      @LDSHARED@ 
> +BLDSHARED=     @BLDSHARED@ -Wl,--rpath -Wl,/usr/local/lib
>  DESTSHARED=    $(BINLIBDEST)/lib-dynload

That chunk is unacceptable, even if rewritten in a portable way. Why
is /usr/local/lib better than any other directory? Why not include,
say, /opt/gnome/lib, or /home/loewis/lib, by default, as well?

If you want an extra rpath, just set LD_RUN_PATH before building
Python. On our installation, we have tweaked gcc to always add
/usr/local/lib (and /usr/local/X11R6/lib) to every binary, by editing
the specs file.

> -       SunOS/5*) case $CC in
> -                 *gcc*)
> -                   if $CC -Xlinker -V 2>&1 | grep BFD >/dev/null
> -                   then
> +       SunOS/5*) 
>                         LINKFORSHARED="-Xlinker --export-dynamic"
> -                   fi;;
> -                 esac;;

You are using binutils 2.12, right? That problem has been fixed in the
Python CVS in a different way.

Regards,
Martin



More information about the Python-list mailing list