Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 713806

Summary: app-text/tesseract-4.1.1 : /.../ocrclass.h: error: field end_time has incomplete type timeval
Product: Gentoo Linux Reporter: Toralf Förster <toralf>
Component: Current packagesAssignee: Gentoo musl team <musl>
Status: RESOLVED FIXED    
Severity: normal CC: chutzpah, fsvm88, voyageur
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 713786    
Attachments: emerge-info.txt
app-text:tesseract-4.1.1:20200321-151658.log
emerge-history.txt
environment
etc.portage.tbz2
logs.tbz2
temp.tbz2
Patch for missing sys/time.h include

Description Toralf Förster gentoo-dev 2020-03-21 15:28:41 UTC
In file included from /var/tmp/portage/app-text/tesseract-4.1.1/work/tesseract-4.1.1/src/ccmain/control.cpp:37:
/var/tmp/portage/app-text/tesseract-4.1.1/work/tesseract-4.1.1/src/ccutil/ocrclass.h:117:18: error: field end_time has incomplete type timeval
  117 |   struct timeval end_time;
      |                  ^~~~~~~~
/var/tmp/portage/app-text/tesseract-4.1.1/work/tesseract-4.1.1/src/ccutil/ocrclass.h:117:10: note: forward declaration of struct timeval

  -------------------------------------------------------------------

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.0_musl-20200316-165821

  -------------------------------------------------------------------

gcc-config -l:
 [1] x86_64-gentoo-linux-musl-9.3.0 *
clang version 10.0.0 
Target: x86_64-gentoo-linux-musl
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.8
  [2]   python3.7
  [3]   python3.6
  [4]   python2.7 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-1.41.1 *

timestamp of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sat Mar 21 14:38:37 UTC 2020
/var/db/repos/musl	Sat Mar 21 03:09:12 UTC 2020

emerge -qpvO app-text/tesseract
[ebuild  N    ] app-text/tesseract-4.1.1  USE="openmp -doc -jpeg -opencl -png -static-libs -tiff -training -webp"
Comment 1 Toralf Förster gentoo-dev 2020-03-21 15:28:44 UTC
Created attachment 623866 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-03-21 15:28:47 UTC
Created attachment 623868 [details]
app-text:tesseract-4.1.1:20200321-151658.log
Comment 3 Toralf Förster gentoo-dev 2020-03-21 15:28:49 UTC
Created attachment 623870 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2020-03-21 15:28:52 UTC
Created attachment 623872 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2020-03-21 15:28:55 UTC
Created attachment 623874 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2020-03-21 15:28:58 UTC
Created attachment 623876 [details]
logs.tbz2
Comment 7 Toralf Förster gentoo-dev 2020-03-21 15:29:00 UTC
Created attachment 623878 [details]
temp.tbz2
Comment 8 Fabio Scaccabarozzi 2020-03-25 18:32:49 UTC
Created attachment 625830 [details, diff]
Patch for missing sys/time.h include

Add missing sys/time.h include.
According to https://stackoverflow.com/questions/18322408/c11-struct-timeval it's the right way to fix it. Not sure where glibc pulls it in.
Comment 9 Bernard Cafarelli gentoo-dev 2021-08-26 20:19:48 UTC
Really sorry I missed the notification somehow for this one.

I have a test ebuild for upcoming 5.0.0 (beta for now) and code in it does not use timeval anymore. So all good on Gentoo side

There is one occurence left in viewer code src/viewer/svutil.cpp but we do not build this part, it sounds worth bringing it upstream, maybe with a similar patch