Opened 5 years ago

Closed 5 years ago

#58350 closed defect (fixed)

libxml2 @2.9.9: Incorrect ICU include search paths, related to #57990

Reported by: AndyWharton Owned by: Roy Storey <kiwiroy@…>
Priority: Normal Milestone:
Component: ports Version: 2.5.4
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: libxml2

Description

Compilation against MacPorts libxml2 still fails to find some of the required ICU includes:

In file included from /opt/local/include/libxml2/libxml/encoding.h:31:
/opt/local/include/unicode/ucnv.h:52:10: fatal error: 'unicode/ucnv_err.h' file not found
#include "unicode/ucnv_err.h"

Should the fix to #57990 have also included changes to the ICU headers? Or have these changes already been made and the installed version is just lagging behind?

Change History (6)

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

Cc: ryandesign MarcusCalhoun-Lopez added

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

No further changes have been made. I had not considered that encoding.h might include other icu headers. I'm not certain how many of the headers we would have to modify with the absolute path to make this work. I'm not sure if going to the trouble of figuring that out and then doing it is worthwhile.

comment:3 Changed 5 years ago by AndyWharton

The fix appears to be removing the hard coded paths, and updating libxml-2.0.pc to return the additional compile time requirement in the --cflags.

I will poke around to see if this is safe based on the include files that libxml2 can pick up, and make these changes if that'll help... I'm unsure how to go about updating the content for libxml-2.0.pc though. I will hunt for an example, and update that as well if I can.

Last edited 5 years ago by AndyWharton (previous) (diff)

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

Yes, we could do that, bearing in mind the problems that this could cause, and the reasons why we stopped doing that for glib2.

comment:5 Changed 5 years ago by jrhope

What about removing the hard-coded path and instead creating a symlink PREFIX/include/libxml2/unicode->../unicode/? That would avoid the glib2 problem, since PREFIX/include would still be out of the include path.

comment:6 Changed 5 years ago by Roy Storey <kiwiroy@…>

Owner: set to Roy Storey <kiwiroy@…>
Resolution: fixed
Status: newclosed

In 5c1039bdca467463dfd874aba7c474ed8f7b144b/macports-ports (master):

libxml2: fix building against libxml2

closes: #58350
fix: Perl5-Alien/Alien-Libxml2https://github.com/macports/macports-ports/pull/13

Note: See TracTickets for help on using tickets.