473,804 Members | 2,201 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_w ith_leading_zer oes
self.assertEqua l(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 1514
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_w ith_leading_zer oes
self.assertEqua l(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
3462
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. I'm wondering if something of such had been attempted in python, as in compiling X language into .pyc. I do not understand the schematics of .pyc files but I assume that they are the so called python bytecode files. Or is there any...
6
6180
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 itself. Everything you need is available at no costs (except download hassle and installation time). Once your system is set up properly its just a matter of running 'python setup.py build'. No longer waiting for someone else to build binaries and a...
1
1790
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 \ --exec-prefix=/usr/local/gltools/python/Python-2.2.1/$GL_ARCH \ --with-cxx=pgCC but make fails with: pgCC -Xlinker -export-dynamic -o python \
0
2000
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. Information: Architecture: PowerPc on AIX version 5 Compiler:
1
1739
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 interest in forming one. I am primarily interested in UDB for Unix and Windoze, but a more general group that included all DB2 versions would also be of interest. Joseph
0
9750
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. I need it to be compiled with threads. Anyone have any wisdom on how best to do this? Here's a transcript of my latest attempt. It's long; you might want to skip to the bottom, where I try "make" and the fatal errors start happening.
0
2281
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 say this will work for anyone else, but it worked for me... Using: http://ftp.mozilla.org/pub/mozilla.org/js/js-1.5.tar.gz First up:
4
1448
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 more weeks, and the client is getting nervous about whether there are any Python/Zope programmers in the local area, because they are thinking seriously of hiring internal staff to manage their app. They have a fairly large web app that uses Zope...
13
3820
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 they couldn't have just left it as <conio.h>?): #include <tcconio.h> // code
0
9595
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10600
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10352
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10097
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9175
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7642
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
4313
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3835
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3002
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.