Discussion:
Cannot compile Python bindings for librapi2 in SynCE 0.13-RELEASE
Ilya Bakulin
2009-01-11 19:42:38 UTC
Permalink
Hi!
SynCE 0.13 is out, it's time to update Ports Collection... Unfortunately, I've discovered that python bindings for librapi2 don't compile any more. Yet another problem with damned pyrexc...
Pyrexc version used at my system is 0.9.8.5. It's the latest version available in ports.

[/home/kibab/repos/ports-mine/py-synce-librapi2] ***@kibab-nb%make
===> Vulnerability check disabled, database not found
===> Extracting for py25-synce-librapi2-0.13
=> MD5 Checksum OK for librapi2-0.13.tar.gz.
=> SHA256 Checksum OK for librapi2-0.13.tar.gz.
===> Patching for py25-synce-librapi2-0.13
===> Applying FreeBSD patches for py25-synce-librapi2-0.13
===> py25-synce-librapi2-0.13 depends on executable: pyrexc - found
===> py25-synce-librapi2-0.13 depends on file: /usr/local/bin/python2.5 - found
===> py25-synce-librapi2-0.13 depends on file: /usr/local/bin/libtool - found
===> py25-synce-librapi2-0.13 depends on shared library: rapi.2 - found
===> py25-synce-librapi2-0.13 depends on shared library: synce.0 - found
===> py25-synce-librapi2-0.13 depends on shared library: iconv.3 - found
===> Configuring for py25-synce-librapi2-0.13
checking build system type... i386-portbld-freebsd7.1
checking host system type... i386-portbld-freebsd7.1
checking target system type... i386-portbld-freebsd7.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking dependency style of cc... gcc3
checking for an ANSI C-conforming const... yes
checking for gawk... (cached) gawk
checking for gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking dependency style of cc... (cached) gcc3
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln -s works... yes
checking for gcc... (cached) cc
checking whether we are using the GNU C compiler... (cached) yes
checking whether cc accepts -g... (cached) yes
checking for cc option to accept ISO C89... (cached) none needed
checking dependency style of cc... (cached) gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking the maximum length of command line arguments... (cached) 262144
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... no
checking for /usr/bin/ld option to reload object files... -r
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking how to run the C preprocessor... cc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether c++ accepts -g... (cached) yes
checking dependency style of c++... (cached) gcc3
checking how to run the C++ preprocessor... c++ -E
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... freebsd7.1 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for ld used by c++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC... -fPIC -DPIC
checking if c++ PIC flag -fPIC -DPIC works... yes
checking if c++ static flag -static works... yes
checking if c++ supports -c -o file.o... yes
checking if c++ supports -c -o file.o... (cached) yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... freebsd7.1 ld.so
checking how to hardcode library paths into programs... immediate
checking whether make sets $(MAKE)... (cached) yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBSYNCE... yes
configure: Checking to see if we can build Python bindings
checking whether /usr/local/bin/python2.5 version >= 2.3... yes
checking for /usr/local/bin/python2.5 version... 2.5
checking for /usr/local/bin/python2.5 platform... freebsd7
checking for /usr/local/bin/python2.5 script directory... ${prefix}/lib/python2.5/site-packages
checking for /usr/local/bin/python2.5 extension module directory... ${exec_prefix}/lib/python2.5/site-packages
checking for pyrexc... pyrexc
checking for headers required to compile python extensions... found
checking pyrex version... ok
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... -D_THREAD_SAFE
configure: creating ./config.status
config.status: creating script/synce-install-cab
config.status: creating script/synce-remove-program
config.status: creating librapi2.pc
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating src/support/Makefile
config.status: creating src/config/Makefile
config.status: creating src/rapi/Makefile
config.status: creating src/rapi2/Makefile
config.status: creating man/Makefile
config.status: creating script/Makefile
config.status: creating tests/Makefile
config.status: creating tests/CeRapiInvoke/Makefile
config.status: creating tests/rapi/Makefile
config.status: creating tools/Makefile
config.status: creating tools/man/Makefile
config.status: creating python/Makefile
config.status: creating python/tests/Makefile
config.status: creating rapi_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
===> Building for py25-synce-librapi2-0.13
Making all in tests
pyrexc ./pyrapi2.pyx -o ./pyrapi2.c
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:426:36: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:427:28: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:429:32: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:430:28: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:486:45: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:623:32: Calling gil-requiring function without gil
*** Error code 1

Stop in /home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python.
*** Error code 1

Stop in /home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python.
*** Error code 1

Stop in /home/kibab/repos/ports-mine/py-synce-librapi2.
--
Ilya Bakulin <***@kibab.com>
xmpp://***@jabber.ru
Adam Williamson
2009-01-11 23:21:54 UTC
Permalink
Post by Ilya Bakulin
Hi!
SynCE 0.13 is out, it's time to update Ports Collection... Unfortunately, I've discovered that python bindings for librapi2 don't compile any more. Yet another problem with damned pyrexc...
Pyrexc version used at my system is 0.9.8.5. It's the latest version available in ports.
Confirmed here, same problem with Mandriva Cooker...let me poke about
and see if I can fix it...
--
adamw
http://www.happyassassin.net
Adam Williamson
2009-01-11 23:28:55 UTC
Permalink
Post by Adam Williamson
Post by Ilya Bakulin
Hi!
SynCE 0.13 is out, it's time to update Ports Collection... Unfortunately, I've discovered that python bindings for librapi2 don't compile any more. Yet another problem with damned pyrexc...
Pyrexc version used at my system is 0.9.8.5. It's the latest version available in ports.
Confirmed here, same problem with Mandriva Cooker...let me poke about
and see if I can fix it...
Bah, no, I'm no coder.

I mean, you could just take out the "with nogil:" lines in the relevant
places, but presumably they're there for a reason.

This is a discussion of what it's doing wrong:

http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/external.html#Acquiring_and_Releasing_the_GIL

but I can't make much of it. Presumably either the code shouldn't
release the gil (in which case I guess other modifications may be
needed), or what it does after releasing the gil should be adjusted to
be within the rules.
--
adamw
http://www.happyassassin.net
Mark Ellis
2009-01-12 08:43:51 UTC
Permalink
Post by Adam Williamson
Post by Adam Williamson
Post by Ilya Bakulin
Hi!
SynCE 0.13 is out, it's time to update Ports Collection... Unfortunately, I've discovered that python bindings for librapi2 don't compile any more. Yet another problem with damned pyrexc...
Pyrexc version used at my system is 0.9.8.5. It's the latest version available in ports.
Confirmed here, same problem with Mandriva Cooker...let me poke about
and see if I can fix it...
Bah, no, I'm no coder.
I mean, you could just take out the "with nogil:" lines in the relevant
places, but presumably they're there for a reason.
http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/external.html#Acquiring_and_Releasing_the_GIL
but I can't make much of it. Presumably either the code shouldn't
release the gil (in which case I guess other modifications may be
needed), or what it does after releasing the gil should be adjusted to
be within the rules.
--
I hope this gets through, my ISP appears to be having mail problems.

This is caused by additional checking being done in later versions of
pyrex, bah !

I use 0.9.7, which leaves it to the developer to check all functions
called in a nogil sections are nogil safe. It would seem at some point
checks were added so only functions declared as nogil safe are accepted
in a nogil section. Of course the nice way to declare a group of
external functions nogil safe is a relatively recent addition as well,
so I can't use that without requiring a later version.

That's all beside the point. The attached patch should fix the problem.
I've tested it with pyrex 0.9.6, 0.9.7 and 0.9.8.5. Can you guys double
check it works for me, and when confirmed I'll do a 0.13.1 release.

Ta
Mark
Adam Williamson
2009-01-12 19:39:09 UTC
Permalink
Post by Mark Ellis
That's all beside the point. The attached patch should fix the problem.
I've tested it with pyrex 0.9.6, 0.9.7 and 0.9.8.5. Can you guys double
check it works for me, and when confirmed I'll do a 0.13.1 release.
Confirmed, did the trick here. Thanks.
--
adamw
http://www.happyassassin.net
Ilya Bakulin
2009-01-13 06:19:42 UTC
Permalink
On Mon, 12 Jan 2009 08:43:51 +0000
Mark Ellis <***@mpellis.org.uk> wrote:

The attached patch should fix the problem.
Post by Mark Ellis
I've tested it with pyrex 0.9.6, 0.9.7 and 0.9.8.5. Can you guys double
check it works for me, and when confirmed I'll do a 0.13.1 release.
This patch fixed all compile problems. I've also tested synce-KPM with this binding version, it works flawlessly. Thanks!
BTW, will you also make a package of SynCE-KPM?
--
Ilya Bakulin <***@kibab.com>
xmpp://***@jabber.ru
Mark Ellis
2009-01-13 09:59:03 UTC
Permalink
Post by Ilya Bakulin
On Mon, 12 Jan 2009 08:43:51 +0000
The attached patch should fix the problem.
Post by Mark Ellis
I've tested it with pyrex 0.9.6, 0.9.7 and 0.9.8.5. Can you guys double
check it works for me, and when confirmed I'll do a 0.13.1 release.
This patch fixed all compile problems.
Cool, thanks for the tests guys. I've done a point release for this.
Post by Ilya Bakulin
I've also tested synce-KPM with this binding version, it works flawlessly. Thanks!
BTW, will you also make a package of SynCE-KPM?
Already done :)

Mark

Mark Ellis
2009-01-11 20:18:33 UTC
Permalink
Post by Ilya Bakulin
Hi!
SynCE 0.13 is out, it's time to update Ports Collection... Unfortunately, I've discovered that python bindings for librapi2 don't compile any more. Yet another problem with damned pyrexc...
Pyrexc version used at my system is 0.9.8.5. It's the latest version available in ports.
config.status: creating python/Makefile
config.status: creating python/tests/Makefile
config.status: creating rapi_config.h
config.status: executing depfiles commands
config.status: executing libtool commands
===> Building for py25-synce-librapi2-0.13
Making all in tests
pyrexc ./pyrapi2.pyx -o ./pyrapi2.c
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:426:36: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:427:28: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:429:32: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:430:28: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:486:45: Calling gil-requiring function without gil
/home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python/pyrapi2.pyx:623:32: Calling gil-requiring function without gil
*** Error code 1
Stop in /home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python.
*** Error code 1
Stop in /home/kibab/repos/ports-mine/py-synce-librapi2/work/librapi2-0.13/python.
*** Error code 1
Stop in /home/kibab/repos/ports-mine/py-synce-librapi2.
I think I know what that is, and it's a version problem. I'll get back
to you.
Loading...