[MacPorts] #64197: nvi @1.81.6_6 build failure: implicit declaration of function 'conv_enc'

MacPorts noreply at macports.org
Thu Jun 15 05:54:57 UTC 2023


#64197: nvi @1.81.6_6 build failure: implicit declaration of function 'conv_enc'
------------------------+--------------------------------------
  Reporter:  rdprdprdp  |      Owner:  (none)
      Type:  defect     |     Status:  assigned
  Priority:  Normal     |  Milestone:
 Component:  ports      |    Version:  2.7.1
Resolution:             |   Keywords:  catalina bigsur monterey
      Port:  nvi        |
------------------------+--------------------------------------

Comment (by bK4gYuRo):

 'conv_enc' problem can be circumvented (I don't claim 'fixed') by using
 -Wno-implicit-function-declaration as homebrew does in its formula for nvi
 in https://github.com/Homebrew/homebrew-
 core/blob/03953b73769b91e3fe2f8bdb8291d42107eb34f6/Formula/nvi.rb

 When I got past this problem, I faced another one, with linking.

 Apparently, libtool needs this variable to be able to link nvi:
 {{{
 # Flag that allows shared libraries with undefined symbols to be built.
 allow_undefined_flag="\${wl}-undefined \${wl}dynamic_lookup"
 }}}



 Unfortunately, configure leaves this variable unset on any macOS above
 10.*:
 {{{
     darwin* | rhapsody*)
       case $host_os in
         rhapsody* | darwin1.[012])
          allow_undefined_flag='${wl}-undefined ${wl}suppress'
          ;;
        *) # Darwin 1.3 on
          if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
            allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined
 ${wl}suppress'
          else
            case ${MACOSX_DEPLOYMENT_TARGET} in
              10.[012])
                allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined
 ${wl}suppress'
                ;;
              10.*)
                allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup'
                ;;
            esac
          fi
          ;;
       esac
 }}}

 So my crude fix for Ventura was a patch for configure. Build succeeded and
 I got a usable (in my limited testing) binary.

 I am attaching my modified portfile and patch of configure

-- 
Ticket URL: <https://trac.macports.org/ticket/64197#comment:3>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list