473,695 Members | 2,510 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Python2.4: building '_socket' extension fails with `INET_ADDRSTRLE N'undeclared

HI!

I'm trying to build Python2.4 on a rather old Debian machine. I only
have a shell account there. That's why I'm very limited in my actions.

Building _socket fails (see below) although I tried to use

configure --disable-ipv6

Any clue?

Ciao, Michael.

------------------------------ snip ------------------------------
building '_socket' extension
gcc -pthread -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I.
-I/tmp/Python-2.4/./Include -I/user/W3311/local/include
-I/usr/local/include -I/tmp/Python-2.4/Include -I/tmp/Python-2.4 -c
/tmp/Python-2.4/Modules/socketmodule.c -o build/t
emp.linux-i686-2.4/socketmodule.o
/tmp/Python-2.4/Modules/socketmodule.c: In function `socket_inet_nt op':
/tmp/Python-2.4/Modules/socketmodule.c: 3350: `INET_ADDRSTRLE N'
undeclared (first use this function)
/tmp/Python-2.4/Modules/socketmodule.c: 3350: (Each undeclared identifier
is reported only once
/tmp/Python-2.4/Modules/socketmodule.c: 3350: for each function it
appears in.)
/tmp/Python-2.4/Modules/socketmodule.c: 3350: size of array `ip' has
non-integer type
Jul 18 '05 #1
3 3046
Michael Ströder wrote:
I'm trying to build Python2.4 on a rather old Debian machine. I only
have a shell account there. That's why I'm very limited in my actions.

Building _socket fails (see below) although I tried to use

configure --disable-ipv6

Any clue?


Hard to say, since you don't indicate what clues you are lacking.

In general, when the C compiler gives an error message, it is best
to try to understand the error message. The message reads

socketmodule.c: 3350: `INET_ADDRSTRLE N' undeclared (first use this function)

This apparently refers to the line

char ip[INET_ADDRSTRLEN + 1];

which is part of the block

#ifdef ENABLE_IPV6
char ip[MAX(INET_ADDRST RLEN, INET6_ADDRSTRLE N) + 1];
#else
char ip[INET_ADDRSTRLEN + 1];
#endif

So it appears that on your system, INET_ADDRSTRLEN is not defined,
even if it is supposed to be defined on all systems, regardless
of whether they support IPv6.

Looking at a more recent system in /usr/include, I get

/usr/include$ grep -r ADDRSTRLEN .
../netinet/in.h:#define INET_ADDRSTRLEN 16

This is a clue, I think.

Regards,
Martin
Jul 18 '05 #2
Martin v. Löwis wrote:
Michael Ströder wrote:
I'm trying to build Python2.4 on a rather old Debian machine. I only
have a shell account there. That's why I'm very limited in my actions.

Building _socket fails (see below) although I tried to use

configure --disable-ipv6

Any clue?
Hard to say, since you don't indicate what clues you are lacking.


My wanted clue: How to build it without modifying the Python 2.4 sources?
In general, when the C compiler gives an error message, it is best
to try to understand the error message. The message reads

socketmodule.c: 3350: `INET_ADDRSTRLE N' undeclared (first use this function)
Thanks for your answer. I do understand the message. I searched some
archives and found similar bug reports in the SF issue tracker which
were for Python 2.3 on Irix and seemed to be fixed.
Looking at a more recent system in /usr/include, I get

/usr/include$ grep -r ADDRSTRLEN .
./netinet/in.h:#define INET_ADDRSTRLEN 16


Note that building Python2.2 worked on the very same machine. I've added

#define INET_ADDRSTRLEN 16

to socketmodule.h and it worked. But I think there might be something
wrong with the autoconf stuff.

I filed bug [ 1078245 ]:
http://sourceforge.net/tracker/index...70&atid=105470

Ciao, Michael.
Jul 18 '05 #3
"Martin v. Löwis" <ma****@v.loewi s.de> writes on Sat, 04 Dec 2004 00:37:43 +0100:
...
So it appears that on your system, INET_ADDRSTRLEN is not defined,
even if it is supposed to be defined on all systems, regardless
of whether they support IPv6.


I have met this problem in older Solaris versions: the Solaris
headers did not define the macro.

I fixed my problem by providing the lacking definition
in the relevant Python header file.
Jul 18 '05 #4

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

Similar topics

0
2749
by: Slavik | last post by:
All libraries were installed (precompiled) This is FreeBSD 5.1 installed zlib, installed jpeg and png libraries (in default directories) GD 2.0.11 source is in /usr/gd-2.0.11 (compiled and installed flawlesly) I configured PHP with the following: ../configure --with-gd=/usr/gd-2.0.11 --with-freetype-dir=/usr --enable-g d-native-ttf --enable-gd-imgstrttf --with-jpeg-dir=/usr --enable-png-
0
577
by: Michael Ströder | last post by:
HI! I'm trying to build Python2.4 on a rather old Debian machine. I only have a shell account there. That's why I'm very limited in my actions. Building _socket fails (see below) although I tried to use configure --disable-ipv6 Any clue?
0
1916
by: Randell D. | last post by:
Folks, I have a number of years with HP Unix and Linux but I've never dipped my toes in to Perl - I currently have SuSE 8.1 at home and am using webmin (www.webmin.com) to update Perl 5.8.0-45 (I've got the version number from rpm --query). I want to apply the ImageMagick module so I can make better use of MoveableType.org's blogger tool. I've cut/pasted the output from the update - I can see the errors but don't know how to resolve...
1
5614
by: Scott Chang | last post by:
Hi All I tried to use the attached OpenGL code to draw a Star-shaped figure on my Microsoft Visual C++ .NET 2002-Windows XP Pro PC. When I did 'Build' in Debug Mode, I got an error C2065: 'RenderScence': undeclared identifier. Please help and tell me (1) what it is wrong with my coding in this program and how to correct the problem, and (2) whether the functions/commands of the OpenGL v1.1 (existing in Microsoft Visual C++ .NET 2002) and GLUT...
0
1845
by: Vidyasagara Guntaka | last post by:
Hi, I recently downloaded source code for 8.0.0 beta1. When I tried building the libpq for windows, I got some compilation errors. Following the compilation output: C:\temp\postgresql-8.0.0beta1\src>nmake /f win32.mak Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cd include if not exist pg_config.h copy pg_config.h.win32 pg_config.h
7
32363
by: michigaki | last post by:
hello, we are having problems in compiling a 'slightly' altered x264. We are always receiving a 'helloWorld' undeclared (first use this function) error. We may be commiting a very simple error but we just have to ask after looking through possible solutions that have not worked. So far, we are able to successfully compile the x263 source (an unaltered one from the VideoLAN downloads section) using the instructions found at...
13
3109
by: treble54 | last post by:
I need to build PHP from source with the pdo_ibm extension and I am having an issue with it. Firstly, I am using Visual Studio .NET 2003 and I am building PHP from source through the Visual Studio Command Prompt. When I get to the nmake step, it gets through everything until it hits the zend_language_scanner.l file. Then I get these errors: zend_language_scanner.l(24) : warning C4005: 'yyleng' : macro redefinition...
1
1781
by: Marco A. Cruz Quevedo | last post by:
Hi everybody, I am building php-5.2.6 with the following options: .. . . . . . . . . . . . . . . . . . . . --prefix=/usr --with-mysql=shared,/usr --with-zlib=/usr --with-apxs2 -- with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d -- with-bz2 --with-db4=/usr --with-layout=GNU .. . . . . . . . . . . . . . . . . . . . but when I make install, the /etc/php.d directory is not created and
0
1521
by: M.-A. Lemburg | last post by:
On 2008-10-25 08:39, Akira Kitada wrote: Please post a bug report on python.org about these failures. The multiprocessing module is still fairly new and obviously needs more fine tuning for the large set of platforms on which Python can run. However, please also note that FreeBSD4 is a rather old version of that OS. FWIW: Python 2.6 compiles just fine on FreeBSD6. Thanks.
0
8642
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9126
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
9002
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
8833
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
7673
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
4588
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3021
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
2283
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1984
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.