#846 closed defect (fixed)
UTF8 BOM in headers ?
Reported by: | landry | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.6.3 |
Component: | Default | Version: | 3.6.2 |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
I have a build failure for 3.6.2 on sparc64 using gcc4.9; see http://build-failures.rhaalovely.net//sparc64/2017-11-12/geo/geos.log for the full log, but the interesting part is:
../../../include/geos/geom/Polygonal.h:1: error: stray '\357' in program ../../../include/geos/geom/Polygonal.h:1: error: stray '\273' in program ../../../include/geos/geom/Polygonal.h:1: error: stray '\277' in program In file included from ../../../include/geos/geom/MultiPolygon.h:29, from IndexedPointInAreaLocator.cpp:19: ../../../include/geos/geom/Polygonal.h:1: error: stray '\357' in program ../../../include/geos/geom/Polygonal.h:1: error: stray '\273' in program ../../../include/geos/geom/Polygonal.h:1: error: stray '\277' in program In file included from ../../../include/geos/geom/LineString.h:27, from IndexedPointInAreaLocator.cpp:20: ../../../include/geos/geom/Lineal.h:1: error: stray '\357' in program ../../../include/geos/geom/Lineal.h:1: error: stray '\273' in program ../../../include/geos/geom/Lineal.h:1: error: stray '\277' in program In file included from ../../../include/geos/util/IllegalArgumentException.h:22, from IndexedPointInAreaLocator.cpp:25: ../../../include/geos/util/GEOSException.h:1: error: stray '\357' in program ../../../include/geos/util/GEOSException.h:1: error: stray '\273' in program ../../../include/geos/util/GEOSException.h:1: error: stray '\277' in program $file include/geos/*/*|grep ISO include/geos/geom/Lineal.h: ISO-8859 English text include/geos/geom/Polygonal.h: ISO-8859 English text include/geos/geom/Puntal.h: ISO-8859 English text include/geos/util/GEOSException.h: ISO-8859 English text
It seems those files start with an utf8 BOM:
$head -1 include/geos/geom/Lineal.h |hexdump 0000000 bbef 2fbf 2a2a $head -1 include/geos/geom/IntersectionMatrix.h |hexdump 0000000 2a2f 2a2a 2a2a
Pretty sure removing those wrong chars will fix my build.. either way they shouldnt be here :)
Change History (15)
comment:1 by , 7 years ago
comment:4 by , 7 years ago
Please check if [dbc52d41fd43bb9bdec31fc9969a66d05bc4bf95/git] builds fine there.
comment:5 by , 7 years ago
Hmmm well i saw the issue on 3.6 branch, and the fixes are on trunk/master, where there's now a requirement for c++1, which will force the use of a recent/decent compiler, which will support UTF-8 BOM (as that's already the case on amd64/i386 for OpenBSD) - so that should work in all cases now, but i cant really test now, unless the commits are backported to 3.6.
Either way, thanks for fixing it!
comment:9 by , 7 years ago
Hah, there's another bunch (in 3.6 branch):
CGAlgorithms.cpp:1: error: stray '\357' in program CGAlgorithms.cpp:1: error: stray '\273' in program CGAlgorithms.cpp:1: error: stray '\277' in program LineIntersector.cpp:1: error: stray '\357' in program LineIntersector.cpp:1: error: stray '\273' in program LineIntersector.cpp:1: error: stray '\277' in program ... ...
To find them all, some shell fu helps
find src/ include/ |while read f ; do file $f ; done |grep ISO src/algorithm/CGAlgorithms.cpp: ISO-8859 English text src/algorithm/LineIntersector.cpp: ISO-8859 English text src/geom/IntersectionMatrix.cpp: ISO-8859 English text include/geos/index/strtree/AbstractSTRtree.h: ISO-8859 English text
With those 4 files locally fixed, git branch svn-3.6 builds fine with g++ 4.2.1 on OpenBSD/amd64.
Err sorry that is with gcc 4.2.1 (yeah i know ancient)