Opened 3 years ago

Last modified 2 years ago

#57071 assigned defect

texlive-bin does not build on 10.5 Leopard Intel with gcc6

Reported by: kencu (Ken) Owned by: drkp (Dan Ports)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec), stromnov (Andrew Stromnov)
Port: texlive-bin


It errors out with an "internal compiler error".

Build proceeds apace with clang-3.9, and likely other clang versions 3.4 to 3.9.

Attachments (1)

texlive-bin-2018-47642_3-fail.leopard-intel.txt (303.1 KB) - added by kencu (Ken) 3 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 3 years ago by jmroot (Joshua Root)

Owner: set to drkp
Status: newassigned

Changed 3 years ago by kencu (Ken)

comment:2 Changed 3 years ago by kencu (Ken)

So the reason this is happening is the cxx11 1.1 PortGroup forces gcc6 on 10.4 and 10.5 to support PPC (which is appropriate). On 10.4 and 10.5 Intel, however, you can build up to clang-3.8 and clang-3.9 respectively, and these compilers work perfectly well.

I'm not really inclined to tweak the cxx11 1.1 PG any further for something like this. Perhaps the 1 person in million who runs into this might stumble across this ticket and build it with clang-3.9.

I'll try gcc7 on Intel; maybe that will work, and if so, it would be easier to tweak.

comment:3 Changed 3 years ago by kencu (Ken)

Same error with gcc7:

libtool: compile:  /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I. -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os -m32 -MT LuaJIT-src/src/lj_cconv.lo -MD -MP -MF LuaJIT-src/src/.deps/lj_cconv.Tpo -c LuaJIT-src/src/lj_cconv.c  -fno-common -DPIC -o LuaJIT-src/src/.libs/lj_cconv.o
depbase=`echo LuaJIT-src/src/lj_char.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
	/bin/sh ./libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I.  -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector  -Wall -pipe -Os -m32 -MT LuaJIT-src/src/lj_char.lo -MD -MP -MF $depbase.Tpo -c -o LuaJIT-src/src/lj_char.lo LuaJIT-src/src/lj_char.c &&\
	mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I. -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os -m32 -MT LuaJIT-src/src/lj_cdata.lo -MD -MP -MF LuaJIT-src/src/.deps/lj_cdata.Tpo -c LuaJIT-src/src/lj_cdata.c  -fno-common -DPIC -o LuaJIT-src/src/.libs/lj_cdata.o
libtool: compile:  /opt/local/bin/gcc-mp-7 -DHAVE_CONFIG_H -I. -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os -m32 -MT LuaJIT-src/src/lj_char.lo -MD -MP -MF LuaJIT-src/src/.deps/lj_char.Tpo -c LuaJIT-src/src/lj_char.c  -fno-common -DPIC -o LuaJIT-src/src/.libs/lj_char.o
LuaJIT-src/src/lj_cconv.c: In function 'lj_cconv_ct_ct':
LuaJIT-src/src/lj_cconv.c:368:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1026

comment:5 Changed 2 years ago by mojca (Mojca Miklavec)

Cc: mojca added

comment:6 Changed 2 years ago by mojca (Mojca Miklavec)

Ken, I now noticed a bunch of flags like -msse2. Can you please provide the exact command used to compile lj_char.c when:

  • using clang
  • compiling luajit with gcc in isolation (outside of TeX Live)

What hardware do you use to run 10.5?

comment:7 Changed 2 years ago by kencu (Ken)

I have an Intel MacMini 2,1 running 10.5. I also have a 10.5VM on my MacPro 5,1. There is also a DualG5 MacPro PPC machine running. A number of other machines could run 10.5 -- I have a multicore MacPro 4,1 with Leopard installed on a partition that I use for clang/llvm hacking.

looks like the plain luajit port builds on 10.5 Intel using gcc-4.2, and there is no lj_char.c in that port (it is LuaJIT-2.0.5 and libluajit- gets built).

re: texlive-bin: on intel it tries to build luajit with gcc6 or gcc7 and gets the internal compiler error above. However clang 3.8 or clang 3.9 on Intel Leopard builds it without any troubles. On 10.5 PPC it builds through with gcc.

I will rebuild texlive-bin on 10.5 Intel with clang-3.9 and find you the line you asked for.

comment:8 Changed 2 years ago by kencu (Ken)

Building on 10.5 Intel forcing clang-3.9, it builds that line like this, without error:

libtool: compile:  /opt/local/bin/clang-mp-3.9 -DHAVE_CONFIG_H -I. -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os -arch i386 -MT LuaJIT-src/src/lj_char.lo -MD -MP -MF LuaJIT-src/src/.deps/lj_char.Tpo -c LuaJIT-src/src/lj_char.c -o LuaJIT-src/src/lj_char.o >/dev/null 2>&1

comment:9 Changed 2 years ago by mojca (Mojca Miklavec)

Cc: stromnov added

OK, strange, the only difference seems to be

-o LuaJIT-src/src/lj_char.o >/dev/null 2>&1


-fno-common -DPIC -o LuaJIT-src/src/.libs/lj_char.o

so nothing to do with -msse2 flag or anything of that sort that could be related to a too old processor.

No error on PPC is easy to explain: building luajit is completely excluded on PPC.

I strongly suspect that the version of LuaJIT in TeX Live is the very latest one (probably 2.1.0-beta3).

It would be interesting to figure out where exactly the problem is and to come up with some minimal example to report somewhere upstream (whether that's gcc, luajit or whoever). This probably includes trying to:

  • compile the latest (beta) luajit with the cxx11 1.1 PG, both on 10.5 and by forcing gcc 6 on 10.6 or later (that is: try to reproduce the problem in luajit which is a much simpler piece of software than luajittex)
  • compile texlive (luajittex) with gcc6 against the same stdlib on some newer OS
Note: See TracTickets for help on using tickets.