John Emmas wrote: > I'm trying to build a project (using make) that needs python. Python's link > library is in /lib/python2.5/config/ but unfortunately, 'make' doesn't seem > to be aware of this and fails with the message:-
make doesn't know anything about linker search directories. It just executes commands that are listed in the Makefile, it has no knowledge of their semantics. So the answer depends on how the Makefile was written. In projects that use autoconf, you can define variables when you run configure, e.g. ./configure LDFLAGS="-L/usr/lib/python2.5/config" --enable-foo --with-bar ... If there is no configure script you can still override variables when invoking make, but it becomes less obvious what the correct values are since you have to look at the Makefile to find out what the variable currently contains so that you can know what to set it to. For example, if the final value of LDFLAGS in the Makefile after everything is substituted works out to "-lfoo -lbar -lpython2.5", then you would override it to add the necessary flag, e.g. make LDFLAGS="-lfoo -lbar -L/usr/lib/python2.5/config -lpython2.5" This is a pain, it's much simpler with the autoconf method because the starting value of LDFLAGS is empty and autoconf adds on things to the user's setting. With make overrides you have to include the full final value with your addition added on, which can be nontrivial to figure out as you have to read through the whole Makefile. And in the autoconf world anyway the configure script is supposed to do the job of determining all of this automatically -- both of which are reasons why shipping a bare Makefile without a configure script is not very portable and unfriendly. I also note that this is supposed to be covered by the python-config script, such that autoconf scripts or Makefiles can query the set of required flags to be added to LDFLAGS/LIBS/CPPFLAGS/etc by the output of python-config. However it seems the Cygwin packaging of python is broken because A) the python-config shebang points to a bogus #!/tmp/python.6884/usr/bin/python2.5.exe, and B) it doesn't include the necessary -L anyway. Brian -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/