Opened 4 months ago
Closed 4 months ago
#70349 closed defect (fixed)
libkml @1.3.0: fails to build due to a conflict with minizip headers: error: redefinition of typedef ‘open_file_func’
Reported by: | barracuda156 | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | Dave-Allured (Dave Allured) | |
Port: | libkml, minizip |
Description
In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/unzip.c:44: /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/iomem_simple.h:38: error: redefinition of typedef ‘open_file_func’ /opt/local/include/minizip/ioapi.h:137: error: previous declaration of ‘open_file_func’ was here /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/iomem_simple.h:39: error: redefinition of typedef ‘read_file_func’ /opt/local/include/minizip/ioapi.h:138: error: previous declaration of ‘read_file_func’ was here /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/iomem_simple.h:40: error: redefinition of typedef ‘write_file_func’ /opt/local/include/minizip/ioapi.h:139: error: previous declaration of ‘write_file_func’ was here /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/iomem_simple.h:41: error: redefinition of typedef ‘tell_file_func’ /opt/local/include/minizip/ioapi.h:143: error: previous declaration of ‘tell_file_func’ was here /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/iomem_simple.h:42: error: redefinition of typedef ‘seek_file_func’ /opt/local/include/minizip/ioapi.h:144: error: previous declaration of ‘seek_file_func’ was here /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/iomem_simple.h:43: error: redefinition of typedef ‘close_file_func’ /opt/local/include/minizip/ioapi.h:140: error: previous declaration of ‘close_file_func’ was here /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_libkml/libkml/work/libkml-1.3.0/src/kml/base/contrib/minizip/iomem_simple.h:44: error: redefinition of typedef ‘testerror_file_func’ /opt/local/include/minizip/ioapi.h:141: error: previous declaration of ‘testerror_file_func’ was here
Change History (6)
comment:1 follow-up: 4 Changed 4 months ago by barracuda156
comment:2 Changed 4 months ago by barracuda156
I do not know why, but it seems that sources build contrib/minizip regardless of whether it is found by configure, so we cannot avoid conflicting headers. However, build with modern gcc works fine, so we can just blacklist Xcode gcc as an easy fix.
comment:3 Changed 4 months ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
comment:4 follow-up: 5 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Status: | assigned → accepted |
---|---|
Summary: | libkml fails to build due to a conflict with minizip headers: error: redefinition of typedef ‘open_file_func’ → libkml @1.3.0: fails to build due to a conflict with minizip headers: error: redefinition of typedef ‘open_file_func’ |
Replying to barracuda156:
iomem_simple.h:38: error: redefinition of typedef ‘open_file_func’ ioapi.h:137: error: previous declaration of ‘open_file_func’ was here
This is https://github.com/libkml/libkml/issues/253.
Replying to barracuda156:
Oh, it requires
minizip
, but uses bundled headers instead.
That is unexpected and surely not what I intended. I'm not sure what needs to be changed to make libkml use only MacPorts minizip and not its bundled headers.
comment:5 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Replying to ryandesign:
Replying to barracuda156:
iomem_simple.h:38: error: redefinition of typedef ‘open_file_func’ ioapi.h:137: error: previous declaration of ‘open_file_func’ was here
It might be fixed by the first chunk of this commit:
https://github.com/libkml/libkml/commit/d4adfd8a8862ce460314e514b26cffc9815f06ea
comment:6 Changed 4 months ago by ryandesign (Ryan Carsten Schmidt)
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Oh, it requires
minizip
, but uses bundled headers instead.