On Sat, Aug 10, 2024 at 10:37 PM Daniel Sahlberg <daniel.l.sahlb...@gmail.com> wrote: > > Den lör 10 aug. 2024 kl 21:25 skrev <rin...@apache.org>: >> >> Author: rinrab >> Date: Sat Aug 10 19:25:38 2024 >> New Revision: 1919799 >> >> URL: http://svn.apache.org/viewvc?rev=1919799&view=rev >> Log: >> On the 'cmake' branch: Support compilation of Perl SWIG bindings. >> >> For finding the Perl dev-kit, the FindPerlLibs.cmake built-in CMake module >> will be utilized. This module doesn't actually create a target, so we will >> do it manually and will just setup the external-perl target properties with >> values from FindPerlLibs. The targets for the Perl SWIG bindings are already >> created by gen-cmake while other Perl-specific options will be handled by the >> UseSWIG module. >> >> * CMakeLists.txt >> (swig.perl): Create the external-perl target for the Perl bindings. > > > Great work! > > Hate to crash the party but it didn't work for me. > > Had to do the obvious header: > $ python ./build/generator/swig/external_runtime.py ./build.conf swig perl > > But still got > [[[ > [ 68%] Building C object > CMakeFiles/libsvn_swig_perl.dir/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c.o > In file included from > /home/dsg/svn_cmake/subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c:32: > /usr/lib/x86_64-linux-gnu/perl/5.38/CORE/perlio.h:252:15: error: unknown type > name ‘off64_t’; did you mean ‘off_t’? > 252 | PERL_CALLCONV Off_t PerlIO_tell(PerlIO *); > | ^~~~~ > /usr/lib/x86_64-linux-gnu/perl/5.38/CORE/perlio.h:255:41: error: unknown type > name ‘off64_t’; did you mean ‘off_t’? > 255 | PERL_CALLCONV int PerlIO_seek(PerlIO *, Off_t, int); > | ^~~~~ > ]]] > > It seems off64_t require #define _LARGEFILE64_SOURCE > > Again, sorry, out of time for tonight but I couldn't help checking this > exciting commit! =)
Hi, Thanks for the feedback! Let me check it on Linux... Oh, yeah, I reproduced it. I took a look at the commands that compiles this from the autoconf build system and I found the following options: [[[ -DLINUX -D_REENTRANT -D_GNU_SOURCE -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DVERSION=\"\" -DXS_VERSION=\"\" -DLINUX -D_REENTRANT -D_GNU_SOURCE ]]] I think setting of the most of these options will resolve the issue and make the build with CMake more similar to other build systems. However, by excluding some options and testing, I noticed that setting only of the _GNU_SOURCE definition also worked. -- Timofei Zhakov