【问题标题】:Error compiling Leptonica (for Tesseract) on IBMi (AS400,iSeries) for Power PC在 IBMi(AS400,iSeries)上为 Power PC 编译 Leptonica(用于 Tesseract)时出错
【发布时间】:2020-10-01 16:00:29
【问题描述】:

我正在尝试编译 Tesseract,以便可以在具有 Power PC 架构的 IBMi 7.3(AS400、iSeries、System/i)上运行它。几十年来我没有使用 makefile 进行任何 C 编译,所以我发现并关注了这些 instruction(感谢),并且正在编译 Leptonica (1.80) 作为先决条件。在解决了一些问题后,我设法做到了./configure,这似乎工作正常。然后我尝试了make,它没有,但我在某处读到尝试gmake,它做了很多但它会产生错误:

CC       webpanimiostub.lo                                                
CC       writefile.lo                                                     
CC       zlibmem.lo                                                       
CC       zlibmemstub.lo                                                   
CCLD     liblept.la                                                       
ar: 0707-126 adaptmap.o is not valid with the current object file mode.     
        Use the -X option to specify the desired object mode.               
ar: 0707-126 affine.o is not valid with the current object file mode.       
        Use the -X option to specify the desired object mode.               
ar: 0707-126 affinecompose.o is not valid with the current object file mode.

所以我想知道我是否应该担心这些消息(其中有 100 多条)?

说了这么多:

ar: 0707-126 zlibmemstub.o is not valid with the current object file mode.
        Use the -X option to specify the desired object mode.             
gmake[2]: *** [Makefile:545: liblept.la] Error 179               
gmake[2]: Leaving directory '/home/mydir/leptonica-1.80.0/src'
gmake[1]: *** [Makefile:522: all-recursive] Error 1              
gmake[1]: Leaving directory '/home/mydir/leptonica-1.80.0'    
gmake: *** [Makefile:406: all] Error 2                           

src/Makefile 的第 544 和 545 行说:

liblept.la: $(liblept_la_OBJECTS) $(liblept_la_DEPENDENCIES) $(EXTRA_liblept_la_DEPENDENCIES) 
    $(AM_V_CCLD)$(liblept_la_LINK) -rpath $(libdir) $(liblept_la_OBJECTS) $(liblept_la_LIBADD) $(LIBS)

我徒劳地在网上搜寻任何线索,因此非常感谢您的帮助,马克。

【问题讨论】:

  • 这有点像在黑暗中拍摄 - 我在 Power 上的 Linux 而不是 IBM i 上工作 - 但是查看 AIX 的 github.com/openssl/openssl/issues/5659#issuecomment-375022992stackoverflow.com/questions/14196575/… ,看起来您可能需要指定OBJECT_MODE=64AR="ar -X64"...
  • @dja 这确实允许编译完成,非常感谢。如果你想添加答案,我会勾选它。 Tesseract compile 说它找不到 >1.71 的版本,即使我有 PKG_CONFIG_PATH=/usr/local/lib/pkgconfig 并且其中 lept.pc 说它是 1.80.0 版。我想这是接下来要解决的问题。

标签: gnu-make tesseract ibm-midrange powerpc leptonica


【解决方案1】:

查看 AIX 的 https://github.com/openssl/openssl/issues/5659#issuecomment-375022992Compiling pcre 8.32 on AIX 6.1 64 bit,您可能需要指定 OBJECT_MODE=64AR="ar -X64"

【讨论】:

  • 这个ar -X64 问题在64 位AIX 上编译时相当常见。有时导出AR='ar -X64' 和/或将其添加到configure 就足够了,有时您必须在make 之前编辑Makefiles。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-10-12
  • 2012-10-09
  • 1970-01-01
相关资源
最近更新 更多