DanBloomberg / leptonica

Leptonica is an open source library containing software that is broadly useful for image processing and image analysis applications. The official github repository for Leptonica is: danbloomberg/leptonica. See leptonica.org for more documentation.
Other
1.74k stars 387 forks source link

Cross compiling leptonia for 'arm-linux-gnueabi' gives "‘_Float128’ is not supported on this target" error #670

Open ajita02 opened 1 year ago

ajita02 commented 1 year ago

Hi, I want to cross compile leptonia for arm-linux-gnueabi architecture on x86_64 system. I have installed arm-linux-gnueabi-g++-11 and arm-linux-gnueabi-gcc-11 for cross compilation. When I ran following commands:

  1. ./autogen.sh
  2. ./configure --prefix=pre --exec-prefix=exe CC=/usr/bin/arm-linux-gnueabi-gcc-11 CXX=arm-linux-gnueabi-g++-11 --host=x86_64-linux-gnu --target=arm-linux-gnueabi
  3. make -j12

gives me following errors:

/usr/include/x86_64-linux-gnu/bits/mathcalls-helper-functions.h:20:40: error: ‘_Float128’ is not supported on this target
   20 | __MATHDECL_ALIAS (int, __fpclassify,, (_Mdouble_ __value), fpclassify)

Please help me with this.

Thanks, Ajita

zdenop commented 1 year ago

As you see the error is not coming from leptonica source. Few general suggestions:

  1. Do not use make -j12. Use just make. I saw several times that parallel build failed, while pure make was successful.
  2. If pure make fails - provide a full log of configure and make.

Anyway gcc-arm-linux-gnueabihf: Compiling anything with fails: error: '_Float128' is not supported on this target indicates problem on your system.

ajita02 commented 1 year ago

Hi @zdenop ,

Thanks for response. I feel my ./configure command structure is incorrect. My local machine is x86_64 and I want to generate libraries for arm-linux-gnueabi. Can you provide ./configure command structure for cross compilation?

Thanks, Ajita

zdenop commented 1 year ago

'​configure' is generated by your system tools/libraries. Consult your manual/tutorial on cross-compiling for how to proceed. Your request is outside the scope of Leptonica.