There's more than one way to do things | |
PerlMonks |
Re^2: XML::LibXML fails install on macOS Big Surby Skalef (Initiate) |
on Jan 12, 2021 at 15:14 UTC ( [id://11126798]=note: print w/replies, xml ) | Need Help?? |
Hi, this is my first post ;-) I'm a reader for nearly 20 years now, perhaps i can help today ;-) Anyhow, the problem originates from the fact, that BigSur provides a native XML Library and therefore the cc compiler will always favor the local libxml which differs from the version homebrew is providing. homebrew version: '20904' Big sur version: '20910' How you can get it working: (Assuming you have perl-5.3.32 homebrew package installed) 1.) install the gcc homebrew package ! 2.) Extract the source 3.) perl Makefile.PL 4.) Edit the Makefile Change these lines: Change the CC binary CC = gccChange the LD binary LD = gccChange the LDDFLAGS to:
Change the LDFLAGS to LDFLAGS = -L/usr/local/opt/libxml2/lib -L/usr/local/lib/perl5/5.32.0/darwin-thread-multi-2level/CORE -mmacosx-version-min=10.15 -fstack-protector-strong -lxml2 -lperlChange the INC Path to INC = -I/usr/local/opt/libxml2/includeChange the PASSTHROUGH INC PASTHRU_INC='-I/usr/local/opt/libxml2/include $(PASTHRU_INC)'Then build: makeCheck using otool:
(3 tests will fail because the tests favor the native libs, so don't mind make installBest regards Franz
In Section
Seekers of Perl Wisdom
|
|