How to build pygobject for custom installation of Python? -


for own reasons have installed python3.3 source on debian wheezy. want add modules it, including pygobject (gi.repository, etc). of software want working , installed on same machine python3.2 (the default python3 on wheezy).

i can point python3.3 generic /usr/lib/python3/dist-packages pick already-installed python3.2 code manipulating pythonpath, (of course?) fails import correctly. so, figured needed build pygobject source python3.3.

having obtained wheezy source package pygobject tried following, pointing configuration python3.3 installation , executable in downloaded pygobject directory:

$ python=/usr/local/bin/python3.3 $ export python $ ./configure --prefix=/usr/local 

the output of follows:

checking whether make supports nested variables... yes checking bsd-compatible install... /usr/bin/install -c checking whether build environment sane... yes checking thread-safe mkdir -p... /bin/mkdir -p checking gawk... no checking mawk... mawk checking whether make sets $(make)... yes checking whether enable maintainer-specific portions of makefiles... yes checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking win32 platform... no checking native win32... no checking how print strings... printf checking style of include used make... gnu checking gcc... gcc checking whether c compiler works... yes checking c compiler default output file name... a.out checking suffix of executables...  checking whether cross compiling... no checking suffix of object files... o checking whether using gnu c compiler... yes checking whether gcc accepts -g... yes checking gcc option accept iso c89... none needed checking dependency style of gcc... gcc3 checking sed not truncate output... /bin/sed checking grep handles long lines , -e... /bin/grep checking egrep... /bin/grep -e checking fgrep... /bin/grep -f checking ld used gcc... /usr/bin/ld checking if linker (/usr/bin/ld) gnu ld... yes checking bsd- or ms-compatible name lister (nm)... /usr/bin/nm -b checking name lister (/usr/bin/nm -b) interface... bsd nm checking whether ln -s works... yes checking maximum length of command line arguments... 1572864 checking whether shell understands xsi constructs... yes checking whether shell understands "+="... yes checking how convert x86_64-unknown-linux-gnu file names x86_64-unknown-linux-gnu format... func_convert_file_noop checking how convert x86_64-unknown-linux-gnu file names toolchain format... func_convert_file_noop checking /usr/bin/ld option reload object files... -r checking objdump... objdump checking how recognize dependent libraries... pass_all checking dlltool... dlltool checking how associate runtime , link libraries... printf %s\n checking ar... ar checking archiver @file support... @ checking strip... strip checking ranlib... ranlib checking command parse /usr/bin/nm -b output gcc object... ok checking sysroot... no checking mt... mt checking if mt manifest tool... no checking how run c preprocessor... gcc -e checking ansi c header files... yes checking sys/types.h... yes checking sys/stat.h... yes checking stdlib.h... yes checking string.h... yes checking memory.h... yes checking strings.h... yes checking inttypes.h... yes checking stdint.h... yes checking unistd.h... yes checking dlfcn.h... yes checking objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking gcc option produce pic... -fpic -dpic checking if gcc pic flag -fpic -dpic works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should explicitly linked in... no checking dynamic linker characteristics... gnu/linux ld.so checking how hardcode library paths programs... immediate checking whether stripping libraries possible... yes checking if libtool supports shared libraries... yes checking whether build shared libraries... yes checking whether build static libraries... no configure: creating ./config.lt config.lt: creating libtool checking library containing strerror... none required checking gcc... (cached) gcc checking whether using gnu c compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking gcc option accept iso c89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking gcc... (cached) gcc checking whether using gnu c compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking gcc option accept iso c89... (cached) none needed checking dependency style of gcc... (cached) gcc3 checking whether gcc , cc understand -c , -o together... yes checking whether /usr/local/bin/python3.3 version >= 2.5.2... yes checking /usr/local/bin/python3.3 version... 3.3 checking /usr/local/bin/python3.3 platform... linux checking /usr/local/bin/python3.3 script directory... ${prefix}/lib/python3.3/site-packages checking /usr/local/bin/python3.3 extension module directory... ${exec_prefix}/lib/python3.3/site-packages checking /usr/local/bin/python3.3 >= 3.1... yes checking python version... (cached) 3.3 checking python platform... (cached) linux checking python script directory... (cached) ${prefix}/lib/python3.3/site-packages checking python extension module directory... (cached) ${exec_prefix}/lib/python3.3/site-packages checking headers required compile python extensions... not found configure: error: python headers not found 

i have checked packages python-dev , python3-dev installed, of course these intended default wheezy pythons of python2.7 , python3.2, respectively. so, how change configuration pick correct headers python3.3?

in case relevant, exact version numbers follows: python-3.3.6, pygobject-3.2.2.

the config.log file in build directory useful sorting out.

the python3.3 headers installed in /usr/local/include/python3.3m, pygobject build process looking in wrong place, in /usr/local/include/python3.3 (missing m). correct configuration needs adapt environment flag:

$ python=/usr/local/bin/python3.3 $ export python $ cppflags=-i/usr/local/include/python3.3m $ export cppflags $ ./configure --prefix=/usr/local 

additional issues when libraries cannot found can resolved configuring pkg_config_path, using colons separators if more 1 needs specified (see answers question examples). on debian, needed following additional lines before running ./configure:

$ pkg_config_path=/usr/lib/pkgconfig $ export pkg_config_path 

Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -