Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile with musl libc #126

Merged
merged 2 commits into from
Oct 31, 2015
Merged

Compile with musl libc #126

merged 2 commits into from
Oct 31, 2015

Conversation

doughdemon
Copy link
Contributor

Fix compilation on linux with musl libc library (http://musl-libc.org).

zdenop added a commit that referenced this pull request Oct 31, 2015
@zdenop zdenop merged commit be7497b into tesseract-ocr:master Oct 31, 2015
@wiiaboo
Copy link

wiiaboo commented Nov 6, 2015

This seems to break mingw building:

libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -DNDEBUG -I../vs2010/port -DWINDLLNAME=\"libtesseract\" -I/local32/include -D__USE_MINGW_ANSI_STDIO=1 -I/local32/include/leptonica -mms-bitfields -IK:/Mingw642/local32/include -IK:/Mingw642/msys64/mingw32/include -IK:/Mingw642/local32/include/freetype2 -IK:/Mingw642/msys64/mingw32/include -IK:/Mingw642/msys64/mingw32/include/libpng16 -IK:/Mingw642/local32/include/freetype2 -IK:/Mingw642/msys64/mingw32/include/cairo -IK:/Mingw642/msys64/mingw32/include/glib-2.0 -IK:/Mingw642/msys64/mingw32/lib/glib-2.0/include -IK:/Mingw642/msys64/mingw32/include/pixman-1 -IK:/Mingw642/msys64/mingw32/include -IK:/Mingw642/msys64/mingw32/include/libpng16 -m32 -I/local32/include -mthreads -mtune=generic -O2 -pipe -std=c++11 -MT tessdatamanager.lo -MD -MP -MF .deps/tessdatamanager.Tpo -c tessdatamanager.cpp -o tessdatamanager.o
scanutils.cpp:42:14: error: conflicting declaration 'typedef long int off_t'
typedef long off_t;
^
In file included from K:/Mingw642/msys64/mingw32/i686-w64-mingw32/include/stdio.h:80:0,
from scanutils.cpp:32:
K:/Mingw642/msys64/mingw32/i686-w64-mingw32/include/_mingw_off_t.h:24:17: note: previous declaration as 'typedef off64_t off_t'
typedef off64_t off_t;
^
Makefile:579: recipe for target 'scanutils.lo' failed
make[3]: *** [scanutils.lo] Error 1
make[3]: *** Waiting for unfinished jobs....
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I.. -O2 -DNDEBUG -I../vs2010/port -DWINDLLNAME=\"libtesseract\" -I/local32/include -D__USE_MINGW_ANSI_STDIO=1 -I/local32/include/leptonica -mms-bitfields -IK:/Mingw642/local32/include -IK:/Mingw642/msys64/mingw32/include -IK:/Mingw642/local32/include/freetype2 -IK:/Mingw642/msys64/mingw32/include -IK:/Mingw642/msys64/mingw32/include/libpng16 -IK:/Mingw642/local32/include/freetype2 -IK:/Mingw642/msys64/mingw32/include/cairo -IK:/Mingw642/msys64/mingw32/include/glib-2.0 -IK:/Mingw642/msys64/mingw32/lib/glib-2.0/include -IK:/Mingw642/msys64/mingw32/include/pixman-1 -IK:/Mingw642/msys64/mingw32/include -IK:/Mingw642/msys64/mingw32/include/libpng16 -m32 -I/local32/include -mthreads -mtune=generic -O2 -pipe -std=c++11 -MT tprintf.lo -MD -MP -MF .deps/tprintf.Tpo -c tprintf.cpp -o tprintf.o
make[3]: Leaving directory '/build/tesseract-git/ccutil'
Makefile:621: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/build/tesseract-git/ccutil'
Makefile:478: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/build/tesseract-git'
Makefile:387: recipe for target 'all' failed
make: *** [all] Error 2

@doughdemon
Copy link
Contributor Author

doughdemon commented Nov 6, 2015 via email

@wiiaboo
Copy link

wiiaboo commented Nov 6, 2015

No, I'm using autotools. Lots of options missing from cmake, so I prefer the former.
Here's the config.log

@doughdemon
Copy link
Contributor Author

Ricardo Constantino wrote:

No, I'm using autotools. Lots of options missing from cmake, so I prefer the former.

Good. So could you look in config.log for the test for "off_t"? (It
would be interesting to compare the compilation options and to see the
compiler error message.)

@wiiaboo
Copy link

wiiaboo commented Nov 6, 2015

Here's the config.log

@doughdemon
Copy link
Contributor Author

Ricardo Constantino wrote:

Here's the config.log

It seems that off_t is detected after all. Try building after rerunning
./autogen.sh

@wiiaboo
Copy link

wiiaboo commented Nov 6, 2015

Yeah, seems running autogen.sh fixed it. I thought configure would force it for some reason, nevermind then.

zvezdochiot pushed a commit to ImageProcessing-ElectronicPublications/tesseract that referenced this pull request Mar 28, 2021
zvezdochiot pushed a commit to ImageProcessing-ElectronicPublications/tesseract that referenced this pull request Mar 28, 2021
zvezdochiot pushed a commit to ImageProcessing-ElectronicPublications/tesseract that referenced this pull request Mar 28, 2021
zvezdochiot pushed a commit to ImageProcessing-ElectronicPublications/tesseract that referenced this pull request Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants