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 = gcc
Change the LD binary
LD = gcc
Change the LDDFLAGS to:
LDDLFLAGS = -L/usr/local/opt/libxml2/lib -L/usr/local/lib/perl5/5.32.0
+/darwin-thread-multi-2level/CORE -mmacosx-version-min=10.15 -bundle -
+fstack-protector-
strong -lxml2 -lperl
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 -lperl
Change the INC Path to
INC = -I/usr/local/opt/libxml2/include
Change the PASSTHROUGH INC
PASTHRU_INC='-I/usr/local/opt/libxml2/include $(PASTHRU_INC)'
Then build:
make
Check using otool:
$otool -L blib/arch/auto/XML/LibXML/LibXML.bundle
blib/arch/auto/XML/LibXML/LibXML.bundle:
/usr/local/opt/libxml2/lib/libxml2.2.dylib (compatibility version
+12.0.0, current version 12.10.0)
/usr/local/opt/perl/lib/perl5/5.32.0/darwin-thread-multi-2level/CO
+RE/libperl.dylib (compatibility version 5.32.0, current version 5.32.
+0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current v
+ersion 1292.60.1)
/usr/local/lib/gcc/10/libgcc_s.1.dylib (compatibility version 1.0.
+0, current version 1.0.0)
make test
(3 tests will fail because the tests favor the native libs, so don't mind
make install
Best regards
Franz
|