473,804 Members | 3,373 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_ERANG E2 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(__C99F EATURES__)
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 1740
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.Over flowError: long int too large
to convert to float
</snip>

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

Pete

Aug 9 '05 #2
pe**********@gm ail.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_EX TENDED 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
1679
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 withs no problem. (without any changes).
15
2362
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 unaccaptable. I thought about loading only the project I need into visual studio and not the whole solution. The problem is that the compiler tells me it cannot find the referenced dlls (project references) although they are all lying in their bin and obj...
10
2355
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 similar name to the table. Rather than making a long Select Case that could become obsolete if lookup tables are added and the source table of the ListBox is edited I came up with this code.) This code works but of course it gives me build...
0
1377
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 frustrating and the only solution for me was to reload a solution which takes time... I've browsed through usenet to find some solution, but nothing... One of the posts gave me an idea, so I've put together a macro that fixes the problem for me....
0
2641
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 of our code. To do this I had been previously advised to ensure that both versions of the Framework (the software supports both 1.0 and 1.1) were completely removed from the PC before starting the installs again from scratch. i.e. to do this as...
5
1566
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 declared These errors are totally erroneous. If I go into the class and cut the offending code and repaste it in the same spot the errors temporarily go away. Also, more effective is to delete the files in project/bin and rebuild. Both fixes...
9
5999
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 it shows 0 errors, 0 warnings. I would definitely expect warnings as option strict is off (I am not allowed to turn it on grrrrrr:-( but that is another story) i have restarted the pc, no effect any ideas?
3
7775
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 appears. It doesn't happen every time, and using the Zoom window works fine. It appears that it only happens when I want to modify an existing expression. This continues to happen even after the database is repaired and reopened. Anyone have any...
0
4613
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 -------------------------------------------------------------------------------------- @echo off SETLOCAL
0
9576
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
10567
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
10323
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...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
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
9138
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...
0
5515
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2983
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.