On Sun, Oct 06, 2024 at 09:17:38PM +0300, Eli Zaretskii wrote:
> > https://github.com/gnu-texinfo/ci-check/actions/runs/11203321204/job/31140537432
> > libtool: link: gcc -shared  main/.libs/libtexinfoxs_la-build_perl_info.o 
> > main/.libs/libtexinfoxs_la-get_perl_info.o 
> > main/.libs/libtexinfoxs_la-options_get_perl.o   
> > -L/usr/lib/perl5/5.32/i686-cygwin-threads-64int/CORE -lperl 
> > ./.libs/libtexinfo.dll.a  -ggdb -O2 -fstack-protector-strong -O3   -o 
> > .libs/cygtexinfoxs-0.dll -Wl,--enable-auto-image-base -Xlinker --out-implib 
> > -Xlinker .libs/libtexinfoxs.dll.a
> >  /usr/lib/gcc/i686-pc-cygwin/11/../../../../i686-pc-cygwin/bin/ld: 
> > main/.libs/libtexinfoxs_la-build_perl_info.o: in function `convert_error':
> >  
> > /cygdrive/d/a/ci-check/ci-check/texinfo-7.1.90-20241006/build/tp/Texinfo/XS/../../../../tp/Texinfo/XS/main/build_perl_info.c:1180:
> >  undefined reference to `newSVpv_utf8'
> > ....
> >  /usr/lib/gcc/i686-pc-cygwin/11/../../../../i686-pc-cygwin/bin/ld: 
> > main/.libs/libtexinfoxs_la-build_perl_info.o: in function 
> > `element_to_perl_hash':
> >  
> > /cygdrive/d/a/ci-check/ci-check/texinfo-7.1.90-20241006/build/tp/Texinfo/XS/../../../../tp/Texinfo/XS/main/build_perl_info.c:801:
> >  undefined reference to `element_command_name'
> 
> This looks to me like a simple problem of library order: the
> newSVpv_utf8 function is from Perl, no?  The above command has -lperl
> before libtexinfo.dll.a, whereas it should probably be after it, no?
> GNU ld is a single-pass linker, so the order matters.

I modified the build such that -lperl is now after libtexinfo.dll.a:

libtool: link: gcc -shared  main/.libs/libtexinfoxs_la-build_perl_info.o 
main/.libs/libtexinfoxs_la-get_perl_info.o 
main/.libs/libtexinfoxs_la-options_get_perl.o   -lintl ./.libs/libtexinfo.dll.a 
-L/usr/lib/perl5/5.32/i686-cygwin-threads-64int/CORE -lperl  -ggdb -O2 
-fstack-protector-strong -O3   -o .libs/cygtexinfoxs-0.dll 
-Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker 
.libs/libtexinfoxs.dll.a

However this does not work better.  I still get errors like:
/usr/lib/gcc/i686-pc-cygwin/11/../../../../i686-pc-cygwin/bin/ld: 
main/.libs/libtexinfoxs_la-build_perl_info.o: in function 
`element_to_perl_hash':
/cygdrive/d/a/ci-check/ci-check/texinfo-7.1.90-20241010/build/tp/Texinfo/XS/../../../../tp/Texinfo/XS/main/build_perl_info.c:801:
 undefined reference to `element_command_name'

element_command_name is in main/builtin_commands.c and therefore should
be in ./.libs/libtexinfo.dll.a.

-- 
Pat

Reply via email to