Issue 955197: CFLAGS, CPPFLAGS, LDFLAGS are NOT used when building modules (original) (raw)

Issue955197

Created on 2004-05-17 10:36 by nikiwaibel, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg20820 - (view) Author: Niki W. Waibel (nikiwaibel) Date: 2004-05-17 10:36
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.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).
msg20821 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-11-07 01:30
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).
msg20822 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2004-12-07 00:47
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.
History
Date User Action Args
2022-04-11 14:56:04 admin set github: 40262
2004-05-17 10:36:04 nikiwaibel create