kpdyer / fteproxy

programmable proxy for censorship circumvention
https://fteproxy.org/
Apache License 2.0
149 stars 21 forks source link

On cygwin "make" for fteproxy results in "/usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lboost_python" error #80

Closed kpdyer closed 10 years ago

kpdyer commented 10 years ago
$ make
python setup.py build_ext --inplace
running build_ext
building 'fte.cDFA' extension
C:\cygwin\bin\gcc.exe -mdll -O -Wall -Ifte -I/usr/local/include -Ithirdparty/re2 -IC:\Python27\include -IC:\Python27\PC -c fte/cDFA.cc -o build\temp.win32-2.7\Release\fte\cdfa.o -O3 -fstack-protector-all -D_FORTIFY_SOURCE -fPIE
fte/cDFA.cc:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
In file included from /usr/local/include/boost/python/object/make_instance.hpp:9:0,
                 from /usr/local/include/boost/python/object/make_ptr_instance.hpp:8,
                 from /usr/local/include/boost/python/to_python_indirect.hpp:11,
                 from /usr/local/include/boost/python/converter/arg_to_python.hpp:10,
                 from /usr/local/include/boost/python/call.hpp:15,
                 from /usr/local/include/boost/python/object_core.hpp:14,
                 from /usr/local/include/boost/python/args.hpp:25,
                 from /usr/local/include/boost/python/make_function.hpp:11,
                 from /usr/local/include/boost/python/def.hpp:11,
                 from fte/cDFA.cc:23:
/usr/local/include/boost/python/object/instance.hpp:14:36: warning: type attributes ignored after type is already defined [-Wattributes]
writing build\temp.win32-2.7\Release\fte\cDFA.def
C:\cygwin\bin\g++.exe -shared -s build\temp.win32-2.7\Release\fte\cdfa.o build\temp.win32-2.7\Release\fte\cDFA.def -Lthirdparty/re2/obj -LC:\Python27\libs -LC:\Python27\PCbuild -lgmp -lgmpxx -lre2 -lboost_python-mt -lboost_system -lboost_filesystem -lpython2.7 -lpython27 -lmsvcr90 -o C:\cygwin\vagrant\fteproxy\fte\cDFA.pyd -fPIC thirdparty/re2/obj/libre2.a
/usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lboost_python
/usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lboost_system
/usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lboost_filesystem
/usr/lib/gcc/i686-pc-cygwin/4.8.2/../../../../i686-pc-cygwin/bin/ld: cannot find -lmsvcr90
kpdyer commented 10 years ago

Resolved by installing boost_python

/cygdrive/c/Users/vagrant/Desktop/setup-x86.exe -q -P libboost_python-devel

adding /usr/local/lib to library_dirs in setup. Adding the following symlinks

ln -s /usr/lib/libboost_python-mt.dll.a /usr/local/lib/libboost_python-mt.dll.a
ln -s /usr/lib/libboost_system-mt.dll.a /usr/local/lib/libboost_system-mt.dll.a
ln -s /usr/lib/libboost_filesystem-mt.dll.a /usr/local/lib/libboost_filesystem-mt.dll.a

and appending -mt to the libs on windows when linking.