There is something broken with perl in its current state in cenbuild. It happens to work for everyone since we are using a very old build of perl (since 2014). If we rebuild it, however, we get a slightly broken version. This was seen with bug 7778 where autoconf fails to build. The issue is that the expression "$!{EEXIST}" doesn't evaluate properly. It is supposed to return true if errno is current EEXIST. But it always seems to return false.
There is also some problem building perl for x86_64. It fails to link to the math functions properly: > /usr/bin/ld: pp_sys.c:(.text+0x1ecf): undefined reference to `ceil' > /usr/bin/ld: pp_sys.c:(.text+0x1f68): undefined reference to `fmod' > /usr/bin/ld: pp_sys.c:(.text+0x1fe7): undefined reference to `floor' > /usr/bin/ld: pp_sys.c:(.text+0x2240): undefined reference to `ceil'
The primary issue is fixed in a later version of perl, so a simple upgrade seems to solve that. The linking problem on x86_64 still remains after an upgrade though. That issue turns out to be bug 7790. No idea why we haven't seen that until now. Perhaps something changed the last time we upgraded gcc?
Fixing gcc is a major task, so we'll try to work around things in the perl build instead. There seems to be some support for different environment variables for the different stages, but not for $LIBRARY_PATH that we are using. I've added a feature request for that though: https://github.com/arsv/perl-cross/issues/121 For now we'll have to translate $LIBRARY_PATH to $LDFLAGS instead so we can get different behaviour for miniperl and perl.
Fixed now. The test program we used was: > #!/usr/bin/perl > > my $ok = mkdir "/tmp/test"; > my $errno = int($!); > my $errmsg = "$!"; > my $iseperm = $!{EPERM}; > my $iseexist = $!{EEXIST}; > > die "$ok | $errno | $errmsg | $iseexist | $iseperm"; On a broken system the last two variables would be the empty string. On a working system they should either be 0 or the corresponding errno value.
Build of GTK+ fails with: > Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /opt/docker-cenbuild/cenbuild/repo/rpmbuild/BUILD/gtk+-2.16.5/demos/gtk-demo/geninclude.pl line 43. Apparently this is fixed in GTK+ 2.24: https://gitlab.gnome.org/GNOME/gtk/-/commit/3da748930fdcb19aaae32ae2fc6cb2d802857752
Upgrading GTK+ is a massive snow ball, so let's just grab the fix instead.
Workaround in place and GTK+ now builds fine.
I have some issues building server and client locally. I get an error complaining about perl-XML-Parser missing: > 11:17:13 [linma@linma thinlinc-git]$ make client-macos-iso > ... > checking for perl... /usr/bin/perl > checking for perl >= 5.8.1... 5.34.0 > checking for XML::Parser... configure: error: XML::Parser perl module is required for intltool > make[2]: *** [pulseaudio/src/pulseaudio] Error 2 > make[2]: Leaving directory `/local/home/linma/thinlinc-git/ctc/buildarea/BUILD/thinlinc-client' > make[1]: *** [tl-client-macos.iso] Error 2 > make[1]: Leaving directory `/local/home/linma/thinlinc-git/ctc/client' > make: *** [Makefile:830: client/tl-client-macos.iso] Error 2 It might be related to our upgrading of perl. My installed versions are perl 5.34.0 and perl-XML-Parser 2.36.
It contains a .so file, so it seems it needs a rebuild when perl is upgraded: > $ echo 'use XML::Parser;' | cbrun x86_64 perl > Can't load '/usr/lib64/perl5/vendor_perl/auto/XML/Parser/Expat/Expat.so' for module XML::Parser::Expat: /usr/lib64/perl5/vendor_perl/auto/XML/Parser/Expat/Expat.so: undefined symbol: PL_sv_yes at /usr/lib64/perl5/DynaLoader.pm line 193. > at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 14. > Compilation failed in require at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 14. > BEGIN failed--compilation aborted at /usr/lib64/perl5/vendor_perl/XML/Parser.pm line 18. > Compilation failed in require at - line 1. > BEGIN failed--compilation aborted at - line 1.
Did an upgrade at the same time, and it now loads properly: > $ echo 'use XML::Parser;' | cbrun x86_64 perl
I can reproduce the EEXIST error using cendio-build-perl-i386-5.20.1-3.noarch and run into the "undefined reference to `floor'" error when building cendio-build-perl-x86_64. I can also reproduce the XML::Parser error when building the macOS ThinLinc client using cendio-build-perl-XML-Parser-osx64-2.36-2.noarch. With the new cenbuild code that includes the LIBRARY_PATH fix I can successfully build a new release of cendio-build-perl-x86_64. After upgrading to 5.34.0-1 of cendio-build-perl, I can no longer reproduce the EEXIST error in the cbrun environment. Lastly, with the upgraded cendio-build-perl-XML-Parser packages I can also successfully build the client-macos-iso target.