473,320 Members | 1,832 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,320 software developers and data experts.

Build errors for Objects/complexobject.c

Hi all,

I'm attempting to build Python 2.4.1 on Solaris 10 using gcc 3.4.3. I
get the following build error:

<snip>

gcc -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes
-I. -I./Include -DPy_BUILD_CORE -o Objects/complexobject.o
Objects/complexobject.c
Objects/complexobject.c: In function `complex_pow':
Objects/complexobject.c:479: error: invalid operands to binary ==
Objects/complexobject.c:479: error: wrong type argument to unary minus
Objects/complexobject.c:479: error: invalid operands to binary ==
Objects/complexobject.c:479: error: wrong type argument to unary minus
make: *** [Objects/complexobject.o] Error 1

</snip>

I've poked around a bit, and it looks like there is a macro called
Py_ADJUST_ERANGE2 which is being called at that point in the code. It
uses a defined value for Py_HUGE_VAL. I'm guessing that the definition
of Py_HUGE_VAL is the problem. The comments above the define for
Py_HUGE_VAL, and the notes in the Misc/NEWS file lead me to believe
that I need to correct the defined value of Py_HUGE_VAL (which is set
to HUGE_VAL now, and I'm assuming that comes from a C standard).
However, I'm not sure what to set that value to.

I found two files in Solaris that seem to define HUGE_VAL in some way.

/usr/include/iso/math_c99.h
/usr/include/iso/math_iso.h

....and math_iso.h looks like the best choice. Here is the relevant
sections of the header:

<snip>

#if !defined(_STDC_C99) && _XOPEN_SOURCE - 0 < 600 &&
!defined(__C99FEATURES__)
typedef union _h_val {
unsigned long _i[sizeof (double) / sizeof (unsigned long)];
double _d;
} _h_val;

#ifdef __STDC__
extern const _h_val __huge_val;
#else
extern _h_val __huge_val;
#endif
#undef HUGE_VAL
#define HUGE_VAL __huge_val._d
#endif /* !defined(_STDC_C99) && _XOPEN_SOURCE - 0 < 600 && ... */

</snip>

....my C isn't very strong, so that doesn't make sense to me -- is
HUGE_VAL set to a type rather than a value? Anyway, I set Py_HUGE_VAL
to LONG_MAX. It compiled and 'make test' seems to work out. Will this
cause problems? Should I report this as a Python bug?

Thanks,
Pete

Aug 9 '05 #1
2 1719
Okay, after further review, I realized that 'make test' wasn't
completely successful. The test 'test_complex' passed, but 'test_long'
failed:

<snip>
test_long
test test_long crashed -- exceptions.OverflowError: long int too large
to convert to float
</snip>

....do you think my changes caused this failure?

Pete

Aug 9 '05 #2
pe**********@gmail.com wrote:
I'm attempting to build Python 2.4.1 on Solaris 10 using gcc 3.4.3. I
get the following build error:


This is a GCC bug, which I think got fixed in gcc 4.0.1. You can work
around it by removing the definition of _XOPEN_SOURCE, POSIX_SOURCE,
XOPEN_SOURCE_EXTENDED from pyconfig.h.

Regards,
Martin
Aug 9 '05 #3

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

Similar topics

1
by: Holden Caulfield | last post by:
Hi, I am trying to build Python 2.3 RC1 (2.3c1) on Cray SV1 running UNICOS 10.0. And I am difficulty building it on this architecture. Background -------------- .. Python 2.2.3 builds...
15
by: cody | last post by:
We have a huge project, the solutuion spans 50 projects growing. Everytime I want to start the project I have to wait nearly over 1 minute for the compiler to complete building. This is...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
0
by: Igor | last post by:
Hi all! As many of you, I have a big VB.NET solution and quite often get bogus build errors out of the blue. This isn't declared, that is not a property of some shit and so on... It's very...
0
by: pcgxk | last post by:
Due to some bugs in .NET SP1 which we are currently review with MS under separate cover, I am having to regress the patching levels of several of my desktops to rebuild and retest several versions...
5
by: Jon | last post by:
I am constantly getting reports in my task list like these: * 'someObjectName" is not a member of 'someOtherObjectName' * Handles clause requires a WithEvents variable. * Name 'someName' is not...
9
by: guy | last post by:
VB2005 ASP.NET the application i have been working on for some time has just started to give me a 'Build failed' but it does not display the errors window. if i display the errors window manually...
3
by: mnjkahn via AccessMonster.com | last post by:
I'm running Access 2003, modifying a query that has over 45 fields. When I right click on the field name in Query Design View, and then click Build, Access crashes before the Build window...
0
by: devito | last post by:
hi there, for some days i try to build the boost.python tutorial "hello world" without bjam on winxp by using mingw. so i wrote a *.bat-file like the following: // --- snip...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.