Opened 3 years ago
Closed 10 months ago
#64197 closed defect (fixed)
nvi @1.81.6_6 build failure: implicit declaration of function 'conv_enc'
Reported by: | rdprdprdp (Richard Palmer) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.7.1 |
Keywords: | catalina bigsur monterey | Cc: | bK4gYuRo, srirangav (Sriranga Veeraraghavan) |
Port: | nvi |
Description (last modified by rdprdprdp (Richard Palmer))
Warning: Configuration logfiles contain indications of -Wimplicit-function-declaration; check that features were not accidentally disabled:
/opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_editors_nvi/nvi/main.log
Attachments (3)
Change History (11)
Changed 3 years ago by rdprdprdp (Richard Palmer)
comment:1 Changed 3 years ago by rdprdprdp (Richard Palmer)
Description: | modified (diff) |
---|
comment:2 Changed 3 years ago by jmroot (Joshua Root)
Keywords: | catalina bigsur monterey added |
---|---|
Milestone: | MacPorts Future |
Summary: | port nvi does not build → nvi @1.81.6_6 build failure: implicit declaration of function 'conv_enc' |
comment:3 follow-up: 6 Changed 17 months ago 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
Changed 17 months ago by bK4gYuRo
Attachment: | patch-configure.diff added |
---|
patch configure for Ventura
comment:4 Changed 17 months ago by bK4gYuRo
Cc: | bK4gYuRo added |
---|
comment:5 follow-up: 7 Changed 17 months ago by kencu (Ken)
Second part of that looks like a slightly different version of the libtool issue we’ve had to patch on a number of ports, eg
comment:6 Changed 17 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to bK4gYuRo:
'conv_enc' problem can be circumvented (I don't claim 'fixed') by using -Wno-implicit-function-declaration as homebrew does
These errors need to be fixed properly, not suppressed; see WimplicitFunctionDeclaration.
I'll see if I can do something to fix this port.
comment:7 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to kencu:
Second part of that looks like a slightly different version of the libtool issue we’ve had to patch on a number of ports, eg
That's an outdated version of the patch that didn't properly handle the case where the deployment target is not set on PowerPC Mac OS X 10.3 and 10.4 (which, granted, should not occur in MacPorts, but I like using the most correct patch anyway). This is the correct current version:
Read my comments in the bug report whose URL is at the top of that patch if you want to understand its logic.
comment:8 Changed 10 months ago by ryandesign (Ryan Carsten Schmidt)
Cc: | srirangav added |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Build log of nvi;.