delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/23/19:41:15

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Subject: Python compiles OOTB, BUT...
To: cygwin AT cygwin DOT com
From: John DOT Velman AT HSC DOT com
Date: Fri, 23 Mar 2001 16:24:40 -0800
Message-ID: <OF45E79974.5AE60A43-ON88256A19.0001FA44@hughes.com>
X-MIMETrack: Serialize by Router on MTA00/HUGHES(Release 5.0.5 |September 22, 2000) at
03/23/2001 04:24:42 PM
MIME-Version: 1.0


When I try to compile Python-2.1b1 out of the box against
cygwin 1.1.8-2, gcc 2.95.2-9,  I first run configure as
suggested in Jason Tishler's message
sources.redhat.com/ml/cygwin-apps/2001-03/msg00003.html
namely:

CC='gcc -mwin32' ./configure --with-threads=no

After configureing, make marches along until it comes to

-----------------
gcc -mwin32 -g -O2 -Wall -Wstrict-prototypes -I. -I./Include -DHAVE_CONFIG_H   -c ./Modules/_sre.c -o Modules/_sre.o
if test -f buildno; then \
     expr `cat buildno` + 1 >buildno1; \
     mv -f buildno1 buildno; \
else echo 1 >buildno; fi
gcc -mwin32 -c -g -O2 -Wall -Wstrict-prototypes -I. -I./Include -DHAVE_CONFIG_H  -DBUILD=`cat buildno` -o Modules/getbuildinfo.o
./Modules/getbuildinfo.c
dlltool --export-all --output-def libpython2.1.dll.a Modules/getbuildinfo.o Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o
Parser/parser.o Parser/parsetok.o Parser/tokenizer.o Parser/bitset.o Parser/metagrammar.o Parser/myreadline.o Objects/abstract.o
Objects/bufferobject.o Objects/cellobject.o Objects/classobject.o Objects/cobject.o Objects/complexobject.o Objects/fileobject.o Objects/floatobject.o
 Objects/frameobject.o Objects/funcobject.o Objects/intobject.o Objects/listobject.o Objects/longobject.o Objects/dictobject.o Objects/methodobject.o
Objects/moduleobject.o Objects/object.o Objects/rangeobject.o Objects/sliceobject.o Objects/stringobject.o Objects/tupleobject.o Objects/typeobject.o
Objects/unicodeobject.o Objects/unicodectype.o Python/bltinmodule.o Python/exceptions.o Python/ceval.o Python/compile.o Python/codecs.o
Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o Python/getcopyright.o Python/getmtime.o
Python/getplatform.o
 Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o Python/modsupport.o Python/mystrtoul.o Python/pyfpe.o
Python/pystate.o Python/pythonrun.o Python/structmember.o Python/symtable.o Python/sysmodule.o Python/traceback.o Python/getopt.o
Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/signalmodule.o Modules/posixmodule.o
Modules/_sre.o
gcc -shared -Wl,--enable-auto-image-base -Wl,--out-implib=libpython2.1.dll.a -o libpython2.1.dll Modules/getbuildinfo.o Parser/acceler.o
Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/parsetok.o Parser/tokenizer.o Parser/bitset.o Parser/metagrammar.o
Parser/myreadline.o Objects/abstract.o Objects/bufferobject.o Objects/cellobject.o Objects/classobject.o Objects/cobject.o Objects/complexobject.o
Objects/fileobject.o Objects/floatobject.o Objects/frameobject.o Objects/funcobject.o Objects/intobject.o Objects/listobject.o Objects/longobject.o
Objects/dictobject.o Objects/methodobject.o Objects/moduleobject.o Objects/object.o Objects/rangeobject.o Objects/sliceobject.o Objects/stringobject.o
 Objects/tupleobject.o Objects/typeobject.o Objects/unicodeobject.o Objects/unicodectype.o Python/bltinmodule.o Python/exceptions.o Python/ceval.o
Python/compile.o Python/codecs.o Python/errors.o Python/frozen.o Python/frozenmain.o Python/future.o Python/getargs.o Python/getcompiler.o
Python/getcopyri
ght.o Python/getmtime.o Python/getplatform.o Python/getversion.o Python/graminit.o Python/import.o Python/importdl.o Python/marshal.o
Python/modsupport.o Python/mystrtoul.o Python/pyfpe.o Python/pystate.o Python/pythonrun.o Python/structmember.o Python/symtable.o Python/sysmodule.o
Python/traceback.o Python/getopt.o Python/dynload_shlib.o Modules/config.o Modules/getpath.o Modules/main.o Modules/gcmodule.o Modules/signalmodule.o
Modules/posixmodule.o Modules/_sre.o \
        -lm
/usr/lib/gcc-lib/i686-pc-cygwin/gcc-2.95.2-9/../../../../i686-pc-cygwin/lib/libcygwin.a(ds00022.o)(.text+0x0): multiple definition of `__infinity'
/usr/lib/gcc-lib/i686-pc-cygwin/gcc-2.95.2-9/../../../../i686-pc-cygwin/lib/libm.a(s_infconst.o)(.text+0x0): first defined here
Creating library file: libpython2.1.dll.a
collect2: ld returned 1 exit status
make: *** [libpython2.1.dll.a] Error 1
make: Target `all' not remade because of errors.

Compilation exited abnormally with code 2 at Fri Mar 23 15:43:31
------------------


Sooo.  I remembered that earlier Jason advised me (when I was
trying to compile Python 2.1ax with an earlier gcc) that libm and
libc both are ln -s to libcygwin, and that is probably the cause
of multiple declarations of __infinity.

So, I made the directory really really clean by rm -rf *, unpacked again,
and ran

CC='gcc -mwin32' ./configure --with-threads=no --with-libm=

as previously advised.



This time, it builds python.exe all right, but it fails to build
the math and cmath extensions, because it is still trying to
use both libmath and libcygwin.

It also fails to build the syslog extension because:

build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/syslogmodule.o(.text+0x22c): undefined reference to `setlogmask'
collect2: ld returned 1 exit status
WARNING: building of extension "syslog" failed: command 'gcc' failed with exit status 1


and it fails to build the pyexpat extension because of multiple
'initializer element is not a constant,' like this:

/home/newarchives/python/Python-2.1b1/Modules/pyexpat.c:1788: (near initialization for `handler_info[19].setter')
/home/newarchives/python/Python-2.1b1/Modules/pyexpat.c:1791: initializer element is not constant
/home/newarchives/python/Python-2.1b1/Modules/pyexpat.c:1791: (near initialization for `handler_info[20].setter')
WARNING: building of extension "pyexpat" failed: command 'gcc' failed with exit status 1


Any help would be appreciated.


John Velman
john DOT r DOT velman AT Boeing DOT com



--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019