[MacPorts] #62718: LibClamAV Warning: Cannot dlopen libclamunrar_iface

MacPorts noreply at macports.org
Fri Jun 4 18:04:23 UTC 2021


#62718: LibClamAV Warning: Cannot dlopen libclamunrar_iface
---------------------+------------------------
  Reporter:  pdvnl   |      Owner:  danielluke
      Type:  defect  |     Status:  assigned
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.6.4
Resolution:          |   Keywords:
      Port:  clamav  |
---------------------+------------------------

Comment (by grumpybozo):

 A few maybe relevant data points:

 1. I am having exactly the same problem on a 10.14.6 machine without any
 of the possible issues from running in a VM.
 2. By accident, I discovered that if I run freshclam or clamscan from
 /opt/local/lib/ the warning message is NOT issued.
 3. By running with dtruss, I see a hunt in various directories for
 libclamunrar_iface.so.9 (which doesn't exist anywhere) instead of
 libclamunrar_iface.9.so (which does.)
 4. On a 10.11.6 machine, I don't have this problem.


 The key (I think?) step in the build appears to be this:


 {{{
 libtool: link: /usr/bin/clang++  -o .libs/libclamunrar_iface.9.so -bundle
 ../libclamunrar_iface/.libs/libclamunrar_iface_la-unrar_iface.o
 -L/opt/local/lib ./.libs/libclamunrar.dylib -lcharset  -Os -stdlib=libc++
 -arch x86_64 -Wl,-M -Wl,../libclamunrar_iface/libclamunrar_iface.map
 -Wl,-headerpad_max_install_names -Wl,-syslibroot
 -Wl,/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk -arch x86_64
 ld: warning: ignoring file ../libclamunrar_iface/libclamunrar_iface.map,
 file was built for unsupported file format ( 0x43 0x4C 0x41 0x4D 0x41 0x56
 0x5F 0x50 0x52 0x49 0x56 0x41 0x54 0x45 0x20 0x7B ) which is not the
 architecture being linked (x86_64):
 ../libclamunrar_iface/libclamunrar_iface.map
 libtool: link: (cd ".libs" && rm -f "libclamunrar_iface.so" && ln -s
 "libclamunrar_iface.9.so" "libclamunrar_iface.so")
 libtool: link: ( cd ".libs" && rm -f "libclamunrar_iface.la" && ln -s
 "../libclamunrar_iface.la" "libclamunrar_iface.la" )
 }}}

 There is one small difference on 10.11.6:


 {{{
 libtool: link: /usr/bin/clang++  -o .libs/libclamunrar_iface.9.so -bundle
 ../libclamunrar_iface/.libs/libclamunrar_iface_la-unrar_iface.o
 -L/opt/local/lib -lMacportsLegacySupport ./.libs/libclamunrar.dylib
 -lcharset  -Os -stdlib=libc++ -arch x86_64 -Wl,-M
 -Wl,../libclamunrar_iface/libclamunrar_iface.map
 -Wl,-headerpad_max_install_names -arch x86_64
 ld: warning: ignoring file ../libclamunrar_iface/libclamunrar_iface.map,
 file was built for unsupported file format ( 0x43 0x4C 0x41 0x4D 0x41 0x56
 0x5F 0x50 0x52 0x49 0x56 0x41 0x54 0x45 0x20 0x7B ) which is not the
 architecture being linked (x86_64):
 ../libclamunrar_iface/libclamunrar_iface.map
 libtool: link: (cd ".libs" && rm -f "libclamunrar_iface.so" && ln -s
 "libclamunrar_iface.9.so" "libclamunrar_iface.so")
 libtool: link: ( cd ".libs" && rm -f "libclamunrar_iface.la" && ln -s
 "../libclamunrar_iface.la" "libclamunrar_iface.la" )
 }}}

 Note the  '-lMacportsLegacySupport'

 I hope this helps illuminate the problem in some way.

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


More information about the macports-tickets mailing list