[Python-Dev] Python 2.7 Won't Build

2010-09-16 Thread Tom Browder
I am trying to rebujild the 2.7 maintenance branch and get this error
on Ubuntu 10.04.1 LTS:

XXX lineno: 743, opcode: 0
Traceback (most recent call last):
 File "/usr/local/src/python-2.7-maint-svn/Lib/site.py", line 62, in 
   import os
 File "/usr/local/src/python-2.7-maint-svn/Lib/os.py", line 743, in 
   def urandom(n):
SystemError: unknown opcode

I installed it successfully once so I may be getting conflicts, but I
can't figure out why.  There were some similar bugs reported in
previous versions but I didn't see a clear solution.

I have done "make distclean" and "./configure".  I have unset my
PYTHONPATH and LD_LIBRARY_PATH, but python2.7 is my default python.

I guess my next step will be to manually remove the installed python
2.7 unless I hear some other suggestions.

And I will file a bug report soon unless that is inappropriate.

Thanks,

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-16 Thread Tom Browder
On Thu, Sep 16, 2010 at 13:48, Brett Cannon  wrote:
> Go ahead and file the bug, but chances are that some other installed
> Python is executing the code and picking up the .pyc files which have
> bytecode new to Python 2.7.

But isn't that a problem with the build system?  It seems to me it
should be using all modules from within the build, thus there should
be no such error.

Regards,

-Tom
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-16 Thread Tom Browder
On Thu, Sep 16, 2010 at 14:36, Barry Warsaw  wrote:
> On Sep 16, 2010, at 01:41 PM, Tom Browder wrote:
>
>>I am trying to rebujild the 2.7 maintenance branch and get this error
>>on Ubuntu 10.04.1 LTS:
>
> I just tried this on my vanilla 10.04.1 system.  I checked out release27-maint
> ran configure && make.  It built without problem.
>
>>XXX lineno: 743, opcode: 0
>>Traceback (most recent call last):
>> File "/usr/local/src/python-2.7-maint-svn/Lib/site.py", line 62, in
>>  import os
>> File "/usr/local/src/python-2.7-maint-svn/Lib/os.py", line 743, in
>>  def urandom(n):
>>SystemError: unknown opcode
...

> When you say "installed python 2.7" do you mean the one you installed to
> /usr/local from a from-source build, or something else (e.g. a Python 2.7
> package perhaps)?

It was the released source tarball for 2.7, and I get the same error
when I try it from that directory.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-16 Thread Tom Browder
I'm attempting to file a bug but keep getting:

An error has occurred

A problem was encountered processing your request. The tracker
maintainers have been notified of the problem.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-16 Thread Tom Browder
USAOn Thu, Sep 16, 2010 at 16:36, Victor Stinner
 wrote:
> Le jeudi 16 septembre 2010 23:10:22, Tom Browder a écrit :
>> I'm attempting to file a bug but keep getting:
>
> File another bug about this bug!

I did, and eventually discovered the problem: I tried to "nosy" Barry
as requested by adding his e-mail address, but that causes an error in
the tracker.  After I finally figured that out, I successfully entered
the original bug (and reported it on the "tracker bug").

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-20 Thread Tom Browder
Continuing on with investigating Python 2.7 build problems, one
problem I just discovered is a different installation on one 64-bit
system (Debian Lenny) versus another (Ubuntu 10.04.1 LTS).

I used gcc-4.5.1 on both systems, with no *PY* environment variables set.

On Debian I got two directories:

  /usr/local/lib64/python2.7
  /usr/local/lib/python2.7

and only the first had the "config" subdirectory.

On Ubuntu I got only

  /usr/local/lib/python2.7

I see that the configure file has some architecture choices
(--with-universal-archs=ARCH) but no explanation about the
consequences.

Can anyone explain the two different "default" installations I got?

It seems to me I should force the Ubuntu-style installation by  the
"--with-universal-archs=64-bit" configure option, and I will try that
on Debian while I await expert help.

Thanks.

-Tom
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-20 Thread Tom Browder
On Mon, Sep 20, 2010 at 10:12, Ronald Oussoren  wrote:
>
>
> On 20 Sep, 2010,at 04:31 PM, Tom Browder  wrote:
>
> Continuing on with investigating Python 2.7 build problems, one
> problem I just discovered is a different installation on one 64-bit
> system (Debian Lenny) versus another (Ubuntu 10.04.1 LTS).
>
> I used gcc-4.5.1 on both systems, with no *PY* environment variables set.
>
> On Debian I got two directories:
>
> /usr/local/lib64/python2.7
> /usr/local/lib/python2.7
>
> and only the first had the "config" subdirectory.
>
> On Ubuntu I got only
>
> /usr/local/lib/python2.7

Okay, that leads to an install problem with bazaar on the Debian beast:

Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site.py", line 549, in 
main()
  File "/usr/local/lib/python2.7/site.py", line 531, in main
known_paths = addusersitepackages(known_paths)
  File "/usr/local/lib/python2.7/site.py", line 264, in addusersitepackages
user_site = getusersitepackages()
  File "/usr/local/lib/python2.7/site.py", line 239, in getusersitepackages
user_base = getuserbase() # this will also set USER_BASE
  File "/usr/local/lib/python2.7/site.py", line 229, in getuserbase
USER_BASE = get_config_var('userbase')
  File "/usr/local/lib/python2.7/sysconfig.py", line 518, in get_config_var
return get_config_vars().get(name)
  File "/usr/local/lib/python2.7/sysconfig.py", line 421, in get_config_vars
_init_posix(_CONFIG_VARS)
  File "/usr/local/lib/python2.7/sysconfig.py", line 275, in _init_posix
raise IOError(msg)
IOError: invalid Python installation: unable to open
/usr/local/lib/python2.7/config/Makefile (No such file or directory)

I tried setting PYTHONHOME to various things but none worked.  The
problem is that the config directory is under /usr/local/lib64 and
none of the documents I have found describes how to handle that
situation.  All the environment variables seem to be for libraries,
modules, and executables, and there is no reference to any lib64.

The pkg-config program looks as if it could be used by such packages
as bazaar but it doesn't look like it's one of the usual installation
tricks.

I'll go to the bazaar mailing list while awaiting an answer here.

Thanks,

-Tom
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-20 Thread Tom Browder
On Mon, Sep 20, 2010 at 13:05, Terry Reedy  wrote:
> On 9/20/2010 10:31 AM, Tom Browder wrote:
> ...
>>
>> I see that the configure file has some architecture choices
>> (--with-universal-archs=ARCH) but no explanation about the
>> consequences.
>>
>> Can anyone explain the two different "default" installations I got?
>
> At the moment, this appears to be question about "how do I use (build) a
> current release" rather than a bug report or "how do we develop (improve)
> future releases" question. As such, it seems a bit more appropriate for
> python-list. In any case, there are expert gcc/unix builders and users there
> who might be able to answer your question.

Thanks, I'll do that--docs are pretty sketchy about building from source.

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-20 Thread Tom Browder
On Mon, Sep 20, 2010 at 13:05, Terry Reedy  wrote:
> On 9/20/2010 10:31 AM, Tom Browder wrote:
> ...
>>
>> I see that the configure file has some architecture choices
>> (--with-universal-archs=ARCH) but no explanation about the
>> consequences.
>>
>> Can anyone explain the two different "default" installations I got?
>
> At the moment, this appears to be question about "how do I use (build) a
> current release" rather than a bug report or "how do we develop (improve)
> future releases" question. As such, it seems a bit more appropriate for
> python-list. In any case, there are expert gcc/unix builders and users there
> who might be able to answer your question.

The more I look into it, though, it seems to be a legitimate developer
question.  The python installation scripts know how to install on a
mixed 32/64 bit system but missed fixing it to look like a more
universal system (if that's the proper word) for programs wanting to
read its installation configuration.

Respectfully,

-Tom
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Python 2.7 Won't Build

2010-09-20 Thread Tom Browder
On Mon, Sep 20, 2010 at 14:28, Antoine Pitrou  wrote:
> On Mon, 20 Sep 2010 09:31:45 -0500
> Tom Browder  wrote:
>>
>> Can anyone explain the two different "default" installations I got?
>>
>> It seems to me I should force the Ubuntu-style installation by  the
>> "--with-universal-archs=64-bit" configure option, and I will try that
>> on Debian while I await expert help.
>
> I think "universal arch" builds only apply under OS X where they
> produce fat binaries.
>
> Under 64-bit Linux, you can compile either a 64-bit executable (the
> default) or a 32-bit executable (by specifying e.g. CC="gcc -m32" to
> the configure script).
>
>
> However, the /usr/local/lib{,64}/python2.7 issue is a bit different,
> since those directories can host architecture independent files
> (such as .py and .pyc files). For example, on my Mandriva
> install, the 64-bit Python executable can import packages from
> both /usr/lib/python2.6/site-packages/
> and /usr/lib64/python2.6/site-packages/.

Thanks, Antoine.

And I think I just found the problem with the installation (it may be
worth a note):  I had  a special configuration file
(/usr/local/share/config.site) for autoconf to force the primary local
libraries to be installed in /usr/local/lib64 (left over from early
64-bit days of this old system).  Removing that file, removing the
/usr/local/lib64/python2.7 directory, and rebuilding and reinstalling
seems to have solved the immediate problem.

Moral of the story: watch out for old cruft in /usr/local when
installing a new distribution.

I apologize for the noise.

However, I'm still investigating the original build problem (gcc trunk
and corrupted byte compile), but it may be related--I'll see.

Regards,

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com