Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#59400 closed defect (fixed)

xar overlinks with libxml2's dependencies

Reported by: jmroot (Joshua Root) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: xar

Description

Xar doesn't use icu directly, but ends up linked with it. This is because it uses xml2-config, which has no --static option and so always output the libs needed for static linking. Using pkg-config instead would fix this.

Change History (10)

comment:1 Changed 5 years ago by Schamschula (Marius Schamschula)

I disabled xml2-config by adding configure.args --without-xml2-config

and added depends_build port:pkgconfig for pkg-config, but I end up with the same set of libraries as before:

otool -L /opt/local/lib/libxar.1.dylib
/opt/local/lib/libxar.1.dylib:
	/opt/local/lib/libxar.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.4.0)
	/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.8)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/opt/local/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.9.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
	/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
	/opt/local/lib/libicui18n.65.dylib (compatibility version 65.0.0, current version 65.1.0)
	/opt/local/lib/libicuuc.65.dylib (compatibility version 65.0.0, current version 65.1.0)
	/opt/local/lib/libicudata.65.dylib (compatibility version 65.0.0, current version 65.1.0)

comment:2 Changed 5 years ago by Schamschula (Marius Schamschula)

Looking at the config.log I still see

checking for xml2-config... /opt/local/bin/xml2-config

so apparently --without-xml2-config is ignored.

No mention of pkg-config...

comment:3 Changed 5 years ago by jmroot (Joshua Root)

The configure script doesn't currently have any code to check for libxml2 using pkg-config.

comment:4 Changed 5 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed

In d9d62e94463da2b849f73c1368647fdf66c1c06e/macports-ports (master):

xar: use pkg-config with --libs --static rather than xml2-config

Closes: #59400

comment:5 Changed 5 years ago by jmroot (Joshua Root)

Sorry, perhaps I didn't explain well: using --static with pkg-config is incorrect because we are not linking statically. It will return link flags for all the indirect dependencies just like xml2-config does.

comment:6 Changed 5 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: closedreopened

comment:7 Changed 5 years ago by Schamschula (Marius Schamschula)

OK. So we don't want the --static flag?

That would be an easy edit of the patch file.

comment:8 Changed 5 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: reopenedclosed

In 8f62225b2abe5e99090a8dd5e41869884cbf533f/macports-ports (master):

xar: don't use the --static flag!

Closes: #59400

comment:9 Changed 5 years ago by Schamschula (Marius Schamschula)

Indeed:

 otool -L /opt/local/lib/libxar.1.dylib
/opt/local/lib/libxar.1.dylib:
	/opt/local/lib/libxar.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.4.0)
	/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.8)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/opt/local/lib/libcrypto.1.1.dylib (compatibility version 1.1.0, current version 1.1.0)
	/opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.9.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)

comment:10 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

In 587f1be6fe33eb88005a803717c385277d51c27d/macports-ports (master):

xar: Drop libiconv dependency

See: #59400#comment:9

Note: See TracTickets for help on using tickets.