[ python-Bugs-955197 ] CFLAGS, CPPFLAGS,
LDFLAGS are NOT used when building modules
SourceForge.net
noreply at sourceforge.net
Tue Dec 7 01:47:04 CET 2004
Bugs item #955197, was opened at 2004-05-17 03:36
Message generated for change (Comment added) made by bcannon
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=955197&group_id=5470
Category: Build
>Group: Python 2.5
>Status: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Niki W. Waibel (nikiwaibel)
Assigned to: Brett Cannon (bcannon)
Summary: CFLAGS, CPPFLAGS, LDFLAGS are NOT used when building modules
Initial Comment:
i am trying to compile python in solaris 2.8.
ncurses incl files and libs are not in theis usual places (/usr/include,
/usr/lib)! so i usually set CPPFLAGS, CFLAGS, LDFLAGS and
LD_RUN_PATH when compiling programs. that works nicely if all of
the automake, autoconf and libtool machinery is used. but it seems that
the python team has decided to do sthg unusual when building the
modules...
===
building '_curses' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC
-fno-strict-aliasing -I. -I/tmp/Python-2.3.3/./Include -I/tmp/Python-2.3.
3/Include -I/tmp/Python-2.3.3 -c /tmp/Python-2.3.
3/Modules/_cursesmodule.c -o build/temp.solaris-2.8-sun4u-2.
3/_cursesmodule.o
In file included from /tmp/Python-2.3.3/Modules/_cursesmodule.c:113:
/tmp/Python-2.3.3/./Include/py_curses.h:43:21: ncurses.h: No such file
or directory
===
adding CPPFLAGS or CFLAGS to the compile command would sort
things out. the same thing happens to other modules as well (bz2 ie).
----------------------------------------------------------------------
>Comment By: Brett Cannon (bcannon)
Date: 2004-12-06 16:47
Message:
Logged In: YES
user_id=357491
rev. 1.205 of setup.py and rev. 1.149 of Makefile.pre.in allow extension
modules to be compiled with the directories specified in LDFLAGS and
CPPFLAGS. As for CFLAGS, that gets trickier. For that situation I would
set OPT or BASECFLAGS when running configure (be careful of the latter,
though, since you really are not supposed to play with that).
Considering this bug closed and fixed.
----------------------------------------------------------------------
Comment By: Brett Cannon (bcannon)
Date: 2004-11-06 17:30
Message:
Logged In: YES
user_id=357491
It's too late for 2.4, but I will get this in for 2.5 . I will try to add support
for CC, CFLAGS, LDFLAGS, CPPFLAGS, and CPP (all of the environment
variables listed by ``./configure -h``).
Basically the problem is that setup.py does not check these. If you need
a quick fix than just add the directories yourself (grep for Fink or
DarwinPorts in setup.py to see the function calls).
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=955197&group_id=5470
More information about the Python-bugs-list
mailing list