Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

blarghenha

macrumors newbie
Original poster
Jun 26, 2021
2
0
What's the best way to fix:

Code:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/libxml2.py", line 1, in <module>
    import libxml2mod
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/libxml2mod.so, 2): Symbol not found: ___divmoddi4
  Referenced from: /opt/local/lib/libicui18n.67.dylib

when building macports icu on Tiger?

My current solution is to set:

Code:
configure.optflags -O0

in the Portfile and I wonder if there is a better way to prevent this optimization.
 

Slartibart

macrumors 68030
Aug 19, 2020
2,902
2,608
Hm, the actual version of libxml2 is 2.9.5. Why don’t you install the latest version? That probably solves the error. Which version do you have installed?

EDIT: corrected fact missing assumption.
 

blarghenha

macrumors newbie
Original poster
Jun 26, 2021
2
0
Yeah, the problem isn't libxml2. When ICU is compiled through macports without -O0, it expects /usr/lib/libgcc_s.1.dylib to contain ___divmoddi4. Sadly, it doesn't on Tiger.

Code:
nm /usr/lib/libgcc_s.1.dylib | grep divmoddi4
/usr/lib/libgcc_s.1.dylib(_udivmoddi4_s.o):
90bd5b6d T ___udivmoddi4

A more recent version of libgcc_s would have something like

Code:
nm libgcc_s.1.dylib | grep divmoddi4
00004480 T ___divmoddi4
000048b0 T ___udivmoddi4

Disabling compiler optimization prevents this. Sadly, I don't know of a better way.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.