Opened 9 months ago
Last modified 7 months ago
#69297 assigned defect
luametatex @2.10.08 does not build on PPC Tiger, Mac OS X 10.4.11, because of "cc1: error: unrecognized command line option "-Wno-unused-result""
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | drkp (Dan Ports) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.1 |
Keywords: | ppc tiger | Cc: | |
Port: | luametatex |
Description
[ 0%] Building C object CMakeFiles/tex.dir/source/utilities/auxmemory.c.o /opt/local/bin/gcc-apple-4.2 -DLMT_COMPILER_USED=\"gcc\" -DLMT_HB_TOO=1 -DLMT_KPSE_TOO=1 -DMINIZ_NO_ARCHIVE_APIS=1 -DMINIZ_NO_MALLOC=1 -DMINIZ_NO_STDIO=1 -DZLIB_CONST=1 -I/opt/local/share/cmake-3.24/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/miniz -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/pplib -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/pplib/util -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/luacore/lua54/src -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/mimalloc/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/softposit/source/include -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.4 -O3 -Wall -Wcast-align -Wcast-qual -Wno-unknown-pragmas -Wno-unused-result -fno-strict-aliasing -std=gnu99 -MD -MT CMakeFiles/tex.dir/source/utilities/auxmemory.c.o -MF CMakeFiles/tex.dir/source/utilities/auxmemory.c.o.d -o CMakeFiles/tex.dir/source/utilities/auxmemory.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxmemory.c cc1: error: unrecognized command line option "-Wno-unused-result" make[2]: *** [CMakeFiles/tex.dir/source/utilities/auxmemory.c.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08'
Attachments (2)
Change History (7)
Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
comment:1 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
Actually /opt/local/bin/gcc-apple-4.2
does not understand any of the -Wno-<whatever>
options, /opt/local/bin/gcc-apple-4.2 -v --help
shows:
-Wno-comma -Wno-date-time -Wno-deprecated-declarations -Wno-extra-semi-stmt -Wno-float-equal -Wno-format-nonliteral -Wno-implicit-fallthrough -Wno-missing-noreturn -Wno-newline-eof -Wno-nonportable-include-path -Wno-nonportable-system-include-path -Wno-pedantic -Wno-reserved-id-macro -Wno-reserved-identifier -Wno-shadow -Wno-sign-conversion -Wno-switch-enum -Wno-unknown-pragmas -Wno-unknown-warning-option -Wno-unused-macros -Wno-unused-result
Clearly they must be removed from luametatex-2.10.08/CMakeLists.txt
– or GCC7
used.
Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
Attachment: | no-Wno-options.diff added |
---|
Proposed patch to remove unsuitable -Wno-<whatever> options from invocations of /opt/local/bin/gcc-apple-4.2 – to be tested soon
comment:2 Changed 9 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dports@… removed |
---|---|
Owner: | set to drkp |
Status: | new → assigned |
Its CMakeLists.txt says:
set(CMAKE_C_STANDARD 11)
We could indicate that in the Portfile with:
compiler.c_standard 2011
That would cause MacPorts to select a newer compiler that hopefully understands those warning flags so no patch would be needed.
However, if I understand CMake correctly, that line in CMakeLists.txt is only indicating a preference for C11 if it is available, not that it is required. Does your patch removing those warning flags allow the port to build with GCC 4.2.1? If so, then C11 is clearly not required and your patch would be the way to go. In that case, please report the bug to the developers of luametatex. They should be testing the compiler for support of each warning flag before adding them.
comment:3 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
The original patch has a flaw: the path component luametatex-2.10.08/
needs to be removed. With this change it applies – but a new failure rises:
[ 1%] Building C object CMakeFiles/tex.dir/source/utilities/auxsparsearray.c.o /opt/local/bin/gcc-apple-4.2 -DLMT_COMPILER_USED=\"gcc\" -DLMT_HB_TOO=1 -DLMT_KPSE_TOO=1 -DMINIZ_NO_ARCHIVE_APIS=1 -DMINIZ_NO_MALLOC=1 -DMINIZ_NO_STDIO=1 -DZLIB_CONST=1 -I/opt/local/share/cmake-3.24/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/miniz -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/pplib -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/pplib/util -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/luacore/lua54/src -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/mimalloc/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/softposit/source/include -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.4 -O3 -Wall -Wcast-align -Wcast-qual -fno-strict-aliasing -std=gnu99 -MD -MT CMakeFiles/tex.dir/source/utilities/auxsparsearray.c.o -MF CMakeFiles/tex.dir/source/utilities/auxsparsearray.c.o.d -o CMakeFiles/tex.dir/source/utilities/auxsparsearray.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxsparsearray.c In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/luametatex.h:262, from /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxsparsearray.c:16: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxposit.h:93: error: redefinition of typedef 'halfword' /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/tex/textypes.h:83: error: previous declaration of 'halfword' was here make[2]: *** [CMakeFiles/tex.dir/source/utilities/auxsparsearray.c.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08'
luametatex-2.10.08/source/tex/textypes.h
has:
82 typedef int strnumber; 83 typedef int halfword; 84 typedef long long fullword; 85 typedef unsigned short quarterword; /*tex It really is an unsigned one! But \MPLIB| had it signed. */ 86 typedef unsigned char singleword; 87 typedef int scaled; 88 typedef double glueratio; /*tex This looks better in our (tex specific) syntax highlighting. */ 89 typedef int pointer; /*tex Maybe I'll replace halfwords that act as pointer some day. */ 90 typedef FILE *dumpstream;
and later luametatex-2.10.08/source/utilities/auxposit.h
is included providing these:
93 typedef int halfword; 94 typedef posit32_t tex_posit;
I'll check whether line #93 can be deleted.
comment:4 Changed 9 months ago by ballapete (Peter "Pete" Dyballa)
Without that re-definition the build continues and ends here with this well-known error (#67248):
[ 2%] Building C object CMakeFiles/tex.dir/source/utilities/auxposit.c.o /opt/local/bin/gcc-apple-4.2 -DLMT_COMPILER_USED=\"gcc\" -DLMT_HB_TOO=1 -DLMT_KPSE_TOO=1 -DMINIZ_NO_ARCHIVE_APIS=1 -DMINIZ_NO_MALLOC=1 -DMINIZ_NO_STDIO=1 -DZLIB_CONST=1 -I/opt/local/share/cmake-3.24/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/miniz -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/pplib -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/pplib/util -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/luacore/lua54/src -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/mimalloc/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/libraries/softposit/source/include -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.4 -O3 -Wall -Wcast-align -Wcast-qual -fno-strict-aliasing -std=gnu99 -MD -MT CMakeFiles/tex.dir/source/utilities/auxposit.c.o -MF CMakeFiles/tex.dir/source/utilities/auxposit.c.o.d -o CMakeFiles/tex.dir/source/utilities/auxposit.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxposit.c In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxposit.c:5: /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxposit.h:121: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tex_posit_neg' /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxposit.h:128: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tex_posit_abs' /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxposit.h:135: error: expected ')' before 'p' /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08/source/utilities/auxposit.h:140: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'tex_posit_to_dimension' make[2]: *** [CMakeFiles/tex.dir/source/utilities/auxposit.c.o] Error 1 make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.10.08'
comment:5 Changed 7 months ago by ballapete (Peter "Pete" Dyballa)
Using GCC7
to build ´luametatex @2.11.02` the compilation goes a bit further:
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.11.02' [100%] Building C object CMakeFiles/luametatex.dir/source/luametatex.c.o /opt/local/bin/gcc-mp-7 -DDECNUMDIGITS=1000 -DDECUSE64=1 -DLMT_COMPILER_USED=\"gcc\" -DLMT_HB_TOO=1 -DLMT_KPSE_TOO=1 -DLPEG_DEBUG -DLUAI_MAXCSTACK=6000 -DLUA_NOBUILTIN -DLUA_UCID -DLUA_USE_DLOPEN -DLUA_USE_POSIX -DMINIZ_NO_ARCHIVE_APIS=1 -DMINIZ_NO_MALLOC=1 -DMINIZ_NO_STDIO=1 -DNDEBUG=0 -DVERSION=\"1.16\" -DZLIB_CONST=1 -I/opt/local/share/cmake-3.24/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.11.02/source -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.11.02/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.11.02/source/. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.11.02/source/luacore/lua55/src -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.4 -O3 -Wall -Wcast-align -Wcast-qual -Wno-unknown-pragmas -Wno-unused-result -fno-strict-aliasing -DLUA_CORE -std=gnu11 -MD -MT CMakeFiles/luametatex.dir/source/luametatex.c.o -MF CMakeFiles/luametatex.dir/source/luametatex.c.o.d -o CMakeFiles/luametatex.dir/source/luametatex.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.11.02/source/luametatex.c <command-line>:0:0: warning: "NDEBUG" redefined <command-line>:0:0: note: this is the location of the previous definition [100%] Linking C executable luametatex /opt/local/bin/cmake -E cmake_link_script CMakeFiles/luametatex.dir/link.txt --verbose=ON /opt/local/bin/gcc-mp-7 -pipe -Os -DNDEBUG -arch ppc -mmacosx-version-min=10.4 -Wl,-search_paths_first -Wl,-headerpad_max_install_names -L/opt/local/lib -Wl,-headerpad_max_install_names CMakeFiles/luametatex.dir/source/luametatex.c.o -o luametatex libtex.a liblua.a libmp.a libluarest.a libluasocket.a libluaoptional.a libpplib.a libminiz.a libsoftposit.a libpotrace.a -lm /opt/local/bin/strip -g -S -d -x luametatex error: /opt/local/bin/strip: unrecognized option: -g Usage: /opt/local/bin/strip [-AnuSXx] [-] [-d filename] [-s filename] [-R filename] [-o output] file [...] make[2]: *** [luametatex] Error 1 make[2]: *** Deleting file `luametatex' make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_tex_luametatex/luametatex/work/luametatex-2.11.02' make[1]: *** [CMakeFiles/luametatex.dir/all] Error 2
The faulty strip option
is introduced here:
luametatex-2.11.02/CMakeFiles/luametatex.dir/build.make:111: /opt/local/bin/strip -g -S -d -x luametatex
-x
is another faulty strip option
. After correcting the switches and rebuilding the luametatex
executable it built and installed:
port installed -v luametatex The following ports are currently installed: luametatex @2.11.02_0 (active) requested_variants='' platform='darwin 8' archs='ppc' date='2024-04-01T01:09:18+0200'
Main.log from PPC Tiger, Mac OS X 10.4.11