[MacPorts] #72686: ldmud build failure: applied_decl.c: error: field name not in record or union initializer

MacPorts noreply at macports.org
Sun Jul 13 11:14:46 UTC 2025


#72686: ldmud build failure: applied_decl.c: error: field name not in record or
union initializer
--------------------------+--------------------
 Reporter:  barracuda156  |      Owner:  (none)
     Type:  defect        |     Status:  new
 Priority:  Normal        |  Milestone:
Component:  ports         |    Version:  2.10.7
 Keywords:                |       Port:  ldmud
--------------------------+--------------------
 First of all, portfile setting for `configure.cflags` does nothing: cflags
 are not passed.

 Initially build fails with:
 {{{
 --->  Building ldmud
 Executing:  cd
 "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_ldmud/ldmud/work/ldmud-3.6.8/src"
 && /usr/bin/make -w all
 make: Entering directory
 `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_games_ldmud/ldmud/work/ldmud-3.6.8/src'
 ./mk-patchlevel.sh
 ./mk_bytecode_gen.sh > bytecode_gen.h
 /usr/bin/gcc-4.2 -Os -fwrapv -g   -Wall -Wparentheses -Wshadow -Wstrict-
 overflow=2  -DMUD_LIB='"/opt/local/var/ldmud"' -DBINDIR='"/opt/local/bin"'
 -DERQ_DIR='"/opt/local/libexec"'  -I/opt/local/include  -c -o
 access_check.o access_check.c
 In file included from comm.h:11,
                  from access_check.h:7,
                  from access_check.c:102:
 iconv_opt.h: In function ‘iconv_opt’:
 iconv_opt.h:104: error: ‘for’ loop initial declaration used outside C99
 mode
 make: *** [access_check.o] Error 1
 }}}

 Adding `configure.cflags-append -std=c99` does nothing.

 Once passing flags is fixed, build fails on:

 {{{
 /usr/bin/gcc-4.2 -Os -std=c99 -fwrapv -g   -Wall -Wparentheses -Wshadow
 -Wstrict-overflow=2  -DMUD_LIB='"/opt/local/var/ldmud"'
 -DBINDIR='"/opt/local/bin"' -DERQ_DIR='"/opt/local/libexec"'
 -I/opt/local/libexec/openssl3/include -isystem/opt/local/include  -c -o
 applied_decl.o applied_decl.c
 In file included from exec.h:183,
                  from applied_decl.h:11,
                  from applied_decl.c:7:
 types.h:193: warning: declaration does not declare anything
 types.h:205: warning: declaration does not declare anything
 In file included from applied_decl.h:11,
                  from applied_decl.c:7:
 exec.h:429: warning: declaration does not declare anything
 In file included from applied_decl.c:7:
 applied_decl.h:34: warning: declaration does not declare anything
 applied_decl.c:18: warning: braces around scalar initializer
 applied_decl.c:18: warning: (near initialization for
 ‘applied_decl_master[0].vis_name’)
 applied_decl.c:18: error: field name not in record or union initializer
 applied_decl.c:18: error: (near initialization for
 ‘applied_decl_master[0].vis_name’)
 applied_decl.c:18: warning: initialization makes integer from pointer
 without a cast
 applied_decl.c:18: warning: excess elements in struct initializer
 applied_decl.c:18: warning: (near initialization for
 ‘applied_decl_master[0]’)
 applied_decl.c:19: warning: braces around scalar initializer
 applied_decl.c:19: warning: (near initialization for
 ‘applied_decl_master[1].vis_name’)
 applied_decl.c:19: error: field name not in record or union initializer
 applied_decl.c:19: error: (near initialization for
 ‘applied_decl_master[1].vis_name’)
 applied_decl.c:19: warning: initialization makes integer from pointer
 without a cast
 applied_decl.c:19: warning: excess elements in struct initializer
 applied_decl.c:19: warning: (near initialization for
 ‘applied_decl_master[1]’)
 applied_decl.c:20: warning: braces around scalar initializer
 applied_decl.c:20: warning: (near initialization for
 ‘applied_decl_master[2].vis_name’)
 applied_decl.c:20: error: field name not in record or union initializer
 applied_decl.c:20: error: (near initialization for
 ‘applied_decl_master[2].vis_name’)
 }}}

 So probably it actually needs C11, or in any case Xcode gcc should be
 blacklisted.

-- 
Ticket URL: <https://trac.macports.org/ticket/72686>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list