Repository: spack/spack

Issue:
Installation issue: motif
### Steps to reproduce the issue

```console
$ spack spec -I <spec>
Input spec
--------------------------------
motif

Concretized
--------------------------------
zkjjeff  motif@2.3.8%gcc@8.4.1 patches=91e9301 arch=linux-rocky8-skylake_avx512
tvw45p3      ^autoconf@2.69%gcc@8.4.1 patches=7793209 arch=linux-rocky8-skylake_avx512
43o4npb      ^automake@1.16.1%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
i77cdxg      ^flex@2.6.1%gcc@8.4.1+lex~nls arch=linux-rocky8-skylake_avx512
73irlu4      ^libjpeg-turbo@2.1.0%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
7ggfhym          ^cmake@3.18.2%gcc@8.4.1~doc+ncurses+openssl+ownlibs~qt build_type=Release patches=bf695e3 arch=linux-rocky8-skylake_avx512
xddoare          ^nasm@2.15.05%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
i22db75      ^libtool@2.4.6%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
x5ghm3j      ^libx11@1.7.0%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
3xe63r4          ^inputproto@2.3.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
xfv7zoz              ^pkgconf@1.4.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
cbuiwgd              ^util-macros@1.19.3%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
dcrarab          ^kbproto@1.0.7%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
mbbpysi          ^libxcb@1.14%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
fm76oq3              ^libpthread-stubs@0.4%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
yzs63v7              ^libxau@1.0.8%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
ce5wdkw                  ^xproto@7.0.31%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
7hna2xt              ^libxdmcp@1.1.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
km4qktu                  ^libbsd@0.11.5%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
lxjpk3e                      ^libmd@1.0.4%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
submipo              ^xcb-proto@1.14.1%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
nwjih22          ^perl@5.26.3%gcc@8.4.1~cpanm+shared+threads patches=8cf4302 arch=linux-rocky8-skylake_avx512
4dvm5q4          ^xextproto@7.3.0%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
hkdw5ji          ^xtrans@1.3.5%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
h6xad5n      ^libxcomposite@0.4.4%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
cbs4kix          ^compositeproto@0.4.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
k6opcqy          ^fixesproto@5.0%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
lkqtcjl          ^libxfixes@5.0.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
j5poqf2      ^libxext@1.3.3%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
fttkla7      ^libxft@2.3.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
jbwhjcy          ^fontconfig@2.13.94%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
xi4wza3              ^font-util@1.3.2%gcc@8.4.1 fonts=encodings,font-adobe-100dpi,font-adobe-75dpi,font-adobe-utopia-100dpi,font-adobe-utopia-75dpi,font-adobe-utopia-type1,font-alias,font-arabic-misc,font-bh-100dpi,font-bh-75dpi,font-bh-lucidatypewriter-100dpi,font-bh-lucidatypewriter-75dpi,font-bh-type1,font-bitstream-100dpi,font-bitstream-75dpi,font-bitstream-speedo,font-bitstream-type1,font-cronyx-cyrillic,font-cursor-misc,font-daewoo-misc,font-dec-misc,font-ibm-type1,font-isas-misc,font-jis-misc,font-micro-misc,font-misc-cyrillic,font-misc-ethiopic,font-misc-meltho,font-misc-misc,font-mutt-misc,font-schumacher-misc,font-screen-cyrillic,font-sun-misc,font-winitzki-cyrillic,font-xfree86-type1 arch=linux-rocky8-skylake_avx512
xpv63jb                  ^bdftopcf@1.0.5%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
s4j2po5                      ^fontsproto@2.1.3%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
k2yzbrj                      ^libxfont@1.5.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
vq5ds5k                          ^freetype@2.11.1%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
ywk346c                              ^bzip2@1.0.6%gcc@8.4.1~debug~pic+shared arch=linux-rocky8-skylake_avx512
mpt3s3l                              ^libpng@1.6.37%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
hlaky7k                                  ^zlib@1.2.11%gcc@8.4.1+optimize+pic+shared arch=linux-rocky8-skylake_avx512
kr24nhl                          ^libfontenc@1.1.3%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
xhaecn6                  ^mkfontdir@1.0.7%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
gbt7zjc                      ^mkfontscale@1.1.2%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
zgjp22t              ^gperf@3.1%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
3jtgaba              ^libxml2@2.9.12%gcc@8.4.1~python arch=linux-rocky8-skylake_avx512
qlhstz6                  ^libiconv@1.16%gcc@8.4.1 libs=shared,static arch=linux-rocky8-skylake_avx512
xojnl5b                  ^xz@5.2.5%gcc@8.4.1~pic libs=shared,static arch=linux-rocky8-skylake_avx512
xlbhiib              ^python@3.6.8%gcc@8.4.1+bz2+ctypes+dbm~debug+ensurepip+libxml2+lzma+nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib patches=c129e34 arch=linux-rocky8-skylake_avx512
o327uqa              ^util-linux-uuid@2.37.4%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
u5e4jw2          ^libxrender@0.9.10%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
vcimpap              ^renderproto@0.11.1%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
usoopk5      ^libxt@1.1.5%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
imadznu          ^libice@1.0.9%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
kypqjiz          ^libsm@1.2.3%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
opffybq      ^m4@1.4.18%gcc@8.4.1+sigsegv patches=3877ab5,fc9b616 arch=linux-rocky8-skylake_avx512
t4ey7t3      ^xbitmaps@1.1.1%gcc@8.4.1 arch=linux-rocky8-skylake_avx512
```


### Error message

<details><summary>Error message</summary><pre>
==> Installing motif-2.3.8-zkjjeffl46ddwyzbbqzyicalcd6anjz7
==> No binary for motif-2.3.8-zkjjeffl46ddwyzbbqzyicalcd6anjz7 found: installing from source
==> Using cached archive: /avatar/bwibking/spack/var/spack/cache/_source-cache/archive/85/859b723666eeac7df018209d66045c9853b50b4218cecadb794e2359619ebce7.tar.gz
==> Applied patch /avatar/bwibking/spack/var/spack/repos/builtin/packages/motif/add_xbitmaps_dependency.patch
==> Ran patch() for motif
==> motif: Executing phase: 'autoreconf'
==> motif: Executing phase: 'configure'
==> motif: Executing phase: 'build'
==> Error: ProcessError: Command exited with status 2:
    'make' '-j16' 'V=1'

8 errors found in build log:
     16      libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac and
     17      libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
     18      autoreconf: running: /usr/bin/autoconf --force
     19      autoreconf: running: /usr/bin/autoheader --force
     20      autoreconf: running: automake --add-missing --copy --force-missing
     21      configure.ac:25: warning: AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated.  For more info,
              see:
  >> 22      configure.ac:25: https://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_005fINIT_005fAUTO
             MAKE-invocation
  >> 23      configure.ac:37: installing './compile'
  >> 24      configure.ac:25: installing './missing'
     25      Makefile.am: installing './INSTALL'
     26      clients/mwm/Makefile.am:14: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
     27      clients/mwm/Makefile.am: installing './depcomp'
     28      clients/mwm/WmWsmLib/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS'
             )
     29      clients/uil/Makefile.am:18: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')
     30      clients/xmbind/Makefile.am:7: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS')

     ...

     2215    ar cru libwml.a wmlparse.o wml.o wmloutkey.o wmlouth.o wmloutmm.o wmloutp1.o wmlresolve.o wmlsynbld.o wmlu
             tils.o
     2216    ranlib libwml.a
     2217    /bin/sh ../../libtool  --tag=CC   --mode=link /avatar/bwibking/spack/lib/spack/env/gcc/gcc  -g -O2 -Wall -
             g -fno-strict-aliasing -Wno-unused -Wno-comment -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_av
             x512/gcc-8.4.1/libxft-2.3.2-fttkla7vmva7rojoxv44qajc7cb3qsns/include -I/avatar/bwibking/spack/opt/spack/li
             nux-rocky8-skylake_avx512/gcc-8.4.1/xproto-7.0.31-ce5wdkw7eii4pmkzqu63mgyt7ipnnwuv/include -I/avatar/bwibk
             ing/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxrender-0.9.10-u5e4jw2zldvw5gzeaf3zsdffpuitfs
             c2/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/renderproto-0.11.1-vci
             mpapnkoxkvsdubesf53g6gt3fpb2u/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8
             .4.1/libx11-1.7.0-x5ghm3jlquphawwrofpbecjatjcxoobf/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8
             -skylake_avx512/gcc-8.4.1/kbproto-1.0.7-dcrarabclkvgyrobbgv73grtlxkwxo4m/include -I/avatar/bwibking/spack/
             opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxcb-1.14-mbbpysigmdfxcmquebmbaishpruquy76/include -I/av
             atar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxau-1.0.8-yzs63v7i3w4d6zqlfuvmwkk3o
             4dnrpol/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxdmcp-1.1.2-7h
             na2xt674xuqbdlhotz7dyreyjlceyj/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-
             8.4.1/fontconfig-2.13.94-jbwhjcypuko6bun4zoq3t4zz4pciseoy/include -I/avatar/bwibking/spack/opt/spack/linux
             -rocky8-skylake_avx512/gcc-8.4.1/freetype-2.11.1-vq5ds5kug4fsjyrqd2tjf2epwyuomoyq/include/freetype2 -I/ava
             tar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libpng-1.6.37-mpt3s3lgzftnpgbfu44axzkcf
             biw22sf/include/libpng16 -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/zlib-1.2
             .11-hlaky7kmtfaieud3deytwmi73gkicoby/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx51
             2/gcc-8.4.1/libxml2-2.9.12-3jtgabar4vhg7k7lkf2imsvcstzdjs3d/include/libxml2 -I/avatar/bwibking/spack/opt/s
             pack/linux-rocky8-skylake_avx512/gcc-8.4.1/libiconv-1.16-qlhstz62juxsnurggjpultjlhpdosapu/include  -I/avat
             ar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/xbitmaps-1.1.1-t4ey7t3eo4e72fi7attwrcolc
             gaa4d5u/include      -o wml wml.o -L. -lwml -lXp  -L/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_
             avx512/gcc-8.4.1/freetype-2.11.1-vq5ds5kug4fsjyrqd2tjf2epwyuomoyq/lib -lfreetype -L/avatar/bwibking/spack/
             opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/fontconfig-2.13.94-jbwhjcypuko6bun4zoq3t4zz4pciseoy/lib -l
             fontconfig -L/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/freetype-2.11.1-vq5ds5
             kug4fsjyrqd2tjf2epwyuomoyq/lib -lfreetype  -L/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/
             gcc-8.4.1/libxft-2.3.2-fttkla7vmva7rojoxv44qajc7cb3qsns/lib -lXft   -ljpeg -lpng
     2218    libtool: link: /avatar/bwibking/spack/lib/spack/env/gcc/gcc -g -O2 -Wall -g -fno-strict-aliasing -Wno-unus
             ed -Wno-comment -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxft-2.3.2-fttk
             la7vmva7rojoxv44qajc7cb3qsns/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.
             4.1/xproto-7.0.31-ce5wdkw7eii4pmkzqu63mgyt7ipnnwuv/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8
             -skylake_avx512/gcc-8.4.1/libxrender-0.9.10-u5e4jw2zldvw5gzeaf3zsdffpuitfsc2/include -I/avatar/bwibking/sp
             ack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/renderproto-0.11.1-vcimpapnkoxkvsdubesf53g6gt3fpb2u/in
             clude -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libx11-1.7.0-x5ghm3jlquphaw
             wrofpbecjatjcxoobf/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/kbprot
             o-1.0.7-dcrarabclkvgyrobbgv73grtlxkwxo4m/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_a
             vx512/gcc-8.4.1/libxcb-1.14-mbbpysigmdfxcmquebmbaishpruquy76/include -I/avatar/bwibking/spack/opt/spack/li
             nux-rocky8-skylake_avx512/gcc-8.4.1/libxau-1.0.8-yzs63v7i3w4d6zqlfuvmwkk3o4dnrpol/include -I/avatar/bwibki
             ng/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxdmcp-1.1.2-7hna2xt674xuqbdlhotz7dyreyjlceyj/i
             nclude -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/fontconfig-2.13.94-jbwhjcy
             puko6bun4zoq3t4zz4pciseoy/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1
             /freetype-2.11.1-vq5ds5kug4fsjyrqd2tjf2epwyuomoyq/include/freetype2 -I/avatar/bwibking/spack/opt/spack/lin
             ux-rocky8-skylake_avx512/gcc-8.4.1/libpng-1.6.37-mpt3s3lgzftnpgbfu44axzkcfbiw22sf/include/libpng16 -I/avat
             ar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/zlib-1.2.11-hlaky7kmtfaieud3deytwmi73gki
             coby/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxml2-2.9.12-3jtga
             bar4vhg7k7lkf2imsvcstzdjs3d/include/libxml2 -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512
             /gcc-8.4.1/libiconv-1.16-qlhstz62juxsnurggjpultjlhpdosapu/include -I/avatar/bwibking/spack/opt/spack/linux
             -rocky8-skylake_avx512/gcc-8.4.1/xbitmaps-1.1.1-t4ey7t3eo4e72fi7attwrcolcgaa4d5u/include -o wmluiltok wmlu
             iltok.o  -lXp -L/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/freetype-2.11.1-vq5
             ds5kug4fsjyrqd2tjf2epwyuomoyq/lib -L/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1
             /fontconfig-2.13.94-jbwhjcypuko6bun4zoq3t4zz4pciseoy/lib -lfontconfig -lfreetype -L/avatar/bwibking/spack/
             opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxft-2.3.2-fttkla7vmva7rojoxv44qajc7cb3qsns/lib -lXft -l
             jpeg -lpng
     2219    libtool: link: /avatar/bwibking/spack/lib/spack/env/gcc/gcc -g -O2 -Wall -g -fno-strict-aliasing -Wno-unus
             ed -Wno-comment -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxft-2.3.2-fttk
             la7vmva7rojoxv44qajc7cb3qsns/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.
             4.1/xproto-7.0.31-ce5wdkw7eii4pmkzqu63mgyt7ipnnwuv/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8
             -skylake_avx512/gcc-8.4.1/libxrender-0.9.10-u5e4jw2zldvw5gzeaf3zsdffpuitfsc2/include -I/avatar/bwibking/sp
             ack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/renderproto-0.11.1-vcimpapnkoxkvsdubesf53g6gt3fpb2u/in
             clude -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libx11-1.7.0-x5ghm3jlquphaw
             wrofpbecjatjcxoobf/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/kbprot
             o-1.0.7-dcrarabclkvgyrobbgv73grtlxkwxo4m/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_a
             vx512/gcc-8.4.1/libxcb-1.14-mbbpysigmdfxcmquebmbaishpruquy76/include -I/avatar/bwibking/spack/opt/spack/li
             nux-rocky8-skylake_avx512/gcc-8.4.1/libxau-1.0.8-yzs63v7i3w4d6zqlfuvmwkk3o4dnrpol/include -I/avatar/bwibki
             ng/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxdmcp-1.1.2-7hna2xt674xuqbdlhotz7dyreyjlceyj/i
             nclude -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/fontconfig-2.13.94-jbwhjcy
             puko6bun4zoq3t4zz4pciseoy/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1
             /freetype-2.11.1-vq5ds5kug4fsjyrqd2tjf2epwyuomoyq/include/freetype2 -I/avatar/bwibking/spack/opt/spack/lin
             ux-rocky8-skylake_avx512/gcc-8.4.1/libpng-1.6.37-mpt3s3lgzftnpgbfu44axzkcfbiw22sf/include/libpng16 -I/avat
             ar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/zlib-1.2.11-hlaky7kmtfaieud3deytwmi73gki
             coby/include -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxml2-2.9.12-3jtga
             bar4vhg7k7lkf2imsvcstzdjs3d/include/libxml2 -I/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512
             /gcc-8.4.1/libiconv-1.16-qlhstz62juxsnurggjpultjlhpdosapu/include -I/avatar/bwibking/spack/opt/spack/linux
             -rocky8-skylake_avx512/gcc-8.4.1/xbitmaps-1.1.1-t4ey7t3eo4e72fi7attwrcolcgaa4d5u/include -o wml wml.o  -L.
              -lwml -lXp -L/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/freetype-2.11.1-vq5ds
             5kug4fsjyrqd2tjf2epwyuomoyq/lib -L/avatar/bwibking/spack/opt/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/f
             ontconfig-2.13.94-jbwhjcypuko6bun4zoq3t4zz4pciseoy/lib -lfontconfig -lfreetype -L/avatar/bwibking/spack/op
             t/spack/linux-rocky8-skylake_avx512/gcc-8.4.1/libxft-2.3.2-fttkla7vmva7rojoxv44qajc7cb3qsns/lib -lXft -ljp
             eg -lpng
     2220    /usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o: In function `_start':
  >> 2221    (.text+0x24): undefined reference to `main'
  >> 2222    collect2: error: ld returned 1 exit status
  >> 2223    make[2]: *** [Makefile:502: wmluiltok] Error 1
     2224    make[2]: *** Waiting for unfinished jobs....
     2225    make[2]: Leaving directory '/tmp/bwibking/spack-stage/spack-stage-motif-2.3.8-zkjjeffl46ddwyzbbqzyicalcd6a
             njz7/spack-src/tools/wml'
  >> 2226    make[1]: *** [Makefile:395: all-recursive] Error 1
     2227    make[1]: Leaving directory '/tmp/bwibking/spack-stage/spack-stage-motif-2.3.8-zkjjeffl46ddwyzbbqzyicalcd6a
             njz7/spack-src/tools'
  >> 2228    make: *** [Makefile:453: all-recursive] Error 1
</pre></details>


### Information on your system

* **Spack:** 0.17.1-1571-4ef534b19b
* **Python:** 3.6.8
* **Platform:** linux-rocky8-cascadelake
* **Concretizer:** clingo

### Additional information

[spack-build-out.txt](https://github.com/spack/spack/files/8308107/spack-build-out.txt)
[spack-build-env.txt](https://github.com/spack/spack/files/8308108/spack-build-env.txt)



### General information

- [X] I have run `spack debug report` and reported the version of Spack/Python/Platform
- [X] I have run `spack maintainers <name-of-the-package>` and **@mentioned** any maintainers
- [X] I have uploaded the build log and environment files
- [X] I have searched the issues of this repo and believe this is not a duplicate


Discussion:
:+1: duplicate of #25794 :)
@ax3l I'm not sure this is a duplicate. Your build returns an error message of `../../../../lib/Xm/.libs/libXm.so: undefined reference to symbol 'XFillArc'`, but mine (listed above) complains with: `/usr/lib/gcc/x86_64-redhat-linux/8/../../../../lib64/crt1.o: In function '_start': 2221 (.text+0x24): undefined reference to 'main'`. Are these actually the same linking error?
@ax3l Since this still fails for me, but works on your machine, can you re-open, and un-duplicate this issue?
Agreed, thx for the ping :+1: 
I wanted to report that I see the exact same error with 
```console
$> spack install motif%gcc

  >> 2590    /home/abuild/rpmbuild/BUILD/glibc-2.26/csu/../sysdeps/x86_64/start.S:110: undefined reference to `main'
  >> 2591    collect2: error: ld returned 1 exit status
  >> 2592    make[2]: *** [Makefile:505: wmluiltok] Error 1
     2593    make[2]: *** Waiting for unfinished jobs....

```



For anyone wondering the system info, here it is

$> spack debug report
* **Spack:** 0.20.0.dev0 (ce81f15e6f7390953e0035ada5c0399da0c4e44b)
* **Python:** 3.6.12
* **Platform:** linux-sles15-haswell
* **Concretizer:** clingo

Resolving patch:
diff --git a/var/spack/repos/builtin/packages/motif/package.py b/var/spack/repos/builtin/packages/motif/package.py
--- a/var/spack/repos/builtin/packages/motif/package.py
+++ b/var/spack/repos/builtin/packages/motif/package.py
@@ -39,6 +39,8 @@ class Motif(AutotoolsPackage):
     depends_on("pkgconfig", type="build")
 
     patch("add_xbitmaps_dependency.patch")
+    # ensure tools/wml/wmluiltok.c has a main function
+    patch("add_wmluiltok_option_main.patch")
 
     def patch(self):
         # fix linking the simple_app demo program


Test patch: