[MacPorts] #63164: py-libxml2 icu cctools - FAT libraries built on i386 Mac OS X Tiger fail to run

MacPorts noreply at macports.org
Fri Jul 9 13:36:24 UTC 2021


#63164: py-libxml2 icu cctools - FAT libraries built on i386 Mac OS X Tiger fail to
run
-------------------------+--------------------
  Reporter:  bradleyCPA  |      Owner:  (none)
      Type:  defect      |     Status:  new
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:              |
-------------------------+--------------------

Comment (by bradleyCPA):

 Isolate
 {{{
 #include <stdio.h>

 int
 main() {
         fprintf(stdout, "starting proggy\n");
         long long dividend = 123456;
         long long divisor = 43;
         long long remainder;
         __divmoddi4(dividend, divisor, remainder);
 }
 }}}
 Compile
 {{{
 gcc-mp-7 -L/opt/local/lib/libgcc -o test.dylib -dynamiclib
 -current_version 1.0 -compatibility_version 1.0 -O3 test.c
 }}}
 Evaluate
 {{{
 barf at tiger:~/Documents/lipo_work/divmoddi$ otool -L test.dylib
 test.dylib:
         test.dylib (compatibility version 1.0.0, current version 1.0.0)
         /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current
 version 1.0.0)
         /opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version
 1.0.0, current version 1.0.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 88.3.11)
 }}}
 Run
 {{{
 barf at tiger:~/Documents/lipo_work/divmoddi$ python3.9
 Python 3.9.5 (default, Jun 13 2021, 23:36:56)
 [GCC 4.2.1 (Apple Inc. build 5666) (dot 3) (MacPorts apple-gcc42
 5666.3_16+boot on darwin
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import ctypes
 >>> barf = ctypes.cdll.LoadLibrary("./test.dylib")
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py",
 line 452, in LoadLibrary
     return self._dlltype(name)
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/ctypes/__init__.py",
 line 374, in __init__
     self._handle = _dlopen(self._name, mode)
 OSError: dlopen(./test.dylib, 6): Symbol not found: ___divmoddi4
   Referenced from: ./test.dylib
   Expected in: /usr/lib/libgcc_s.1.dylib

 >>> ^D
 }}}
 Seems to be most direct way to show the problem outside of specific ports.

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


More information about the macports-tickets mailing list