[ldns-users] adding (partial) Python3 support

Patrik Fältström patrik at frobbit.se
Mon Aug 22 05:12:52 UTC 2011


Did not have autoremake, but autheader existed and solved that problem. Now configure is done.

Next issue, libtool:

$ make
./install-sh  -c -m 644 ldns/error.h ./include/ldns/
./libtool --tag=CC --quiet --mode=compile gcc -I. -DHAVE_CONFIG_H -Wwrite-strings -W -Wall -O2 -g -I/opt/local/include -c rdata.c
make: ./libtool: No such file or directory
make: *** [rdata.o] Error 1
$ which libtool
/usr/bin/libtool
$ ln -s /usr/bin/libtool .
$ make
./libtool --tag=CC --quiet --mode=compile gcc -I. -DHAVE_CONFIG_H -Wwrite-strings -W -Wall -O2 -g -I/opt/local/include -c rdata.c
./libtool: unknown option character `-' in: --tag=CC
Usage: ./libtool -static [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-sacLT]
Usage: ./libtool -dynamic [-] file [...] [-filelist listfile[,dirname]] [-arch_only arch] [-o output] [-install_name name] [-compatibility_version #] [-current_version #] [-seg1addr 0x#] [-segs_read_only_addr 0x#] [-segs_read_write_addr 0x#] [-seg_addr_table <filename>] [-seg_addr_table_filename <file_system_path>] [-all_load] [-noall_load]
make: *** [rdata.o] Error 1

   Patrik

On 21 aug 2011, at 23.15, Ondřej Surý wrote:

> Try autoremake -fi and/or call autoheader.
> 
> O.
> 
> 2011/8/21 Patrik Fältström <patrik at frobbit.se>:
>> Ok, I have spent some time trying to get things together, but I do not have configure karma with me today.
>> 
>> I.e. there are many things one need to build the package that is not in the SVN repository. I am working on a mac btw.
>> 
>> Autoconf and "automake --add-missing" has helped, as libtoolize that is called from makedist.sh is something I do not have.
>> 
>> Because of that, I have not really been able to move forward much.
>> 
>> Can someone help, and build a distribution for me that I can use to build the thing?
>> 
>> I am close, maybe:
>> 
>> # ./configure --with-pyldns --disable-gost PYTHON_VERSION=3.2
>> :
>> :
>> checking whether the C compiler (gcc) accepts the "unused" attribute... yes
>> configure: creating ./config.status
>> config.status: creating Makefile
>> config.status: creating ldns/common.h
>> config.status: creating ldns/net.h
>> config.status: creating ldns/util.h
>> config.status: creating packaging/libldns.pc
>> config.status: creating packaging/ldns-config
>> config.status: error: cannot find input file: ldns/config.h.in
>> 
>>   Patrik
>> 
>> On 16 aug 2011, at 12.04, Ondřej Surý wrote:
>> 
>>> Patrik,
>>> 
>>> could you also test the Python 3 implementation? It was you who asked about it?
>>> 
>>> O.
>>> 
>>> On Tue, Aug 16, 2011 at 11:50, W.C.A. Wijngaards <wouter at nlnetlabs.nl> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>> 
>>>> Hi Karel,
>>>> 
>>>> On 08/15/2011 04:24 PM, Karel Slany wrote:
>>>>> recently I have been toying with the ldns sources in order to make them
>>>>> compile with Python3 support -- via the './configure --with-pyldns
>>>>> PYTHON_VERSION=3' command. I've made several changes to the supplied
>>>>> autoconf Python detection macros and others to make them work both with
>>>>> Python 2 and 3.
>>>> 
>>>> Because we do not maintain these python implementations ourselves, it
>>>> would be good if other users could tell us if these patches work for
>>>> Python 2.  There are large changes, and we want to support our users.
>>>> 
>>>> If that works, the patch is likely very nice to accept.  Thanks for the
>>>> good work :-)
>>>> 
>>>> Best regards,
>>>>   Wouter
>>>> 
>>>>> The Python3 wrapper does now compile. However, the Python3 support is
>>>>> incomplete. In Python3 they have abandoned the old C I/O API in favour
>>>>> of the io module. Therefore SWIG does no longer support FILE* typemaps
>>>>> -- i.e. C functions taking FILE* arguments will generate an error in
>>>>> Python3.
>>>>> 
>>>>> This mail contains two patches:
>>>>> 1) python3.diff -- Contains modifications enabling the Python3 module to
>>>>> compile and to run with Python3. It also contains a few working examples
>>>>> for Python3 which do the same as the original Python2 examples.
>>>>> 
>>>>> 2)ldns_axfr_start.diff -- As I discovered, the ldns-axf example did not
>>>>> work -- this patch should fix it.
>>>>> 
>>>>> The patches are against the 3523 (current) svn revision.
>>>>> 
>>>>> Best regard
>>>>> 
>>>>> Karel Slany
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> ldns-users mailing list
>>>>> ldns-users at open.nlnetlabs.nl
>>>>> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
>>>> 
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>> 
>>>> iQIcBAEBAgAGBQJOSj1pAAoJEJ9vHC1+BF+NNz8P/2k8lFECWEWeFnMVHGXzUOMO
>>>> /J5XaaLsKyk+4w5apYk1h+aSroO7S0GIsRQtE7YtCBF47yIY3JNXmiS3t5Pel16x
>>>> UsjTiFhqjfADhX+kxFkww5dbihbw2siqOGJa19xCHxlburPlduDHW25Q6hr0DQAJ
>>>> c4PNtBG6WVRgp1mTO9gbWJJIzWC1sIyKo+BhmKwa3U4WCH0AK5ejQWypFgMFTdsq
>>>> uIfNarnj/jiGi7Pzlm6GRwq/tZb9O0cneMNRmWFZLtYcSHU1q7JV+FmJBd4OF+vf
>>>> dWMgxQyiGGlEweNDXrcuNnpvMJBFE+q3jiJ5x8jnuKFgZH/CvzSbCd8neug0zgNN
>>>> l12aV1Wzb2mr5DltF/eFb9uhgEDPWMmUlCinEz5PbLzBOhKf6Qni5XYu98Rmf5SS
>>>> yBQWvHd5VsLzcYgQevW9uxjrj1BxHRPHHuXCE3zlLsV2Z0LqQrhwS+E/fSUv4D4Y
>>>> 91DluZr4bnvYJn6Ra7d6VHGxhShZXMoyLlfcwxpt6pydN7U8kk3Fug4oEU2xGVMs
>>>> 6vCWnciHalKEjCEtL0LPAivmBoGW9HGn5KoOF6mZofYX2PcJh3UbsJoPBfR85xQ7
>>>> A6q+PIZ5Yj8SgNe3r/N7eZE0W8F8ZY6N5MICc1qtfBpaPIHmrZTygN8/N4/U0F4t
>>>> SYTL+clUdQebb9+RLJWI
>>>> =yL6p
>>>> -----END PGP SIGNATURE-----
>>>> _______________________________________________
>>>> ldns-users mailing list
>>>> ldns-users at open.nlnetlabs.nl
>>>> http://open.nlnetlabs.nl/mailman/listinfo/ldns-users
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Ondřej Surý <ondrej at sury.org>
>>> 
>> 
>> 
> 
> 
> 
> -- 
> Ondřej Surý <ondrej at sury.org>
> 





More information about the ldns-users mailing list