[tlbuild] Solaris 11.4 build error

Rainer J.H. Brandt rjhb at bb-c.de
Wed Apr 27 14:02:47 CEST 2022


Dear experts,

I got this error while building from texlive-20220321-source.tar.xz under
Solaris 11.4:

  > gcc -DHAVE_CONFIG_H -I. -I/tmp/buildbot.20620/texlive-20220321-source/texk/web2c -I./w2c -I/tmp/buildbot.20620/build/texk -I/tmp/buildbot.20620/texlive-20220321-source/texk -Wimplicit -Wreturn-type -g -O2 -MT twill.o -MD -MP -MF \$depbase.Tpo -c -o twill.o twill.c
    twill.c:119:13: error: ���reflink��� redeclared as different kind of symbol
     sixteenbits reflink[maxnewrefs + 1]  ;
		 ^~~~~~~
    In file included from /tmp/buildbot.20620/texlive-20220321-source/texk/kpathsea/c-unistd.h:31:0,
		     from /tmp/buildbot.20620/texlive-20220321-source/texk/kpathsea/c-std.h:38,
		     from /tmp/buildbot.20620/texlive-20220321-source/texk/kpathsea/config.h:88,
		     from /tmp/buildbot.20620/texlive-20220321-source/texk/web2c/w2c/config.h:23,
		     from /tmp/buildbot.20620/texlive-20220321-source/texk/web2c/cpascal.h:16,
		     from twill.c:2:
    /usr/include/unistd.h:481:12: note: previous declaration of ���reflink��� was here
     extern int reflink(const char *, const char *, int);
		^~~~~~~
    Exit 1

After looking at /usr/include/unistd.h, I succesfully tried
gcc -D__XOPEN_OR_POSIX ... as a workaround.
The whole build then ran to completion.

However, I don't know how to patch the sources so that the build process
runs without manual intervention.  Does anyone have a suggestion?

BTW, I don't know when Solaris' unistd.h was changed to include a definition
of reflink, but it must have been in recent years.  I have an 11.3 version
that doesn't do that.

Thank you, Rainer J.H. Brandt


More information about the tlbuild mailing list.