Opened 12 years ago

Closed 12 years ago

#33032 closed defect (fixed)

tesseract: build failure because ccutil/strngs.h has UTF-8 BOM

Reported by: jlg89 Owned by: markemer (Mark Anderson)
Priority: Normal Milestone:
Component: ports Version: 2.0.3
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: tesseract

Description (last modified by ryandesign (Ryan Carsten Schmidt))

The strngs.h file in this build (at least for the PPC version) has an invisible first character that kills the compile. A "set list" in vi won't show the invisible first character, but if you cat the file you should be able to see it. I fixed it by copying the contents of strngs.h and pasting into a new file, then renaming the new file to strngs.h.

The log errors will look like:

:info:build strngs.h:1: error: stray '\239' in program
:info:build strngs.h:1: error: stray '\187' in program
:info:build strngs.h:1: error: stray '\191' in program

Change History (3)

comment:1 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: strngs.h:1: error: stray '\191' in program removed
Owner: changed from macports-tickets@… to emer@…
Port: 3.0.1 removed
Summary: Bad character in line 1 of tesseract-3.01/ccutil/strngs.htesseract: Bad character in line 1 of tesseract-3.01/ccutil/strngs.h

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

Cc: ryandesign@… added
Summary: tesseract: Bad character in line 1 of tesseract-3.01/ccutil/strngs.htesseract: build failure because ccutil/strngs.h has UTF-8 BOM

That stray character is the UTF-8 BOM, and I agree, a BOM does not belong in source files. The gcc-4.2 on my Snow Leopard Mac didn't complain about it; I guess it's the gcc-4.0 that's on Leopard and Tiger that's not happy about it. We can remove the BOM easily enough.

comment:3 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.