public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* python 2.0, cygwin & readline - undefined symbols
@ 2001-02-21 17:42 David Peterson
  2001-02-21 18:53 ` Jason Tishler
  0 siblings, 1 reply; 39+ messages in thread
From: David Peterson @ 2001-02-21 17:42 UTC (permalink / raw)
  To: cygwin

Hello,

I'm trying to get python 2.0 to compile under the latest cygwin/readline
combo, but am getting unexplainable (to me at least) linker errors.

I uncommented the line in python's Modules/Setup file to add the readline
module and get the following when trying to build:

gcc   python.o \
          ../libpython2.0.a -lreadline -ltermcap
-lm  -o python.exe 
../libpython2.0.a(readline.o)(.text+0x949): undefined reference to
`rl_event_hook'


If I look at /usr/lib/libreadline.a (or /usr/lib/libreadline.dll.a) I see
the following:

[/usr/lib]$ nm libreadline.a | grep rl_event_hook
00000000 D _rl_event_hook


I tried commenting out the line in the python module that referenced
rl_event_hook, but then got a bunch of other linker errors. nm said all the
symbols were of type 'D' (in the initialized data section) when I looked at
the library.

Any idea what's up?

Python builds and runs fine without the readline module so I don't think its
anything with cygwin in general. All I did was the standard ./configure
--with-suffix=.exe; make; make install. The trouble only appeared when I
tried to turn on the readline stuff.

-dave.

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-02-21 17:42 python 2.0, cygwin & readline - undefined symbols David Peterson
@ 2001-02-21 18:53 ` Jason Tishler
  2001-03-10  5:39   ` Gerrit P. Haase
  2001-03-10  5:49   ` Gerrit P. Haase
  0 siblings, 2 replies; 39+ messages in thread
From: Jason Tishler @ 2001-02-21 18:53 UTC (permalink / raw)
  To: David Peterson; +Cc: cygwin

Dave,

On Wed, Feb 21, 2001 at 05:45:06PM -0800, David Peterson wrote:
> I'm trying to get python 2.0 to compile under the latest cygwin/readline
> combo, but am getting unexplainable (to me at least) linker errors.

My suggestion is to use 2.1a2 as it supports Cygwin *much* better than
previous versions.  See the following for details:

    http://www.cygwin.com/ml/cygwin-apps/2001-02/msg00004.html

Note that a patch has been accepted into Python CVS that solves the
problem below.  However, if you really need to use 2.0, then read on...

> I uncommented the line in python's Modules/Setup file to add the readline
> module and get the following when trying to build:
> 
> gcc   python.o \
>           ../libpython2.0.a -lreadline -ltermcap
> -lm  -o python.exe 
> ../libpython2.0.a(readline.o)(.text+0x949): undefined reference to
> `rl_event_hook'
> Any idea what's up?

The above is due to the "incorrect" declaration of rl_event_hook in
Modules/readline.c:

    extern Function *rl_event_hook;

I used quotes above, because the declaration is fine if you use a
static version of the readline library.  The readline provided with
Cygwin defaults to using the DLL version unless you supply a special
"-D" option during your build.

You can solve your problem with the following change:

    extern DL_IMPORT(Function) *rl_event_hook;

Although, the better way to fix this and the way that it is in the current
Python CVS, is to use include readline/history.h as in the following:

#ifdef __CYGWIN__
#include <readline/history.h>
#else /* !__CYGWIN__ */
extern int rl_parse_and_bind(char *);
extern int rl_read_init_file(char *);
extern int rl_insert_text(char *);
extern int rl_bind_key(int, Function *);
extern int rl_bind_key_in_map(int, Function *, Keymap);
extern int rl_initialize(void);
extern int add_history(char *);
extern int read_history(char *);
extern int write_history(char *);
extern int history_truncate_file(char *, int);
extern Function *rl_event_hook;
#endif /* !__CYGWIN__ */
#endif

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-02-21 18:53 ` Jason Tishler
@ 2001-03-10  5:39   ` Gerrit P. Haase
  2001-03-10  5:49   ` Gerrit P. Haase
  1 sibling, 0 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-10  5:39 UTC (permalink / raw)
  To: cygwin

<Am 2001-02-21 21:58 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

Hi Jason,

> My suggestion is to use 2.1a2 as it supports Cygwin *much* better than
> previous versions.  See the following for details:
> 
>     http://www.cygwin.com/ml/cygwin-apps/2001-02/msg00004.html
> 
> Note that a patch has been accepted into Python CVS that solves the
> problem below.  However, if you really need to use 2.0, then read on...

I got a lot of errors compiling Python2.1b1 with libreadline.
I think that it is not fixed...
 
Ciao,

Gerrit
-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-02-21 18:53 ` Jason Tishler
  2001-03-10  5:39   ` Gerrit P. Haase
@ 2001-03-10  5:49   ` Gerrit P. Haase
  2001-03-10  8:20     ` Charles S. Wilson
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-10  5:49 UTC (permalink / raw)
  To: cygwin

<Am 2001-02-21 21:58 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

> My suggestion is to use 2.1a2 as it supports Cygwin *much* better than
> previous versions.  See the following for details:
> 
>     http://www.cygwin.com/ml/cygwin-apps/2001-02/msg00004.html
> 

Before the problems with readline occur, i got this:
/usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../i686-pc-cygwin/bin/ld: unrecognized option `--enable-auto-image-base'

ciao,

Gerrit

-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-10  5:49   ` Gerrit P. Haase
@ 2001-03-10  8:20     ` Charles S. Wilson
  2001-03-10 10:06       ` Gerrit P. Haase
  0 siblings, 1 reply; 39+ messages in thread
From: Charles S. Wilson @ 2001-03-10  8:20 UTC (permalink / raw)
  To: gerrit.haase; +Cc: cygwin

"Gerrit P. Haase" wrote:
> 
> <Am 2001-02-21 21:58 wars, als Jason Tishler schrieb:>
> < Re: python 2.0, cygwin & readline - >
> 
> > My suggestion is to use 2.1a2 as it supports Cygwin *much* better than
> > previous versions.  See the following for details:
> >
> >     http://www.cygwin.com/ml/cygwin-apps/2001-02/msg00004.html
> >
> 
> Before the problems with readline occur, i got this:
> /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../i686-pc-cygwin/bin/ld: unrecognized option `--enable-auto-image-base'

I have version:
binutils latest/binutils/binutils-20001221-1.tar.gz 3507710

and 'ld --help' says:
   ...
  --compat-implib                    Create backward compatible import
libs;
                                       create __imp_<SYMBOL> as well.
  --enable-auto-image-base           Automatically choose image base for
DLLs
                                       unless user specifies one
  --disable-auto-image-base          Do not auto-choose image base.
(default)
  --dll-search-prefix=<string>       When linking dynamically to a dll
witout an
                                       importlib, use
<string><basename>.dll 
                                       in preference to
lib<basename>.dll 

Can you verify on your installed version of ld/binutils?

--Chuck

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-10  8:20     ` Charles S. Wilson
@ 2001-03-10 10:06       ` Gerrit P. Haase
  2001-03-10 19:28         ` Jason Tishler
  0 siblings, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-10 10:06 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-10 11:21 wars, als Charles S. Wilson schrieb:>
< Re: python 2.0, cygwin & readline - >

Hi Charles,

> > Before the problems with readline occur, i got this:
> > /usr/lib/gcc-lib/i686-pc-cygwin/2.95.2-6/../../../../i686-pc-cygwin/bin/ld: unrecognized option `--enable-auto-image-base'
> 
> I have version:
> binutils latest/binutils/binutils-20001221-1.tar.gz 3507710
> 

Hmmm, yes, it seems, i got another version installed. It was dated with
2001-01-14, that was my own build.
I installed the whole cygwin-distribution over an old one again.

It seems, ld.exe was not clobbered.

Thanks a lot for the hint Charles,

Gerrit

-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-10 10:06       ` Gerrit P. Haase
@ 2001-03-10 19:28         ` Jason Tishler
  2001-03-11  6:33           ` Gerrit P. Haase
  2001-03-11  9:07           ` Gerrit P. Haase
  0 siblings, 2 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-10 19:28 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Sat, Mar 10, 2001 at 07:09:04PM +0100, Gerrit P. Haase wrote:
> Hmmm, yes, it seems, i got another version installed. It was dated with
> 2001-01-14, that was my own build.
> I installed the whole cygwin-distribution over an old one again.
> 
> It seems, ld.exe was not clobbered.

After updating your Cygwin setup...

On Sat, Mar 10, 2001 at 02:41:57PM +0100, Gerrit P. Haase wrote:
> I got a lot of errors compiling Python2.1b1 with libreadline.
> I think that it is not fixed...

.. can you build Python 2.1b1 now?

Are you following the instructions in:

    http://sources.redhat.com/ml/cygwin-apps/2001-03/msg00003.html

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-10 19:28         ` Jason Tishler
@ 2001-03-11  6:33           ` Gerrit P. Haase
  2001-03-11  9:07           ` Gerrit P. Haase
  1 sibling, 0 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-11  6:33 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-10 22:32 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

> Gerrit,
> 
[...]
> 
> After updating your Cygwin setup...
[...] 
> .. can you build Python 2.1b1 now?
> 
> Are you following the instructions in:
> 
>     http://sources.redhat.com/ml/cygwin-apps/2001-03/msg00003.html

Oops, i didn't see that.

I'll tajke a look.

Without these instructions, it builts, but it's kind of strange, 
and i couldn't run python.exe,
Error Message is a windows popup with the message:
'Couldn't initialize Application correct....'

I'll try again.

Ciao,

Gerrit

-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-10 19:28         ` Jason Tishler
  2001-03-11  6:33           ` Gerrit P. Haase
@ 2001-03-11  9:07           ` Gerrit P. Haase
  2001-03-11 14:45             ` Jason Tishler
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-11  9:07 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-10 22:32 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

> After updating your Cygwin setup...
[...] 
> .. can you build Python 2.1b1 now?

I got several times this warning:
In file included from /usr/include/unistd.h:4,
                 from Python/import.c:19:
/usr/include/sys/unistd.h:237: warning: `MAXPATHLEN' redefined

some other warnings, plus most problems as make tries to build extensions,
most because of undefined references:

WARNING: building of extension "struct" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "regex" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "pcre" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "_weakref" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "_symtable" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "xreadlines" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "array" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "cmath" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "math" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "strop" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "time" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "operator" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "_codecs" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "_testcapi" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "unicodedata" failed: command 'gcc' failed with exit status 1

_locale did not fail!

WARNING: building of extension "fcntl" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "pwd" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "grp" failed: command 'gcc' failed with exit status 1

errno did not fail!

WARNING: building of extension "select" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "md5" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "sha" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "new" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "parser" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "cStringIO" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "cPickle" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "mmap" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "rotor" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "syslog" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "timing" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "audioop" failed: command 'gcc' failed with exit status 1

imageop did not fail!

WARNING: building of extension "rgbimg" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "readline" failed: command 'gcc' failed with exit status 1

crypt did not fail!

WARNING: building of extension "_socket" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "gdbm" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "bsddb" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "mpz" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "termios" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "_curses" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "_curses_panel" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "fpectl" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "zlib" failed: command 'gcc' failed with exit status 1
WARNING: building of extension "pyexpat" failed: command 'gcc' failed with exit status 1


-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-11  9:07           ` Gerrit P. Haase
@ 2001-03-11 14:45             ` Jason Tishler
  2001-03-11 18:00               ` Gerrit P. Haase
  2001-03-11 18:02               ` Gerrit P. Haase
  0 siblings, 2 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-11 14:45 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Sun, Mar 11, 2001 at 06:06:44PM +0100, Gerrit P. Haase wrote:
> <Am 2001-03-10 22:32 wars, als Jason Tishler schrieb:>
> < Re: python 2.0, cygwin & readline - >
> 
> > After updating your Cygwin setup...
> [...] 
> > .. can you build Python 2.1b1 now?
> 
> I got several times this warning:
> In file included from /usr/include/unistd.h:4,
>                  from Python/import.c:19:
> /usr/include/sys/unistd.h:237: warning: `MAXPATHLEN' redefined

I get this too, but it's just a warning.  So, why worry? :,)

> some other warnings, plus most problems as make tries to build extensions,
> most because of undefined references:
> 
> WARNING: building of extension "struct" failed: command 'gcc' failed with exit status 1

Please provide me with more details than the above.  Specifically,
I would like to see the output from the compilation and link (if
appropriate) lines.  Without this information, I cannot help you.

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-11 14:45             ` Jason Tishler
@ 2001-03-11 18:00               ` Gerrit P. Haase
  2001-03-11 20:32                 ` Jason Tishler
  2001-03-11 18:02               ` Gerrit P. Haase
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-11 18:00 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-11 17:52 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

> Please provide me with more details than the above.  Specifically,
> I would like to see the output from the compilation and link (if
> appropriate) lines.  Without this information, I cannot help you.

O.K., My make log is about 142KB, so i snip out the first try of make
to build an extension and then some excerpts from below.

[...]
Creating library file: libpython2.1.dll.a
gcc -s  -o python.exe Modules/python.o \
		libpython2.1.dll.a    -lm  
PYTHONPATH= ./python.exe ./setup.py build
running build
running build_ext
building 'struct' extension
creating build
creating build/temp.cygwin_nt-4.0-1.1.8-i686-2.1
gcc -I. -I/src/Python-2.1b1/./Include -IInclude/ -I/usr/local/include -c /src/Python-2.1b1/Modules/structmodule.c -o build/temp.cygwin_nt-4.0-1.1.8-i686-
2.1/structmodule.o
creating build/lib.cygwin_nt-4.0-1.1.8-i686-2.1
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o -L. -L/usr/local/lib -lpython2.1 -o build/lib.cygwin_nt-4.0-
1.1.8-i686-2.1/struct.dll
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x53):structmodule.c: undefined reference to `PyExc_TypeError'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0xa0):structmodule.c: undefined reference to `PyLong_Type'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x205):structmodule.c: undefined reference to `PyExc_SystemError'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x22b):structmodule.c: undefined reference to `PyExc_OverflowError'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x44d):structmodule.c: undefined reference to `PyExc_SystemError'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x476):structmodule.c: undefined reference to `PyExc_OverflowError'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0xc34):structmodule.c: undefined reference to `PyString_Type'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x102f):structmodule.c: undefined reference to `PyExc_TypeError'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x1bd7):structmodule.c: undefined reference to `PyTuple_Type'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x1c05):structmodule.c: undefined reference to `PyExc_TypeError'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x1e78):structmodule.c: undefined reference to `PyString_Type'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x1f33):structmodule.c: undefined reference to `PyString_Type'
collect2: ld returned 1 exit status
WARNING: building of extension "struct" failed: command 'gcc' failed with exit status 1
building 'regex' extension
gcc -I. -I/src/Python-2.1b1/./Include -IInclude/ -I/usr/local/include -c /src/Python-2.1b1/Modules/regexmodule.c -o build/temp.cygwin_nt-4.0-1.1.8-i686-
2.1/regexmodule.o
gcc -I. -I/src/Python-2.1b1/./Include -IInclude/ -I/usr/local/include -c /src/Python-2.1b1/Modules/regexpr.c -o build/temp.cygwin_nt-4.0-1.1.8-i686-
2.1/regexpr.o
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/regexmodule.o build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/regexpr.o -L. -
L/usr/local/lib -lpython2.1 -o build/lib.cygwin_nt-4.0-1.1.8-i686-2.1/regex.dll

[...]

collect2: ld returned 1 exit status
WARNING: building of extension "regex" failed: command 'gcc' failed with exit status 1
building 'pcre' extension
gcc -I. -I/src/Python-2.1b1/./Include -IInclude/ -I/usr/local/include -c /src/Python-2.1b1/Modules/pcremodule.c -o build/temp.cygwin_nt-4.0-1.1.8-i686-
2.1/pcremodule.o
gcc -I. -I/src/Python-2.1b1/./Include -IInclude/ -I/usr/local/include -c /src/Python-2.1b1/Modules/pypcre.c -o build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/pypcre.o
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/pcremodule.o build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/pypcre.o -L. -
L/usr/local/lib -lpython2.1 -o build/lib.cygwin_nt-4.0-1.1.8-i686-2.1/pcre.dll

[...]

and so on

And also, after installing Python is not working which is probably normal in this case.

Ciao,

Gerrit
-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-11 14:45             ` Jason Tishler
  2001-03-11 18:00               ` Gerrit P. Haase
@ 2001-03-11 18:02               ` Gerrit P. Haase
  2001-03-11 20:34                 ` Jason Tishler
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-11 18:02 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-11 17:52 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

Thanks for your patience, Jason,

I saw, that libc isn't included by default, is that correct?

Gerrit
-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-11 18:00               ` Gerrit P. Haase
@ 2001-03-11 20:32                 ` Jason Tishler
  2001-03-12  1:23                   ` Gerrit P. Haase
  2001-03-13  0:36                   ` Gerrit P. Haase
  0 siblings, 2 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-11 20:32 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Mon, Mar 12, 2001 at 03:00:37AM +0100, Gerrit P. Haase wrote:
> <Am 2001-03-11 17:52 wars, als Jason Tishler schrieb:>
> < Re: python 2.0, cygwin & readline - >
> 
> > Please provide me with more details than the above.  Specifically,
> > I would like to see the output from the compilation and link (if
> > appropriate) lines.  Without this information, I cannot help you.
> 
> O.K., My make log is about 142KB, so i snip out the first try of make
> to build an extension and then some excerpts from below.

I was only looking for output from the building of one extension, not the
entire make.

> [...]
> Creating library file: libpython2.1.dll.a
> gcc -s  -o python.exe Modules/python.o \
> 		libpython2.1.dll.a    -lm  

Just curious, but how did you get the "-s" option set above.  Via
configure or did you edit your Makefile?

> PYTHONPATH= ./python.exe ./setup.py build
> running build
> running build_ext
> building 'struct' extension
> creating build
> creating build/temp.cygwin_nt-4.0-1.1.8-i686-2.1
> gcc -I. -I/src/Python-2.1b1/./Include -IInclude/ -I/usr/local/include -c /src/Python-2.1b1/Modules/structmodule.c -o build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o

Here is your problem -- the "-DUSE_DL_IMPORT" option is missing above.
This means that somehow the value of CCSHARED got whacked in your
Makefile.  How did you accomplish this?  Please send me your Makefile.

> creating build/lib.cygwin_nt-4.0-1.1.8-i686-2.1
> gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o -L. -L/usr/local/lib -lpython2.1 -o build/lib.cygwin_nt-4.0-1.1.8-i686-2.1/struct.dll
> build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x53):structmodule.c: undefined reference to `PyExc_TypeError'
> [snip]
> build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o(.text+0x1f33):structmodule.c: undefined reference to `PyString_Type'
> collect2: ld returned 1 exit status
> WARNING: building of extension "struct" failed: command 'gcc' failed with exit status 1

If you do not specify the "-DUSE_DL_IMPORT" option during compilation,
then you will get error such as the above during linking.

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-11 18:02               ` Gerrit P. Haase
@ 2001-03-11 20:34                 ` Jason Tishler
  0 siblings, 0 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-11 20:34 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Mon, Mar 12, 2001 at 03:02:05AM +0100, Gerrit P. Haase wrote:
> <Am 2001-03-11 17:52 wars, als Jason Tishler schrieb:>
> < Re: python 2.0, cygwin & readline - >
> 
> Thanks for your patience, Jason,

No problem -- I'm just trying to help.

> I saw, that libc isn't included by default, is that correct?

Yes, libc (and libm) are just symlinks to libcygwin.a.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-11 20:32                 ` Jason Tishler
@ 2001-03-12  1:23                   ` Gerrit P. Haase
  2001-03-12  1:40                     ` Robert Collins
  2001-03-13  3:16                     ` Gerrit P. Haase
  2001-03-13  0:36                   ` Gerrit P. Haase
  1 sibling, 2 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-12  1:23 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-11 23:39 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

> > [...]
> > Creating library file: libpython2.1.dll.a
> > gcc -s  -o python.exe Modules/python.o \
> > 		libpython2.1.dll.a    -lm  
> 
> Just curious, but how did you get the "-s" option set above.  Via
> configure or did you edit your Makefile?

its in my .bashrc:
export LDFLAGS=-s
 
> > PYTHONPATH= ./python.exe ./setup.py build
> > running build
> > running build_ext
> > building 'struct' extension
> > creating build
> > creating build/temp.cygwin_nt-4.0-1.1.8-i686-2.1
> > gcc -I. -I/src/Python-2.1b1/./Include -IInclude/ -I/usr/local/include -c /src/Python-2.1b1/Modules/structmodule.c -o build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/structmodule.o
> 
> Here is your problem -- the "-DUSE_DL_IMPORT" option is missing above.
> This means that somehow the value of CCSHARED got whacked in your
> Makefile.  How did you accomplish this?  Please send me your Makefile.

Hmmm, i don't know, i run configure --with-threads=no --with-libm=

thats all.

Here the Makefile:
# Generated automatically from Makefile.pre by makesetup.
# Generated automatically from Makefile.pre.in by configure.
# Top-level Makefile for Python
# 
# As distributed, this file is called Makefile.pre.in; it is processed
# into the real Makefile by running the script ./configure, which
# replaces things like @spam@ with values appropriate for your system.
# This means that if you edit Makefile, your changes get lost the next
# time you run the configure script.  Ideally, you can do:
# 
#	./configure
#	make
#	make test
#	make install
# 
# If you have a previous version of Python installed that you don't
# want to overwrite, you can use "make altinstall" instead of "make
# install".  Refer to the "Installing" section in the README file for
# additional details.
# 
# See also the section "Build instructions" in the README file.

# === Variables set by makesetup ===

MODOBJS=          Modules/gcmodule.o  Modules/signalmodule.o  Modules/posixmodule.o  Modules/_sre.o
MODLIBS=        $(LOCALMODLIBS) $(BASEMODLIBS)

# === Variables set by configure
VERSION=	2.1
srcdir=		.

CC=		gcc
CXX=		g++
LINKCC=		$(PURIFY) $(CC)
AR=		ar
RANLIB=		ranlib

# Shell used by make (some versions default to the login shell, which is bad)
SHELL=		/bin/sh

# Use this to make a link between python$(VERSION) and python in $(BINDIR)
LN=		ln -s

# Portable install script (configure doesn't always guess right)
INSTALL=	/usr/bin/install -c
INSTALL_PROGRAM=${INSTALL}
INSTALL_DATA=	${INSTALL} -m 644
# Shared libraries must be installed with executable mode on some systems;
# rather than figuring out exactly which, we always give them executable mode.
# Also, making them read-only seems to be a good idea...
INSTALL_SHARED= ${INSTALL} -m 555

MAKESETUP=      $(srcdir)/Modules/makesetup

# Compiler options
OPT=		-g -O2 -Wall -Wstrict-prototypes
DEFS=		-DHAVE_CONFIG_H
CFLAGS=		$(OPT) -I. -I$(srcdir)/Include $(DEFS)
LDFLAGS=	-s
LDLAST=		
SGI_ABI=	
CCSHARED=	-DUSE_DL_IMPORT
LINKFORSHARED=	
# Extra C flags added for building the interpreter object files.
CFLAGSFORSHARED=
# C flags used for building the interpreter object files
PY_CFLAGS=	$(CFLAGS) $(CFLAGSFORSHARED)


# Machine-dependent subdirectories
MACHDEP=	cygwin_nt-4.01

# Install prefix for architecture-independent files
prefix=		/usr/local

# Install prefix for architecture-dependent files
exec_prefix=	${prefix}

# Expanded directories
BINDIR=		$(exec_prefix)/bin
LIBDIR=		$(exec_prefix)/lib
MANDIR=		$(prefix)/man
INCLUDEDIR=	$(prefix)/include
CONFINCLUDEDIR=	$(exec_prefix)/include
SCRIPTDIR=	$(prefix)/lib

# Detailed destination directories
BINLIBDEST=	$(LIBDIR)/python$(VERSION)
LIBDEST=	$(SCRIPTDIR)/python$(VERSION)
INCLUDEPY=	$(INCLUDEDIR)/python$(VERSION)
CONFINCLUDEPY=	$(CONFINCLUDEDIR)/python$(VERSION)
LIBP=		$(LIBDIR)/python$(VERSION)

# Symbols used for using shared libraries
SO=		.dll
LDSHARED=	gcc -shared -Wl,--enable-auto-image-base
BLDSHARED=	gcc -shared -Wl,--enable-auto-image-base
DESTSHARED=	$(BINLIBDEST)/lib-dynload

# Executable suffix (.exe on Windows and Mac OS X)
EXE=		.exe

# Modes for directories, executables and data files created by the
# install process.  Default to user-only-writable for all file types.
DIRMODE=	755
EXEMODE=	755
FILEMODE=	644

# --with-PACKAGE options for configure script
# e.g. --with-readline --with-svr5 --with-solaris --with-thread
# (see README for an explanation)
WITH=		


# Subdirectories with code
SRCDIRS= 	Parser Grammar Objects Python Modules

# Other subdirectories
SUBDIRSTOO=	Include Lib Misc Demo

# Files and directories to be distributed
CONFIGFILES=	configure configure.in acconfig.h config.h.in Makefile.pre.in
DISTFILES=	README ChangeLog $(CONFIGFILES)
DISTDIRS=	$(SUBDIRS) $(SUBDIRSTOO) Ext-dummy
DIST=		$(DISTFILES) $(DISTDIRS)


LIBRARY=	libpython$(VERSION).a
LDLIBRARY=      libpython$(VERSION).dll.a
DLLLIBRARY=	libpython$(VERSION).dll


LIBS=		
LIBM=		-lm
LIBC=		-lc
SYSLIBS=	$(LIBM) $(LIBC)

MAINOBJ=	Modules/python.o
LIBOBJS=	
DLINCLDIR=	/
DYNLOADFILE=	dynload_shlib.o

PYTHON=		python$(EXE)

# === Definitions added by makesetup ===

LOCALMODLIBS=    
BASEMODLIBS=
GLHACK=-Dclear=__GLclear
PYTHONPATH=$(COREPYTHONPATH)
COREPYTHONPATH=$(DESTPATH)$(SITEPATH)$(TESTPATH)$(MACHDEPPATH)$(TKPATH)
TKPATH=:lib-tk
MACHDEPPATH=:plat-$(MACHDEP)
TESTPATH=
SITEPATH=
DESTPATH=
MACHDESTLIB=$(BINLIBDEST)
DESTLIB=$(LIBDEST)



##########################################################################
# Modules
MODULE_OBJS=	\
		Modules/config.o \
		Modules/getpath.o \
		Modules/main.o

# Used of signalmodule.o is not available
SIGNAL_OBJS=	


##########################################################################
# Grammar
GRAMMAR_H=	$(srcdir)/Include/graminit.h
GRAMMAR_C=	$(srcdir)/Python/graminit.c
GRAMMAR_INPUT=	$(srcdir)/Grammar/Grammar


##########################################################################
# Parser
PGEN=		Parser/pgen$(EXE)

POBJS=		\
		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_OBJS=	$(POBJS) Parser/myreadline.o

PGOBJS=		\
		Parser/firstsets.o \
		Parser/grammar.o \
		Parser/pgen.o \
		Parser/printgrammar.o \
		Parser/pgenmain.o

PGENOBJS=	$(PGENMAIN) $(POBJS) $(PGOBJS)


##########################################################################
# Python
PYTHON_OBJS=	\
		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/$(DYNLOADFILE) \
		$(LIBOBJS)


##########################################################################
# Objects
OBJECT_OBJS=	\
		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


##########################################################################
# objects that get linked into the Python library
LIBRARY_OBJS=	\
		Modules/getbuildinfo.o \
		$(PARSER_OBJS) \
		$(OBJECT_OBJS) \
		$(PYTHON_OBJS) \
		$(MODULE_OBJS) \
		$(SIGNAL_OBJS) \
		$(MODOBJS)

#########################################################################
# Rules

# Default target
all:		$(PYTHON) oldsharedmods sharedmods 

# Build the interpreter
$(PYTHON):	$(MAINOBJ) $(LDLIBRARY)
		$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) -o $@ $(MAINOBJ) \
			$(LDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)

platform: $(PYTHON)
	./$(PYTHON) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform


# Build the shared modules
sharedmods: $(PYTHON)
	PYTHONPATH= ./$(PYTHON) $(srcdir)/setup.py build

# buildno should really depend on something like LIBRARY_SRC
buildno: $(PARSER_OBJS) \
		$(OBJECT_OBJS) \
		$(PYTHON_OBJS) \
		$(MODULE_OBJS) \
		$(SIGNAL_OBJS) \
		$(MODOBJS) \
		$(srcdir)/Modules/getbuildinfo.c
	if test -f buildno; then \
		expr `cat buildno` + 1 >buildno1; \
		mv -f buildno1 buildno; \
	else echo 1 >buildno; fi

# Build static library
$(LIBRARY): $(LIBRARY_OBJS)
	-rm -f $@
	# avoid long command lines, same as LIBRARY_OBJS
	$(AR) cr $@ Modules/getbuildinfo.o
	$(AR) cr $@ $(PARSER_OBJS)
	$(AR) cr $@ $(OBJECT_OBJS)
	$(AR) cr $@ $(PYTHON_OBJS)
	$(AR) cr $@ $(MODULE_OBJS) $(SIGNAL_OBJS)
	$(AR) cr $@ $(MODOBJS)
	$(RANLIB) $@

# This rule is only here for DG/UX and BeOS!!!
libpython$(VERSION).so:	$(LIBRARY)
	case `uname -s | tr -d '/ ' | tr '[A-Z]' '[a-z]'` in \
	*dgux*) \
	    test -d dgux || mkdir dgux; \
	    (cd dgux;ar x ../$^;ld -G -o ../$@ * ); \
	    /bin/rm -rf ./dgux \
	    ;; \
	beos) \
	    $(AR) so $(LIBRARY) $@ \
	    ;; \
	esac

# This rule is here for OPENSTEP/Rhapsody/MacOSX
libpython$(VERSION).dylib: $(LIBRARY)
	libtool -o $(LDLIBRARY) -dynamic $(OTHER_LIBTOOL_OPT) $(LIBRARY) \
		-framework System  

# This rule builds the Cygwin Python DLL
libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
	dlltool --export-all --output-def $@ $^
	$(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
		$(LIBS) $(MODLIBS) $(SYSLIBS)


oldsharedmods: $(SHAREDMODS)


Makefile Modules/config.c: Makefile.pre \
				$(srcdir)/Modules/config.c.in \
				$(MAKESETUP) \
				Modules/Setup.config \
				Modules/Setup \
				Modules/Setup.local
	$(SHELL) $(MAKESETUP) -c $(srcdir)/Modules/config.c.in \
				-s Modules \
				Modules/Setup.config \
				Modules/Setup.local \
				Modules/Setup
	@mv config.c Modules
	@echo "The Makefile was updated, you may need to re-run make."


Modules/Setup: $(srcdir)/Modules/Setup.dist
	@if test -f Modules/Setup; then \
		echo "-----------------------------------------------"; \
		echo "Modules/Setup.dist is newer than Modules/Setup;"; \
		echo "check to make sure you have all the updates you"; \
		echo "need in your Modules/Setup file."; \
		echo "-----------------------------------------------"; \
	fi

############################################################################
# Special rules for object files

Modules/getbuildinfo.o: $(srcdir)/Modules/getbuildinfo.c buildno
	$(CC) -c $(PY_CFLAGS) -DBUILD=`cat buildno` -o $@ $(srcdir)/Modules/getbuildinfo.c

Modules/getpath.o: $(srcdir)/Modules/getpath.c Makefile
	$(CC) -c $(PY_CFLAGS) -DPYTHONPATH='"$(PYTHONPATH)"' \
		-DPREFIX='"$(prefix)"' \
		-DEXEC_PREFIX='"$(exec_prefix)"' \
		-DVERSION='"$(VERSION)"' \
		-DVPATH='"$(VPATH)"' \
		-o $@ $(srcdir)/Modules/getpath.c

Modules/ccpython.o: $(srcdir)/Modules/ccpython.cc
	$(CXX) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/ccpython.cc


$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
		-$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)

$(PGEN):	$(PGENOBJS)
		$(CC) $(OPT) $(PGENOBJS) $(LIBS) -o $(PGEN)

Parser/grammar.o:	$(srcdir)/Parser/grammar.c \
				$(srcdir)/Parser/assert.h \
				$(srcdir)/Include/token.h \
				$(srcdir)/Include/grammar.h
Parser/metagrammar.o:	$(srcdir)/Parser/metagrammar.c


Python/compile.o Python/symtable.o: $(GRAMMAR_H)

Python/getplatform.o: $(srcdir)/Python/getplatform.c
		$(CC) -c $(CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c

Python/importdl.o: $(srcdir)/Python/importdl.c
		$(CC) -c $(CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c

Objects/object.o: $(srcdir)/Objects/object.c $(srcdir)/Objects/obmalloc.c

Objects/unicodectype.o:	$(srcdir)/Objects/unicodectype.c \
				$(srcdir)/Objects/unicodetype_db.h


############################################################################
# Header files

PYTHON_HEADERS= \
		Include/Python.h \
		config.h \
		Include/patchlevel.h \
		Include/pyport.h \
		Include/pymem.h \
		Include/object.h \
		Include/objimpl.h \
		Include/compile.h \
		Include/symtable.h \
		Include/pydebug.h \
		Include/unicodeobject.h \
		Include/intobject.h \
		Include/longobject.h \
		Include/floatobject.h \
		Include/complexobject.h \
		Include/rangeobject.h \
		Include/stringobject.h \
		Include/bufferobject.h \
		Include/tupleobject.h \
		Include/listobject.h \
		Include/dictobject.h \
		Include/methodobject.h \
		Include/moduleobject.h \
		Include/funcobject.h \
		Include/classobject.h \
		Include/fileobject.h \
		Include/cobject.h \
		Include/traceback.h \
		Include/sliceobject.h \
		Include/codecs.h \
		Include/pyerrors.h \
		Include/pystate.h \
		Include/modsupport.h \
		Include/ceval.h \
		Include/pythonrun.h \
		Include/sysmodule.h \
		Include/intrcheck.h \
		Include/import.h \
		Include/abstract.h \
		Include/pyfpe.h

$(LIBRARY_OBJS) $(MODOBJS) $(MAINOBJ): $(PYTHON_HEADERS)


######################################################################

# Test the interpreter (twice, once without .pyc files, once with)
TESTOPTS=	-l
TESTPROG=	$(srcdir)/Lib/test/regrtest.py
TESTPYTHON=	./$(PYTHON) -tt
test:		all platform
		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
		-PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)
		PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(TESTOPTS)

QUICKTESTOPTS=	$(TESTOPTS) -x test_thread test_signal test_strftime \
		test_unicodedata test_re test_sre test_select test_poll \
		test_linuxaudiodev test_sunaudiodev
quicktest:	all platform
		-find $(srcdir)/Lib -name '*.py[co]' -print | xargs rm -f
		-PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)
		PYTHONPATH= $(TESTPYTHON) $(TESTPROG) $(QUICKTESTOPTS)

# Install everything
install:	altinstall bininstall maninstall

# Install almost everything without disturbing previous versions
altinstall:	altbininstall libinstall inclinstall libainstall \
                sharedinstall oldsharedinstall 

# Install shared libraries enabled by Setup
DESTDIRS=	$(exec_prefix) $(LIBDIR) $(BINLIBDEST) $(DESTSHARED)

oldsharedinstall: $(DESTSHARED) $(SHAREDMODS)
		@for i in X $(SHAREDMODS); do \
		  if test $$i != X; then \
		    echo $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
		    $(INSTALL_SHARED) $$i $(DESTSHARED)/`basename $$i`; \
		  fi; \
		done

$(DESTSHARED): 
		@for i in $(DESTDIRS); \
		do \
			if test ! -d $$i; then \
				echo "Creating directory $$i"; \
				$(INSTALL) -d -m $(DIRMODE) $$i; \
			else    true; \
			fi; \
		done


# Install the interpreter (by creating a hard link to python$(VERSION))
bininstall:	altbininstall
	-if test -f $(BINDIR)/$(PYTHON); \
	then rm -f $(BINDIR)/$(PYTHON); \
	else true; \
	fi
	(cd $(BINDIR); $(LN) python$(VERSION)$(EXE) $(PYTHON))

# Install the interpreter with $(VERSION) affixed
# This goes into $(exec_prefix)
altbininstall:	$(PYTHON)
	@for i in $(BINDIR); \
	do \
		if test ! -d $$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $$i; \
		else	true; \
		fi; \
	done
	$(INSTALL_PROGRAM) $(PYTHON) $(BINDIR)/python$(VERSION)$(EXE)
	if test -f libpython$(VERSION).so; then \
		$(INSTALL_DATA) libpython$(VERSION).so $(LIBDIR); \
	else	true; \
	fi
	if test -f "$(DLLLIBRARY)"; then \
		$(INSTALL_DATA) $(DLLLIBRARY) $(BINDIR); \
	else	true; \
	fi

# Install the manual page
maninstall:
	@for i in $(MANDIR) $(MANDIR)/man1; \
	do \
		if test ! -d $$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $$i; \
		else	true; \
		fi; \
	done
	$(INSTALL_DATA) $(srcdir)/Misc/python.man \
		$(MANDIR)/man1/python.1

# Install the library
PLATDIR=	plat-$(MACHDEP)
MACHDEPS=	$(PLATDIR)
XMLLIBSUBDIRS=  xml xml/dom xml/parsers xml/sax
LIBSUBDIRS=	lib-old lib-tk site-packages test test/output encodings \
		distutils distutils/command $(XMLLIBSUBDIRS) curses $(MACHDEPS)
libinstall:	$(PYTHON) $(srcdir)/Lib/$(PLATDIR)
	@for i in $(SCRIPTDIR) $(LIBDEST); \
	do \
		if test ! -d $$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $$i; \
		else	true; \
		fi; \
	done
	@for d in $(LIBSUBDIRS); \
	do \
		a=$(srcdir)/Lib/$$d; \
		if test ! -d $$a; then continue; else true; fi; \
		b=$(LIBDEST)/$$d; \
		if test ! -d $$b; then \
			echo "Creating directory $$b"; \
			$(INSTALL) -d -m $(DIRMODE) $$b; \
		else	true; \
		fi; \
	done
	@for i in $(srcdir)/Lib/*.py $(srcdir)/Lib/*.doc; \
	do \
		if test -x $$i; then \
			$(INSTALL_PROGRAM) $$i $(LIBDEST); \
			echo $(INSTALL_PROGRAM) $$i $(LIBDEST); \
		else \
			$(INSTALL_DATA) $$i $(LIBDEST); \
			echo $(INSTALL_DATA) $$i $(LIBDEST); \
		fi; \
	done
	@for d in $(LIBSUBDIRS); \
	do \
		a=$(srcdir)/Lib/$$d; \
		if test ! -d $$a; then continue; else true; fi; \
		b=$(LIBDEST)/$$d; \
		for i in $$a/*; \
		do \
			case $$i in \
			*CVS) ;; \
			*.py[co]) ;; \
			*.orig) ;; \
			*~) ;; \
			*) \
				if test -d $$i; then continue; fi; \
				if test -x $$i; then \
				    echo $(INSTALL_PROGRAM) $$i $$b; \
				    $(INSTALL_PROGRAM) $$i $$b; \
				else \
				    echo $(INSTALL_DATA) $$i $$b; \
				    $(INSTALL_DATA) $$i $$b; \
				fi;; \
			esac; \
		done; \
	done
	$(INSTALL_DATA) $(srcdir)/LICENSE $(LIBDEST)/LICENSE.txt
	PYTHONPATH=$(LIBDEST) \
		./$(PYTHON) -tt $(LIBDEST)/compileall.py $(LIBDEST)
	PYTHONPATH=$(LIBDEST) \
		./$(PYTHON) -O $(LIBDEST)/compileall.py $(LIBDEST)

# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
	mkdir $(srcdir)/Lib/$(PLATDIR)
	cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen
	export PATH; PATH="`pwd`:$$PATH"; \
	export PYTHONPATH; PYTHONPATH="`pwd`/Lib"; \
	export EXE; EXE="$(EXE)"; \
	cd $(srcdir)/Lib/$(PLATDIR); ./regen

# Install the include files
INCLDIRSTOMAKE=$(INCLUDEDIR) $(CONFINCLUDEDIR) $(INCLUDEPY) $(CONFINCLUDEPY)
inclinstall:
	@for i in $(INCLDIRSTOMAKE); \
	do \
		if test ! -d $$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $$i; \
		else	true; \
		fi; \
	done
	@for i in $(srcdir)/Include/*.h; \
	do \
		echo $(INSTALL_DATA) $$i $(INCLUDEPY); \
		$(INSTALL_DATA) $$i $(INCLUDEPY); \
	done
	$(INSTALL_DATA) config.h $(CONFINCLUDEPY)/config.h

# Install the library and miscellaneous stuff needed for extending/embedding
# This goes into $(exec_prefix)
LIBPL=		$(LIBP)/config
libainstall:	all
	@for i in $(LIBDIR) $(LIBP) $(LIBPL); \
	do \
		if test ! -d $$i; then \
			echo "Creating directory $$i"; \
			$(INSTALL) -d -m $(DIRMODE) $$i; \
		else	true; \
		fi; \
	done
	@if test -d $(LDLIBRARY); then :; else \
		$(INSTALL_DATA) $(LDLIBRARY) $(LIBPL)/$(LDLIBRARY) ; \
		$(RANLIB) $(LIBPL)/$(LDLIBRARY) ; \
	fi
	$(INSTALL_DATA) Modules/config.c $(LIBPL)/config.c
	$(INSTALL_DATA) Modules/python.o $(LIBPL)/python.o
	$(INSTALL_DATA) $(srcdir)/Modules/config.c.in $(LIBPL)/config.c.in
	$(INSTALL_DATA) Makefile $(LIBPL)/Makefile
	$(INSTALL_DATA) Modules/Setup $(LIBPL)/Setup
	$(INSTALL_DATA) Modules/Setup.local $(LIBPL)/Setup.local
	$(INSTALL_DATA) Modules/Setup.config $(LIBPL)/Setup.config
	$(INSTALL_PROGRAM) $(srcdir)/Modules/makesetup $(LIBPL)/makesetup
	$(INSTALL_PROGRAM) $(srcdir)/install-sh $(LIBPL)/install-sh
	$(INSTALL_DATA) $(srcdir)/Misc/Makefile.pre.in $(LIBPL)/Makefile.pre.in
	@if [ -s Modules/python.exp -a \
		"`echo $(MACHDEP) | sed 's/^\(...\).*/\1/'`" = "aix" ]; then \
		echo; echo "Installing support files for building shared extension modules on AIX:"; \
		$(INSTALL_DATA) Modules/python.exp		\
				$(LIBPL)/python.exp;		\
		echo; echo "$(LIBPL)/python.exp";		\
		$(INSTALL_PROGRAM) $(srcdir)/Modules/makexp_aix	\
				$(LIBPL)/makexp_aix;		\
		echo "$(LIBPL)/makexp_aix";			\
		$(INSTALL_PROGRAM) $(srcdir)/Modules/ld_so_aix	\
				$(LIBPL)/ld_so_aix;		\
		echo "$(LIBPL)/ld_so_aix";			\
		echo; echo "See Misc/AIX-NOTES for details.";	\
	else true; \
	fi
	@case "$(MACHDEP)" in beos*) \
		echo; echo "Installing support files for building shared extension modules on BeOS:"; \
		$(INSTALL_DATA) Misc/BeOS-NOTES $(LIBPL)/README;	\
		echo; echo "$(LIBPL)/README";			\
		$(INSTALL_PROGRAM) Modules/ar_beos $(LIBPL)/ar_beos; \
		echo "$(LIBPL)/ar_beos";			\
		$(INSTALL_PROGRAM) Modules/ld_so_beos $(LIBPL)/ld_so_beos; \
		echo "$(LIBPL)/ld_so_beos";			\
		echo; echo "See Misc/BeOS-NOTES for details.";	\
		;; \
	esac

# Install the dynamically loadable modules
# This goes into $(exec_prefix)
sharedinstall:
	PYTHONPATH= ./$(PYTHON) $(srcdir)/setup.py install \
		--install-platlib=$(DESTSHARED)

# Build the toplevel Makefile
Makefile.pre: Makefile.pre.in config.status
	CONFIG_FILES=Makefile.pre CONFIG_HEADERS= $(SHELL) config.status
	$(MAKE) -f Makefile.pre Makefile

# Run the configure script.  If config.status already exists,
# call it with the --recheck argument, which reruns configure with the
# same options as it was run last time; otherwise run the configure
# script with options taken from the $(WITH) variable
config.status:	$(srcdir)/configure
	if test -f config.status; \
	then $(SHELL) config.status --recheck; \
	     $(SHELL) config.status; \
	else $(SHELL) $(srcdir)/configure $(WITH); \
	fi

.PRECIOUS: config.status $(PYTHON) Makefile Makefile.pre

# Some make's put the object file in the current directory
.c.o:
	$(CC) -c $(PY_CFLAGS) -o $@ $<

# Rerun configure with the same options as it was run last time,
# provided the config.status script exists
recheck:
	$(SHELL) config.status --recheck
	$(SHELL) config.status

# Rebuild the configure script from configure.in; also rebuild config.h.in
autoconf:
	(cd $(srcdir); autoconf)
	(cd $(srcdir); autoheader)

# Create a tags file for vi
tags::
	cd $(srcdir); \
	ctags -w -t Include/*.h; \
	for i in $(SRCDIRS); do ctags -w -t -a $$i/*.[ch]; \
	done; \
	sort tags -o tags

# Create a tags file for GNU Emacs
TAGS::
	cd $(srcdir); \
	etags Include/*.h; \
	for i in $(SRCDIRS); do etags -a $$i/*.[ch]; done

# Sanitation targets -- clean leaves libraries, executables and tags
# files, which clobber removes those as well

clean:
	find . -name '*.o' -exec rm -f {} ';'
	find $(srcdir) -name '*.py[co]' -exec rm -f {} ';'

clobber: clean
	-rm -f $(PYTHON) $(PGEN) $(LIBRARY) $(LDLIBRARY) $(DLLLIBRARY) \
		Modules/*.so Modules/*.sl tags TAGS \
		config.cache config.log config.h Modules/config.c 
	-rm -rf build

# Make things extra clean, before making a distribution:
# remove all generated files, even Makefile[.pre]
distclean: clobber
	-rm -f core Makefile Makefile.pre buildno config.status \
		Modules/Setup Modules/Setup.local Modules/Setup.config
	find $(srcdir) '(' -name '*.fdc' -o -name '*~' \
			   -o -name '[@,#]*' -o -name '*.old' \
			   -o -name '*.orig' -o -name '*.rej' \
			   -o -name '*.bak' ')' \
			   -exec rm -f {} ';'

# Check for smelly exported symbols (not starting with Py/_Py)
smelly: all
	nm -p $(LIBRARY) | \
		sed -n "/ [TDB] /s/.* //p" | grep -v "^_*Py" | sort -u; \

# Find files with funny names
funny:
	find $(DISTDIRS) -type d \
		-o -name '*.[chs]' \
		-o -name '*.py' \
		-o -name '*.doc' \
		-o -name '*.sty' \
		-o -name '*.bib' \
		-o -name '*.dat' \
		-o -name '*.el' \
		-o -name '*.fd' \
		-o -name '*.in' \
		-o -name '*.tex' \
		-o -name '*,[vpt]' \
		-o -name 'Setup' \
		-o -name 'Setup.*' \
		-o -name README \
		-o -name Makefile \
		-o -name ChangeLog \
		-o -name Repository \
		-o -name Root \
		-o -name Entries \
		-o -name Tag \
		-o -name tags \
		-o -name TAGS \
		-o -name .cvsignore \
		-o -name MANIFEST \
		-o -print

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY

# Rules appended by makedepend

Modules/gcmodule.o: $(srcdir)/Modules/gcmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/gcmodule.c -o Modules/gcmodule.o
Modules/gcmodule$(SO):  Modules/gcmodule.o; $(LDSHARED)  Modules/gcmodule.o  -L$(LIBPL) -lpython$(VERSION) -o Modules/gcmodule$(SO)
Modules/signalmodule.o: $(srcdir)/Modules/signalmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/signalmodule.c -o Modules/signalmodule.o
Modules/signalmodule$(SO):  Modules/signalmodule.o; $(LDSHARED)  Modules/signalmodule.o  -L$(LIBPL) -lpython$(VERSION) -o Modules/signalmodule$(SO)
Modules/posixmodule.o: $(srcdir)/Modules/posixmodule.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/posixmodule.c -o Modules/posixmodule.o
Modules/posixmodule$(SO):  Modules/posixmodule.o; $(LDSHARED)  Modules/posixmodule.o  -L$(LIBPL) -lpython$(VERSION) -o Modules/posixmodule$(SO)
Modules/_sre.o: $(srcdir)/Modules/_sre.c; $(CC) $(PY_CFLAGS)  -c $(srcdir)/Modules/_sre.c -o Modules/_sre.o
Modules/_sre$(SO):  Modules/_sre.o; $(LDSHARED)  Modules/_sre.o  -L$(LIBPL) -lpython$(VERSION) -o Modules/_sre$(SO)

-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12  1:23                   ` Gerrit P. Haase
@ 2001-03-12  1:40                     ` Robert Collins
  2001-03-12  7:41                       ` Jason Tishler
  2001-03-13  3:16                     ` Gerrit P. Haase
  1 sibling, 1 reply; 39+ messages in thread
From: Robert Collins @ 2001-03-12  1:40 UTC (permalink / raw)
  To: gerrit.haase, cygwin

I haven't tryed python, so take this with a  grain of salt:

Gerrit, can you successfully build and link .dlls? The -s option to ld
is "-s, --strip-all             Strip all symbols"

I suspect that that may interfere with .dll's, because they _need_ a
exported symbol list to allow them to be loaded and linked to by name
(as opposed to ordinal).

ld also has "-S, --strip-debug           Strip debugging symbols"
which might be more what you're looking for?

Rob

----- Original Message -----
From: "Gerrit P. Haase" <gerrit.haase@t-online.de>
To: <cygwin@cygwin.com>
Sent: Monday, March 12, 2001 8:23 PM
Subject: Re: python 2.0, cygwin & readline - undefined symbols


> <Am 2001-03-11 23:39 wars, als Jason Tishler schrieb:>
> < Re: python 2.0, cygwin & readline - >
>
> > > [...]
> > > Creating library file: libpython2.1.dll.a
> > > gcc -s  -o python.exe Modules/python.o \
> > > libpython2.1.dll.a    -lm
> >
> > Just curious, but how did you get the "-s" option set above.  Via
> > configure or did you edit your Makefile?
>
> its in my .bashrc:
> export LDFLAGS=-s
>
<snip>


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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12  1:40                     ` Robert Collins
@ 2001-03-12  7:41                       ` Jason Tishler
  2001-03-12  8:54                         ` Christopher Faylor
  0 siblings, 1 reply; 39+ messages in thread
From: Jason Tishler @ 2001-03-12  7:41 UTC (permalink / raw)
  To: Robert Collins; +Cc: gerrit.haase, cygwin

Rob,

On Mon, Mar 12, 2001 at 08:38:56PM +1100, Robert Collins wrote:
> I haven't tryed python, so take this with a  grain of salt:
> 
> Gerrit, can you successfully build and link .dlls? The -s option to ld
> is "-s, --strip-all             Strip all symbols"
> 
> I suspect that that may interfere with .dll's, because they _need_ a
> exported symbol list to allow them to be loaded and linked to by name
> (as opposed to ordinal).

I strip DLLs (including cygwin1.dll) all the time without any ill
effect.  AFAICT, striping DLLs do not affect the symbols that they
export.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12  7:41                       ` Jason Tishler
@ 2001-03-12  8:54                         ` Christopher Faylor
  0 siblings, 0 replies; 39+ messages in thread
From: Christopher Faylor @ 2001-03-12  8:54 UTC (permalink / raw)
  To: cygwin

On Mon, Mar 12, 2001 at 10:47:32AM -0500, Jason Tishler wrote:
>I strip DLLs (including cygwin1.dll) all the time without any ill
>effect.  AFAICT, striping DLLs do not affect the symbols that they
>export.

That is correct.

cgf

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-11 20:32                 ` Jason Tishler
  2001-03-12  1:23                   ` Gerrit P. Haase
@ 2001-03-13  0:36                   ` Gerrit P. Haase
  2001-03-13  6:53                     ` Jason Tishler
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-13  0:36 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-11 23:39 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >


Still no luck, no -s flag, -DUSE_DL_IMPORT, but the extensions did not build.

gcc -shared -Wl,--enable-auto-image-base -DUSE_DL_IMPORT build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/fpectlmodule.o -L. -L/usr/local/lib -lpython2.1 -o build/lib.cy
gwin_nt-4.0-1.1.8-i686-2.1/fpectl.dll
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/fpectlmodule.o(.text+0x38):fpectlmodule.c: undefined reference to `_Py_NoneStruct'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/fpectlmodule.o(.text+0x3d):fpectlmodule.c: undefined reference to `_Py_NoneStruct'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/fpectlmodule.o(.text+0xa9):fpectlmodule.c: undefined reference to `_Py_NoneStruct'
build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/fpectlmodule.o(.text+0xae):fpectlmodule.c: undefined reference to `_Py_NoneStruct'
collect2: ld returned 1 exit status
WARNING: building of extension "fpectl" failed: command 'gcc' failed with exit status 1

Gerrit

-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12  1:23                   ` Gerrit P. Haase
  2001-03-12  1:40                     ` Robert Collins
@ 2001-03-13  3:16                     ` Gerrit P. Haase
  2001-03-13  6:46                       ` Jason Tishler
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-13  3:16 UTC (permalink / raw)
  To: cygwin

<2001-03-12 10:23 Uhr, hat Gerrit P. Haase geschrieben:>
< Re: python 2.0, cygwin & readline - >

Hi Jason,

> CCSHARED=	-DUSE_DL_IMPORT

CCSHARED is set in my Makefile, but it is never used. Why not?

Gerrit
-- 
haase@convey.de
KeyID: 0xC8C9D69A = 57C8 1B1D CFE4 8515 AA3E  4499 A326 0F3C C8C9 D69A

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-13  3:16                     ` Gerrit P. Haase
@ 2001-03-13  6:46                       ` Jason Tishler
  2001-03-13 15:33                         ` Gerrit P. Haase
  0 siblings, 1 reply; 39+ messages in thread
From: Jason Tishler @ 2001-03-13  6:46 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Tue, Mar 13, 2001 at 12:13:56PM +0100, Gerrit P. Haase wrote:
> <2001-03-12 10:23 Uhr, hat Gerrit P. Haase geschrieben:>
> < Re: python 2.0, cygwin & readline - >
> 
> Hi Jason,
> 
> > CCSHARED=	-DUSE_DL_IMPORT
> 
> CCSHARED is set in my Makefile, but it is never used. Why not?

Distutils *should* be picking up the CCSHARED value and using during
extension building.  I'm not sure why it's not doing this for your setup.

BTW, do you have any Python 2.0 installations lying around?  Maybe
distutils is accidentally picking up that one and getting confused.

On Tue, Mar 13, 2001 at 12:43:47AM -0500, Jason Tishler wrote:
> On Mon, Mar 12, 2001 at 08:17:16PM +0100, Gerrit P. Haase wrote:
> > Just need to figure out, why the flags are not passed to build the
> > extensions.
> 
> Yes!  Why CCSHARED is not being used during the building of the
> extensions
> (i.e., by distutils) is the crux of your problem.
> 
> Note that your problem is really a Python distutils problem.  So, you
> may have better luck at distutils-sig@python.org then here.  Don't
> worry -- I'm subscribed to that one too! :,)

This is why I suggested posting to the Distutils mailing list.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-13  0:36                   ` Gerrit P. Haase
@ 2001-03-13  6:53                     ` Jason Tishler
  2001-03-13  7:39                       ` Gerrit P. Haase
  2001-03-13  8:26                       ` Gerrit P. Haase
  0 siblings, 2 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-13  6:53 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Tue, Mar 13, 2001 at 09:36:07AM +0100, Gerrit P. Haase wrote:
> Still no luck, no -s flag, -DUSE_DL_IMPORT, but the extensions did not build.
> 
> gcc -shared -Wl,--enable-auto-image-base -DUSE_DL_IMPORT build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/fpectlmodule.o -L. -L/usr/local/lib -lpython2.1 -o build/lib.cygwin_nt-4.0-1.1.8-i686-2.1/fpectl.dll
> build/temp.cygwin_nt-4.0-1.1.8-i686-2.1/fpectlmodule.o(.text+0x38):fpectlmodule.c: undefined reference to `_Py_NoneStruct'
> [snip]
> collect2: ld returned 1 exit status
> WARNING: building of extension "fpectl" failed: command 'gcc' failed with exit status 1

The -DUSE_DL_IMPORT option is supposed to be used during compilation
*not* linking.  Hence, the variable used is CCSHARED not LINKFORSHARED.

The following is my output for fpectl:

building 'fpectl' extension
gcc -g -O2 -Wall -Wstrict-prototypes -DUSE_DL_IMPORT -I. -I/home/jt/src/PythonCvs/./Include -IInclude/ -I/usr/local/include -c /home/jt/src/PythonCvs/Modules/fpectlmodule.c -o build/temp.cygwin_nt-4.0-1.3.0-i686-2.1/fpectlmodule.o
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin_nt-4.0-1.3.0-i686-2.1/fpectlmodule.o -L. -L/usr/local/lib -lpython2.1 -o build/lib.cygwin_nt-4.0-1.3.0-i686-2.1/fpectl.dll

If you manually build as above, does this (temporarily) workaround
your problem?

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-13  6:53                     ` Jason Tishler
@ 2001-03-13  7:39                       ` Gerrit P. Haase
  2001-03-13  8:26                       ` Gerrit P. Haase
  1 sibling, 0 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-13  7:39 UTC (permalink / raw)
  To: cygwin; +Cc: Jason Tishler

<2001-03-13 9:55 Uhr, hat Jason Tishler geschrieben:>
< Re: python 2.0, cygwin & readline - >

Jason,

excuse me for sending you PM, but my last mail an hour ago seemed not
to arrive the list.

> The following is my output for fpectl:
> 
> building 'fpectl' extension
> gcc -g -O2 -Wall -Wstrict-prototypes -DUSE_DL_IMPORT -I. -I/home/jt/src/PythonCvs/./Include -IInclude/ -I/usr/local/include -c /home/jt/src/PythonCvs/Modules/fpectlmodule.c -o build/temp.cygwin_nt-4.0-1.3.0-i686-2.1/fpectlmodule.o
> gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin_nt-4.0-1.3.0-i686-2.1/fpectlmodule.o -L. -L/usr/local/lib -lpython2.1 -o build/lib.cygwin_nt-4.0-1.3.0-i686-2.1/fpectl.dll
> 
> If you manually build as above, does this (temporarily) workaround
> your problem?

Yes, i did so, but my mail got lost it seems.

Here again my lost lines. (Still some flags are wrong, but it builds.):

Now i played around and i figured out, that -lpython2.1 is not recognized.

I changed it to /src/Python-2.1b1/libpython2.1.dll and it works.

administrator@ISMENE /src/Python-2.1b1
$ gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin_nt-4.0-1.1.8-i586-
2.1/fpectlmodule.o -L. -L/usr/local/lib /src/Python-2.1b1/libpython2.1.dll -o 
build/lib.cygwin_nt-4.0-1.1.8-i586-2.1/fpectl.dll

administrator@ISMENE /src/Python-2.1b1
$

What should i say? I don't know why this is so (see -L.), but now i got my 
extensions, after building by hand.

Ciao,

Gerrit

-- 
haase@convey.de
KeyID: 0xC8C9D69A = 57C8 1B1D CFE4 8515 AA3E  4499 A326 0F3C C8C9 D69A

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-13  6:53                     ` Jason Tishler
  2001-03-13  7:39                       ` Gerrit P. Haase
@ 2001-03-13  8:26                       ` Gerrit P. Haase
  2001-03-13 11:17                         ` Norman Vine
  2001-03-14 13:32                         ` Jason Tishler
  1 sibling, 2 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-13  8:26 UTC (permalink / raw)
  To: Jason Tishler, cygwin

<2001-03-13 9:55 Uhr, hat Jason Tishler geschrieben:>
< Re: python 2.0, cygwin & readline - >

Yuhuu, it works,

sorry again, for this PM, but i get no mails back which i sent to the list.

Thanks for all the help...

Still one unanswered question: Why got the flag not passed for you, but for you?

$ PYTHONPATH= ./python.exe -tt ./Lib/test/regrtest.py -l -x test_poll
test_grammar
test_opcodes
test_operations
[...]
test_zipfile
test_zlib
109 tests OK.
2 tests failed: test_strftime test_time
19 tests skipped: test_al test_cd test_cl test_dbm test_dl test_fcntl test_fork1 
test_gl test_imgfile test_largefile test_linuxaudiodev test_nis test_openpty 
test_pty test_sunaudiodev test_thread test_threadedtempfile test_winreg 
test_winsound


Ciao,

Gerrit

-- 
haase@convey.de
KeyID: 0xC8C9D69A = 57C8 1B1D CFE4 8515 AA3E  4499 A326 0F3C C8C9 D69A

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* RE: python 2.0, cygwin & readline - undefined symbols
  2001-03-13  8:26                       ` Gerrit P. Haase
@ 2001-03-13 11:17                         ` Norman Vine
  2001-03-13 15:47                           ` Gerrit P. Haase
  2001-03-14 13:32                         ` Jason Tishler
  1 sibling, 1 reply; 39+ messages in thread
From: Norman Vine @ 2001-03-13 11:17 UTC (permalink / raw)
  To: cygwin

Gerrit P. Haase writes:

>< Re: python 2.0, cygwin & readline - >
>
>Yuhuu, it works,
>
>$ PYTHONPATH= ./python.exe -tt ./Lib/test/regrtest.py -l -x test_poll

>2 tests failed: test_strftime test_time

FYI
the poll function still has problems and was specifically omitted
from your regression test above < -x test_poll in command line >

This trivial patch solves the time module problem < timezone related >
http://sourceforge.net/tracker/index.php?func=detail&aid=407758&group_id=547
0&atid=305470

the 'strftime' issue appears to be a newlib problem that I am looking into.

the 'poll' issues are, I am sorry to say, still a little beyond me.

If anyone familiar with the inner workings of the Cygwin polling
mechanism is interested in helping,  I will do all I can to help.

The relevant Python source lives in $PY_SRC / Modules / selectmodule.c
bracketed within   #ifdef HAVE_POLL      #endif

Once we get these two modules working all that will be missing from
a 100% Posix Python port will be threading.

Cheers

Norman Vine


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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-13  6:46                       ` Jason Tishler
@ 2001-03-13 15:33                         ` Gerrit P. Haase
  0 siblings, 0 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-13 15:33 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-13 9:46 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

> BTW, do you have any Python 2.0 installations lying around?  Maybe
> distutils is accidentally picking up that one and getting confused.

No, actually, yes, ActivePython, but windows environment is not in 
the standard search paths, and i removed several mounts the last days,
for some other issues, and got the same trouble today.

I did a shot at Python-2.1a last week, but that did not work (same cause?)

Ciao,

Gerrit


-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* RE: python 2.0, cygwin & readline - undefined symbols
  2001-03-13 11:17                         ` Norman Vine
@ 2001-03-13 15:47                           ` Gerrit P. Haase
  2001-03-14 12:48                             ` Jason Tishler
  0 siblings, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-13 15:47 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-13 14:14 wars, als Norman Vine schrieb:>

> >Yuhuu, it works,

One question:

At the end of install, i got this message:

warning: install: modules installed to '/usr/local/lib/python2.1/lib-dynload/',
which is not in Python's module search path (sys.path) -- you'll have to change
the search path yourself

 where should i change that path?

Gerrit


-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-13 15:47                           ` Gerrit P. Haase
@ 2001-03-14 12:48                             ` Jason Tishler
  2001-03-14 14:17                               ` Gerrit P. Haase
  0 siblings, 1 reply; 39+ messages in thread
From: Jason Tishler @ 2001-03-14 12:48 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Wed, Mar 14, 2001 at 12:46:56AM +0100, Gerrit P. Haase wrote:
> One question:
> 
> At the end of install, i got this message:
> 
> warning: install: modules installed to '/usr/local/lib/python2.1/lib-dynload/',
> which is not in Python's module search path (sys.path) -- you'll have to change
> the search path yourself
> 
>  where should i change that path?

No need to change your search path.  You can safely ignore this warning.
At least I do!

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-13  8:26                       ` Gerrit P. Haase
  2001-03-13 11:17                         ` Norman Vine
@ 2001-03-14 13:32                         ` Jason Tishler
  2001-03-14 14:24                           ` Gerrit P. Haase
  2001-03-14 14:33                           ` Gerrit P. Haase
  1 sibling, 2 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-14 13:32 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Tue, Mar 13, 2001 at 05:23:42PM +0100, Gerrit P. Haase wrote:
> Still one unanswered question: Why got the flag not passed for you, but for you?

Please execute the following:

    python -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars()["CCSHARED"]'

I get the following:

    -DUSE_DL_IMPORT

What do you get?

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-14 12:48                             ` Jason Tishler
@ 2001-03-14 14:17                               ` Gerrit P. Haase
  0 siblings, 0 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-14 14:17 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-14 15:48 wars, als Jason Tishler schrieb:>

> > At the end of install, i got this message:
> > 
> > warning: install: modules installed to '/usr/local/lib/python2.1/lib-dynload/',
> > which is not in Python's module search path (sys.path) -- you'll have to change
> > the search path yourself
> > 
> >  where should i change that path?
> 
> No need to change your search path.  You can safely ignore this warning.
> At least I do!

Well, i set a variable in ENV, PYTHONPATH, i think this should make it.

Thanks,

Ciao,

Gerrit


-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-14 13:32                         ` Jason Tishler
@ 2001-03-14 14:24                           ` Gerrit P. Haase
  2001-03-14 18:35                             ` Jason Tishler
  2001-03-14 14:33                           ` Gerrit P. Haase
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-14 14:24 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-14 16:32 wars, als Jason Tishler schrieb:>

Jason,

> > Still one unanswered question: Why got the flag not passed for you, but for you?
> 
> Please execute the following:
> 
>     python -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars()["CCSHARED"]'
> 
> I get the following:
> 
>     -DUSE_DL_IMPORT
> 
> What do you get?

Now after building by hand *with* this flag, it should not be different:

bash-2.04$ python -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars()["CCSHARED"]'
-DUSE_DL_IMPORT

Ciao,

Gerrit

-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-14 13:32                         ` Jason Tishler
  2001-03-14 14:24                           ` Gerrit P. Haase
@ 2001-03-14 14:33                           ` Gerrit P. Haase
  1 sibling, 0 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-14 14:33 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-14 16:32 wars, als Jason Tishler schrieb:>

> Gerrit,
> 
> On Tue, Mar 13, 2001 at 05:23:42PM +0100, Gerrit P. Haase wrote:
>> Still one unanswered question: Why got the flag not passed for me,
>> but for you?

They are setup in the M<akefile: CCSHARED=	-DUSE_DL_IMPORT

I even customized sysconfig.py, the flags are searched here, but they
don't come through, til gcc starts compiling.

def customize_compiler (compiler):
    """Do any platform-specific customization of the CCompiler instance
    'compiler'.  Mainly needed on Unix, so we can plug in the information
    that varies across Unices and is stored in Python's Makefile.
    """
    if compiler.compiler_type in ["unix", "cygwin"]:
        (cc, opt, ccshared, ldshared, so_ext) = \
            get_config_vars('CC', 'OPT', 'CCSHARED', 'LDSHARED', 'SO')

        cc_cmd = cc + ' ' + opt
        compiler.set_executables(
            preprocessor=cc + " -E",    # not always!
            compiler=cc_cmd,
            compiler_so=cc_cmd + ' ' + ccshared,
            linker_so=ldshared,
            linker_exe=cc)

        compiler.shared_lib_extension = so_ext

Gerrit


-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-14 14:24                           ` Gerrit P. Haase
@ 2001-03-14 18:35                             ` Jason Tishler
  0 siblings, 0 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-14 18:35 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Wed, Mar 14, 2001 at 11:24:40PM +0100, Gerrit P. Haase wrote:
> Now after building by hand *with* this flag, it should not be different:

What I should have asked was for you to do the following:

    $ cd Python-2.1b1
    $ ./python -c 'import distutils.sysconfig; print distutils.sysconfig.get_config_vars()["CCSHARED"]'

The above should be valid *even* before any extension is built.  Plus it
executes the python.exe in the build directory instead of the installation
directory.  This is what I was really after.

Do you still get "-DUSE_DL_IMPORT"?

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12 21:37     ` Jason Tishler
  2001-03-13  0:42       ` Gerrit P. Haase
@ 2001-03-16  5:43       ` Jason Tishler
  1 sibling, 0 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-16  5:43 UTC (permalink / raw)
  To: Gerrit P. Haase, Norman Vine, cygwin

On Tue, Mar 13, 2001 at 12:43:47AM -0500, Jason Tishler wrote:
> However, there
> is (minor) problem with make install when ntsec is enabled as pointed
> out by Norman above.  I will be submitting the attached patch to Python
> CVS to correct this.

The above patch has been submitted and accepted into Python CVS.  If
interested, see the follow for details:

    http://sourceforge.net/tracker/?func=detail&atid=305470&aid=408696&group_id=5470

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12 21:37     ` Jason Tishler
@ 2001-03-13  0:42       ` Gerrit P. Haase
  2001-03-16  5:43       ` Jason Tishler
  1 sibling, 0 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-13  0:42 UTC (permalink / raw)
  To: Norman Vine, cygwin

<Am 2001-03-13 0:43 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - >

Jason,

> > Yep, that is the point, i did: 'chmod 777 libpython2.1.dll' and now, 
> > python works for me:-)
> 
> I just built Python CVS with and without ntsec enabled.  There is no
> difference -- both builds succeed without any failures.  

I agree, makes no difference for me, too.

> However, there
> is (minor) problem with make install when ntsec is enabled as pointed
> out by Norman above.  I will be submitting the attached patch to Python
> CVS to correct this.
> 
> > Just need to figure out, why the flags are not passed to build the
> > extensions.
> 
> Yes!  Why CCSHARED is not being used during the building of the extensions
> (i.e., by distutils) is the crux of your problem.
> 
> Note that your problem is really a Python distutils problem.  So, you
> may have better luck at distutils-sig@python.org then here.  Don't worry
> -- I'm subscribed to that one too! :,)

Hmmm, i should take a look. 
Maybe it makes sense to get a snapshot from CVS, are the sources there
more up to date?

Ciao,

Gerrit


-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12 17:10     ` Gerrit P. Haase
@ 2001-03-12 21:41       ` Jason Tishler
  0 siblings, 0 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-12 21:41 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: cygwin

Gerrit,

On Tue, Mar 13, 2001 at 02:10:23AM +0100, Gerrit P. Haase wrote:
> $ ls -l lib*
> -rwxrwxrwx   1 siebensc Administ   801792 Mar 11 15:31 libperl5_7_0.dll
> -rw-r--r--   1 siebensc Administ  1667047 Mar 13 01:50 libpython2.1.dll

I presume that your current directory is /usr/local/bin.  If so, then
the permissions of libpython2.1.dll is as expected regardless of the
ntsec setting.  Without the patch in my previous mail, libpython2.1.dll
is installed 644 instead of 555.

Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12 11:17   ` Gerrit P. Haase
  2001-03-12 17:10     ` Gerrit P. Haase
@ 2001-03-12 21:37     ` Jason Tishler
  2001-03-13  0:42       ` Gerrit P. Haase
  2001-03-16  5:43       ` Jason Tishler
  1 sibling, 2 replies; 39+ messages in thread
From: Jason Tishler @ 2001-03-12 21:37 UTC (permalink / raw)
  To: Gerrit P. Haase; +Cc: Norman Vine, cygwin

Gerrit,

On Mon, Mar 12, 2001 at 08:17:16PM +0100, Gerrit P. Haase wrote:
> > > ><Am 2001-03-11 21:30 wars, als Norman Vine schrieb:>
> > > >< RE: python 2.0, cygwin & readline - undefined sym >
> > > >
> > > >> One thing I have noticed is that if you are installing to a ntsec drive
> > > >> You have to set the executable bits on the dll
> > > >> 
> > > >> /usr/local/bin $  ls -l libpython2.1.dll
> > > >> -rwxr-xr-x   1 nhv      None      1673990 Mar 11 13:47 libpython2.1.dll
> 
> Yep, that is the point, i did: 'chmod 777 libpython2.1.dll' and now, 
> python works for me:-)

I just built Python CVS with and without ntsec enabled.  There is no
difference -- both builds succeed without any failures.  However, there
is (minor) problem with make install when ntsec is enabled as pointed
out by Norman above.  I will be submitting the attached patch to Python
CVS to correct this.

> Just need to figure out, why the flags are not passed to build the
> extensions.

Yes!  Why CCSHARED is not being used during the building of the extensions
(i.e., by distutils) is the crux of your problem.

Note that your problem is really a Python distutils problem.  So, you
may have better luck at distutils-sig@python.org then here.  Don't worry
-- I'm subscribed to that one too! :,)

Thanks,
Jason

-- 
Jason Tishler
Director, Software Engineering       Phone: +1 (732) 264-8770 x235
Dot Hill Systems Corp.               Fax:   +1 (732) 264-8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
  2001-03-12 11:17   ` Gerrit P. Haase
@ 2001-03-12 17:10     ` Gerrit P. Haase
  2001-03-12 21:41       ` Jason Tishler
  2001-03-12 21:37     ` Jason Tishler
  1 sibling, 1 reply; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-12 17:10 UTC (permalink / raw)
  To: cygwin

<Am 2001-03-12 20:17 wars, als Gerrit P. Haase schrieb:>
< Re: python 2.0, cygwin & readline - >

> > > >> One thing I have noticed is that if you are installing to a ntsec drive
> > > >> You have to set the executable bits on the dll
[...]
> > > >Wow , thats true:
> > > >
> > > >-rw-r--r--   1 siebensc Administ  1667047 Mar 12 04:24 libpython2.1.dll
> > 
> > Huh?  Are you saying that with ntsec enabled, Cygwin Python does not
> > function properly unless you chmod +x libpython2.1.dll?  AFAICT, this
> > should have no affect since it is Windows that is loading libpython2.1.dll
> > not Cygwin.
> > 
> > Gerrit,
> > 
> > Do you have ntsec enabled?  And if so, does chmod +x libpython2.1.dll
> > solve your build problem?
> 
> Yep, that is the point, i did: 'chmod 777 libpython2.1.dll' and now, 
> python works for me:-)

Well, now with nontsec, i got still the same issue, i doesn't depend
on CYGWIN setting i suggest.

$ set
CYGWIN='binmode tty ntea nontsec'

$ ls -l lib*
-rwxrwxrwx   1 siebensc Administ   801792 Mar 11 15:31 libperl5_7_0.dll
-rw-r--r--   1 siebensc Administ  1667047 Mar 13 01:50 libpython2.1.dll



-- 
=^..^= gerrit.haase@t-online.de
PGP-Key: 0x28A05137 [875C 745E 01CF 8A34 2767  BE39 305E 5261 28A0 5137]

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

* Re: python 2.0, cygwin & readline - undefined symbols
       [not found] ` <20010312104136.C1224@dothill.com>
@ 2001-03-12 11:17   ` Gerrit P. Haase
  2001-03-12 17:10     ` Gerrit P. Haase
  2001-03-12 21:37     ` Jason Tishler
  0 siblings, 2 replies; 39+ messages in thread
From: Gerrit P. Haase @ 2001-03-12 11:17 UTC (permalink / raw)
  To: Jason Tishler, Norman Vine; +Cc: cygwin

<Am 2001-03-12 10:41 wars, als Jason Tishler schrieb:>
< Re: python 2.0, cygwin & readline - undefined sym >

Jason,

> Norman,
> 
> On Mon, Mar 12, 2001 at 05:11:12AM -0500, Norman Vine wrote:
> > Gerrit P. Haase writes:
> > >
> > ><Am 2001-03-11 21:30 wars, als Norman Vine schrieb:>
> > >< RE: python 2.0, cygwin & readline - undefined sym >
> > >
> > >> One thing I have noticed is that if you are installing to a ntsec drive
> > >> You have to set the executable bits on the dll
> > >> 
> > >> /usr/local/bin $  ls -l libpython2.1.dll
> > >> -rwxr-xr-x   1 nhv      None      1673990 Mar 11 13:47 
> > >libpython2.1.dll
> > >
> > >Wow , thats true:
> > >
> > >-rw-r--r--   1 siebensc Administ  1667047 Mar 12 04:24 libpython2.1.dll
> > 
> > Please mention this in your ongoing thread on the Cygwin list
> > for archival purposes so that others may benefit also 
> 
> Huh?  Are you saying that with ntsec enabled, Cygwin Python does not
> function properly unless you chmod +x libpython2.1.dll?  AFAICT, this
> should have no affect since it is Windows that is loading libpython2.1.dll
> not Cygwin.
> 
> Gerrit,
> 
> Do you have ntsec enabled?  And if so, does chmod +x libpython2.1.dll
> solve your build problem?

Yep, that is the point, i did: 'chmod 777 libpython2.1.dll' and now, 
python works for me:-)

Just need to figure out, why the flags are not passed to build the
extensions.

Ciao,

Gerrit

-- 
# perl is so cool.
Gerald Oskoboiny, validator source

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

^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2001-03-16  5:43 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-02-21 17:42 python 2.0, cygwin & readline - undefined symbols David Peterson
2001-02-21 18:53 ` Jason Tishler
2001-03-10  5:39   ` Gerrit P. Haase
2001-03-10  5:49   ` Gerrit P. Haase
2001-03-10  8:20     ` Charles S. Wilson
2001-03-10 10:06       ` Gerrit P. Haase
2001-03-10 19:28         ` Jason Tishler
2001-03-11  6:33           ` Gerrit P. Haase
2001-03-11  9:07           ` Gerrit P. Haase
2001-03-11 14:45             ` Jason Tishler
2001-03-11 18:00               ` Gerrit P. Haase
2001-03-11 20:32                 ` Jason Tishler
2001-03-12  1:23                   ` Gerrit P. Haase
2001-03-12  1:40                     ` Robert Collins
2001-03-12  7:41                       ` Jason Tishler
2001-03-12  8:54                         ` Christopher Faylor
2001-03-13  3:16                     ` Gerrit P. Haase
2001-03-13  6:46                       ` Jason Tishler
2001-03-13 15:33                         ` Gerrit P. Haase
2001-03-13  0:36                   ` Gerrit P. Haase
2001-03-13  6:53                     ` Jason Tishler
2001-03-13  7:39                       ` Gerrit P. Haase
2001-03-13  8:26                       ` Gerrit P. Haase
2001-03-13 11:17                         ` Norman Vine
2001-03-13 15:47                           ` Gerrit P. Haase
2001-03-14 12:48                             ` Jason Tishler
2001-03-14 14:17                               ` Gerrit P. Haase
2001-03-14 13:32                         ` Jason Tishler
2001-03-14 14:24                           ` Gerrit P. Haase
2001-03-14 18:35                             ` Jason Tishler
2001-03-14 14:33                           ` Gerrit P. Haase
2001-03-11 18:02               ` Gerrit P. Haase
2001-03-11 20:34                 ` Jason Tishler
     [not found] <000401c0aadc$c4be3260$a300a8c0@nhv>
     [not found] ` <20010312104136.C1224@dothill.com>
2001-03-12 11:17   ` Gerrit P. Haase
2001-03-12 17:10     ` Gerrit P. Haase
2001-03-12 21:41       ` Jason Tishler
2001-03-12 21:37     ` Jason Tishler
2001-03-13  0:42       ` Gerrit P. Haase
2001-03-16  5:43       ` Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).