Opened 11 months ago

Closed 11 months ago

Last modified 10 months ago

#67574 closed defect (fixed)

dia @0.97.3_6 is broken by icu update

Reported by: fhgwright (Fred Wright) Owned by: fhgwright (Fred Wright)
Priority: Normal Milestone:
Component: ports Version: 2.8.1
Keywords: Cc:
Port: dia

Description

The dia executable references three icu libraries, and hence is broken by the icu version update. This seems to be an indirect dependency via libxml2, which may be why the needed revbump was missed.

Since this is nomaintainer, I'm assigning it to myself. A testing complication is that I think I saw icu itself broken on at least one platform.

Change History (7)

comment:1 in reply to:  description Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to fhgwright:

This seems to be an indirect dependency via libxml2

If so, that would be overlinking and should be fixed. For example, if dia uses xml2-config --libs to determine what libs to use, it should be changed to xml2-config --libs --dynamic.

comment:2 in reply to:  description ; Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to fhgwright:

A testing complication is that I think I saw icu itself broken on at least one platform.

If so, that would need to be fixed ASAP since it is a dependency of so much. Port health indicators are currently green and I don't see any critical bug reports so if you know of a system it fails on please file a bug report.

comment:3 in reply to:  2 ; Changed 11 months ago by fhgwright (Fred Wright)

Replying to ryandesign:

Replying to fhgwright:

This seems to be an indirect dependency via libxml2

If so, that would be overlinking and should be fixed. For example, if dia uses xml2-config --libs to determine what libs to use, it should be changed to xml2-config --libs --dynamic.

Assuming it's really an indirect dependency and not an undeclared direct dependency, but a bit of grepping seems to indicate that this is the case. The actual build procedure involves an autogen script, so some digging will probably be needed to sort out the build options. There's no evidence that this is a MacPorts-specific bug.

Replying to ryandesign:

Replying to fhgwright:

A testing complication is that I think I saw icu itself broken on at least one platform.

If so, that would need to be fixed ASAP since it is a dependency of so much. Port health indicators are currently green and I don't see any critical bug reports so if you know of a system it fails on please file a bug report.

It appears that I was mistaken on this point. I thought I'd seen an icu failure go flying by while updating 23 systems after a three-week absence.

comment:4 in reply to:  3 ; Changed 11 months ago by fhgwright (Fred Wright)

Replying to fhgwright:

Replying to ryandesign:

Replying to fhgwright:

This seems to be an indirect dependency via libxml2

If so, that would be overlinking and should be fixed. For example, if dia uses xml2-config --libs to determine what libs to use, it should be changed to xml2-config --libs --dynamic.

That was indeed the issue. Fixed in https://github.com/macports/macports-ports/pull/19228

Given that it doesn't directly call icu, the following seems suspect:

# required for for ICU
compiler.cxx_standard     2011
configure.cxxflags-append -std=c++11

I left that as is, but it may be why on 10.5 i386 it tries to build with the slightly broken clang-7.0.

comment:5 in reply to:  4 ; Changed 11 months ago by ryandesign (Ryan Carsten Schmidt)

Replying to fhgwright:

That was indeed the issue. Fixed in https://github.com/macports/macports-ports/pull/19228

Excellent, thanks.

Given that it doesn't directly call icu, the following seems suspect:

# required for for ICU
compiler.cxx_standard     2011
configure.cxxflags-append -std=c++11

As I recall, the ICU headers require C++11 or newer so anything including those headers needs at least a C++11 compiler and to be compiling in C++11 mode or newer too. So these lines are correct and should not be removed.

comment:6 Changed 11 months ago by fhgwright (Fred Wright)

Resolution: fixed
Status: assignedclosed

In 960b0388e02dca34ad2c61731ab45cf719c5d1cc/macports-ports (master):

dia: fix overlinking of icu

The build of the dia executable was erroneously including the icu
libraries, even though they're not used directly. This caused
breakage when icu was updated without rebuilding dia. The patchfile
for configure.in now corrects this.

Closes: #67574

TESTED:
Built all variants successfully on 10.9 x86_64.
Built default variants on 10.4-10.5 ppc, 10.5-10.6 i386, 10.5-10.15
x86_64, and 11.x-13.x arm64. All successful except 10.4 i386 and 10.5
x86_64 (due to broken glib2 build) and 10.5 i386 (due to broken
clang-7.0).

comment:7 in reply to:  5 Changed 10 months ago by fhgwright (Fred Wright)

Replying to ryandesign:

Replying to fhgwright:

Given that it doesn't directly call icu, the following seems suspect:

# required for for ICU
compiler.cxx_standard     2011
configure.cxxflags-append -std=c++11

As I recall, the ICU headers require C++11 or newer so anything including those headers needs at least a C++11 compiler and to be compiling in C++11 mode or newer too. So these lines are correct and should not be removed.

Except that dia doesn't use the icu headers. I verified that dia can build with the icu headers (/opt/local/include/unicode/) renamed out of sight (but not with icu deactivated, since that breaks xsltproc).

The C++11 requirement was added by commit 8cf9b206c3c2fcca0e0f6ee2a46f47bc828a3cb7, which modified 64 files for an icu update. Maybe dia was a victim of "human overlinking".

I left it alone based on the risk vs. benefit of changing it, not because I think that's the most correct result.

Note: See TracTickets for help on using tickets.