delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2020/05/14/20:24:15

X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C494F3840C18
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
s=default; t=1589502210;
bh=m4lbGWVmErk2WwzcDH01gQKHW8eYL5wDJ1XE+S+cTuE=;
h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe:
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:
From;
b=qyJO9et3d6SelJAY0ahXoUwWIzUBKmU9wXtOoBGHLyJApHOiK1mKWWhwjJ9bc2B0J
fezo4TvD6DTmcuftuKF/xcCJPudOfpn7MHKkHZ1Iw8WQBddvpilr9JqEtFEfT+JFBD
NBwT9DWnFlbmPMr5vhE+43UXEKea5seovUBcdms0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 99EA83851C3B
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:subject:to:references:from:message-id:date
:user-agent:mime-version:in-reply-to:content-language
:content-transfer-encoding;
bh=rSQpRloC5zX6HNGtqzsymYQY8WXo8IKuvkt0Dp+n/T4=;
b=hu1ryYHnb3bbWjVISZfbMKg6JSXDQCyfkZluOu49+I3jN4EEyGiYxfqiN8xk1pclHO
nQRR7VfWtGMZZXoXCbpUOpXXRj8IMP5i2lhDF5vi4/Ttp5X81mXmZZwqAwDgh0U32Pjj
7V4C7H3VV3zHIC/lUYQ21P2SfSfB41/PftkqVGLQ9BYHgfJLtQow7RBfgmaHrcGwiFey
Uy3OPPMUsUwxLDFvbgIqEmtJwG8rq5kIUNtwrZCbSWuLsiCxqGf4UvgT55pC/WlPrAzT
jj2EudCkCYn48QObBAf0dbHcOWNYGLdtG3iTW40zYujQcub6VMPxJ4GVNfYFfvbzBZYm
rjLw==
X-Gm-Message-State: AOAM530lR5K89xp/1xDn5z16pl1A1u21atk8nc8RXHEthJkJZIfi+Htr
Y3Nl6+wfbthHeQ52/SKNDiZmtgtQ
X-Google-Smtp-Source: ABdhPJxHR1WAySY9/EEKVw8lpLoMJG40m+D4ffFPE3IqS94OGmJ3HadohBxMJ14iUIrsQ4yr15Vnkg==
X-Received: by 2002:a9d:6d85:: with SMTP id x5mr410430otp.3.1589502197671;
Thu, 14 May 2020 17:23:17 -0700 (PDT)
Subject: Re: Trying to build OCRmyPDF under Cygwin, hit a brick wall
To: cygwin AT cygwin DOT com
References: <a5987f7c-1448-ce81-d40b-e3034e406eb8 AT jhmg DOT net>
<2afedbcf-f3d7-4e96-e196-fb3091630245 AT jhmg DOT net>
Message-ID: <d4070d22-4298-9ee7-bc31-202cb107caf6@gmail.com>
Date: Thu, 14 May 2020 19:23:36 -0500
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.19)
Gecko/20081209 Lightning/0.9 Thunderbird/2.0.0.19 Mnenhy/0.7.6.0
MIME-Version: 1.0
In-Reply-To: <2afedbcf-f3d7-4e96-e196-fb3091630245@jhmg.net>
X-Spam-Status: No, score=-3.3 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Unsubscribe: <http://cygwin.com/mailman/options/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <http://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
From: =?utf-8?q?Ren=C3=A9_Berber_via_Cygwin?= <cygwin AT cygwin DOT com>
Reply-To: =?UTF-8?Q?Ren=c3=a9_Berber?= <rene DOT berber AT gmail DOT com>
Errors-To: cygwin-bounces AT cygwin DOT com
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On 5/14/2020 5:50 PM, Jim Garrison via Cygwin wrote:

> The magic incantation necessary to get strdup turns out to be -
> D_GNU_SOURCE, as noted on StackOverflow.
> 
> However, now I'm encountering a problem with Python's DLL handling
> code.  When attempting to run OCRmyPDF I get
[snip]
> line 18, in <module>
>      from . import helpers, hocrtransform, leptonica, pdfa, pdfinfo
>    File
> "/usr/lib/python3.7/site-packages/ocrmypdf-9.8.0.post3+g5944044.d20200514-py3.7.egg/ocrmypdf/leptonica.py",
> line 67, in <module>
>      """
> ocrmypdf.exceptions.MissingDependencyError:
[snip]

> In the last file of the traceback (leptonica.py) there's this:
> 
> 
> from ctypes.util import find_library
> ...
> if os.name == 'nt':
>      libname = 'liblept-5'
>      os.environ['PATH'] = shim_paths_with_program_files()
> else:
>      libname = 'lept'
> 
> 
> In Cygwin, that library is /usr/bin/cyglept-5.dll (why was the name
> changed?)
> 
> First I created a symlink from cyglept-5.dll to liblept-5.dll, with no
> effect. So I added a test for Cygwin at that point, resulting in this
> code:
> 
> 
> if os.name == 'nt':
>      libname = 'liblept-5'
>      os.environ['PATH'] = shim_paths_with_program_files()

Notice this change in search path, dll files in Windows are executables 
and they are (must) installed in the system PATH (or the current directory).

> elif sys.platform == 'cygwin':
>      libname = 'cyglept-5'

On Cygwin you can do the same as above, it will contain /bin (or 
/usr/bin which are one and the same).

> else:
>      libname = 'lept'
> 
> 
> This also had no effect, so I tried playing with find_library() in the
> interactive shell.  In Cygwin, it doesn't seem to find any DLLs even
> though those DLLs are actually loadable.  Viz:
[snip]

My guess is the search path is incorrect.

Either that or python needs the symbols file, like the linker, which in 
this case would be /usr/lib/liblept.dll.a, which is in the -devel 
package, but I doubt it.
-- 
R.Berber


--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019