473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Compiling Python using the Portland Group compiler

I am trying to install Python 2.4.3 on an AMD Opteron system using
the Portland Group's compiler (pgcc). Using

CC="pgcc -DNCURSES_ENABLE_STDBOOL_H=0" OPT="-O0" LINKFORSHARED="-Wl,-
export-dynamic" ./configure --without-cxx

I finally managed to obtain an executable that would start and work,
but it fails a couple of test cases:

1) test_coercion reports wrong results for operations with complex
numbers. For example,
2**(2.+0j) yields (1+0j).

2) test_compare reports some wrong results, such as

(2+0j) != (2+0j)

However, typing

(2+0j) == (2+0j)

into the interpreter yields "True". Perhaps the bug is in the
execution of the test suite.

3) test_compile reports wrong results as well:

test test_compile failed -- Traceback (most recent call last):
File "/work/experiences/biophys/hinsen/install/Python-2.4.3/Lib/
test/test_compile.py", line 164, in test_literals_with_leading_zeroes
self.assertEqual(eval("0777j"), 777j)
AssertionError: 777j != 777j

However,
eval("0777j") == 777j
yields "True".

4) test_cpickle crashes with a segmentation fault.
Has anyone encountered such failures before? Does anyone have useful
suggestions for analyzing them?

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen ät cnrs-orleans.fr
---------------------------------------------------------------------
Jul 12 '06 #1
3 1492
Konrad,
I would try to find out if pgcc has any compatibility switches. I saw
you turned optimization "off" but sometimes there is more you can do
disable some of the advanced behind the scenes magic. So apply all
those switches, run the tests and then try them one by one to find out
how many you can enable before test fail again. If you compiled it as
64bit application, try to compile as a regular 32bit and see what
happens.
Nick V.
Konrad Hinsen wrote:
I am trying to install Python 2.4.3 on an AMD Opteron system using
the Portland Group's compiler (pgcc). Using

CC="pgcc -DNCURSES_ENABLE_STDBOOL_H=0" OPT="-O0" LINKFORSHARED="-Wl,-
export-dynamic" ./configure --without-cxx

I finally managed to obtain an executable that would start and work,
but it fails a couple of test cases:

1) test_coercion reports wrong results for operations with complex
numbers. For example,
2**(2.+0j) yields (1+0j).

2) test_compare reports some wrong results, such as

(2+0j) != (2+0j)

However, typing

(2+0j) == (2+0j)

into the interpreter yields "True". Perhaps the bug is in the
execution of the test suite.

3) test_compile reports wrong results as well:

test test_compile failed -- Traceback (most recent call last):
File "/work/experiences/biophys/hinsen/install/Python-2.4.3/Lib/
test/test_compile.py", line 164, in test_literals_with_leading_zeroes
self.assertEqual(eval("0777j"), 777j)
AssertionError: 777j != 777j

However,
eval("0777j") == 777j
yields "True".

4) test_cpickle crashes with a segmentation fault.
Has anyone encountered such failures before? Does anyone have useful
suggestions for analyzing them?

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen ät cnrs-orleans.fr
---------------------------------------------------------------------
Jul 12 '06 #2
Nick,
I would try to find out if pgcc has any compatibility switches. I saw
you turned optimization "off" but sometimes there is more you can do
disable some of the advanced behind the scenes magic. So apply all
those switches, run the tests and then try them one by one to find out
how many you can enable before test fail again. If you compiled it as
64bit application, try to compile as a regular 32bit and see what
happens.
Thanks for your suggestions. I already looked for switches that could
possibly change the interpretation of the C code, but I found nothing
other than the usual ANSI and C9x compatibility switches, which only
change the amount of warnings.

However, I will take up your suggestion and see if I can compile a 32-
bit executable.

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen ät cnrs-orleans.fr
---------------------------------------------------------------------
Jul 13 '06 #3
Konrad Hinsen wrote:
I am trying to install Python 2.4.3 on an AMD Opteron system using
the Portland Group's compiler (pgcc). Using

I finally managed to obtain an executable that would start and work,
but it fails a couple of test cases:
....
Has anyone encountered such failures before? Does anyone have useful
suggestions for analyzing them?
Try adding -Kieee to the compiler options. Python's complex math
requires strict IEEE conformance.

You'll have to debug the crash further.

n

Jul 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: Maurice LING | last post by:
Hi, I remembered reading a MSc thesis about compiling Perl to Java bytecodes (as in java class files). At least, it seems that someone had compiled scheme to java class files quite successfully....
6
by: Martin Bless | last post by:
The good news: Along with Python-2.4 comes really good news to Windows users. Yes, you now CAN build extension modules yourself using the SAME C++ compiler and linker Python is built with...
1
by: Berthold Höllmann | last post by:
I am trying to compile Python on an Opteron machine using the PGI C compiler under Linux. I use: CC=pgcc ./configure --prefix=/usr/local/gltools/python/Python-2.2.1 \...
0
by: pruebauno | last post by:
Hello all, I am having issues compiling Python with large file support. I tried forcing the configure script to add it but then it bombs in the make process. Any help will be appreciated. ...
1
by: Joseph | last post by:
I recently tried to email a mail alias I found for a Portland, OR DB2 user's group, and received no response. I am wondering if there is an active group in Portland, or if not, if there is...
0
by: Kirt Loki Dankmyer | last post by:
So, I download the latest "stable" tar for perl (5.8.7) and try to compile it on the Solaris 8 (SPARC) box that I administrate. I try all sorts of different switches, but I can't get it to compile....
0
by: follower | last post by:
This post is mostly Google-bait for anyone else that might want to compile SpiderMonkey ( libjs / libjs.so / libjs.dylib ) for OS X (10.4.5 in my case) and then use it with Python's ctypes. I can't...
4
by: bradallen | last post by:
I've been visiting Portland, OR on a multi-week client project, and am wondering if there are any local Python or Zope programmers in the Portland area. I am only going to be here for a couple...
13
by: Albert | last post by:
Hi I'm using the lcc compiler for win32. I tried compiling a program but there's an error stating: "cpp: Can't open input file clrscr()" I don't get it - I've included <tcconio.h>. (strange why...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.