public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Some issues with "/usr/lib/" and "/lib/" and wx
@ 2012-06-15 14:37 matt_bali
  2012-06-15 15:57 ` marco atzeri
  0 siblings, 1 reply; 11+ messages in thread
From: matt_bali @ 2012-06-15 14:37 UTC (permalink / raw)
  To: cygwin

>If it is a native (doesn't require cygwin1.dll) then yes, wx won't 
>be able to read the Cygwin POSIX paths.

I compiled wx it under Cygwin
wx libraries are are in /usr/local/lib/

Everything works as expected, only some programs won't start because of this issue, or throw error about missing resource file if file is located beneath /usr/lib/

Please see this output from python interpreter:

========================================
$ python
Python 2.6.8 (unknown, Jun  9 2012, 11:30:32)
[GCC 4.5.3] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
>>> wx.Image.CanRead('/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png')
True
>>> wximg = wx.Image('/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png', wx.BITMAP_TYPE_ANY)
14:36:44: Error: Can't load image from file '/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png': file does not exist.
>>>
========================================

Only wx has this issue for some reason


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
  2012-06-15 14:37 Some issues with "/usr/lib/" and "/lib/" and wx matt_bali
@ 2012-06-15 15:57 ` marco atzeri
  0 siblings, 0 replies; 11+ messages in thread
From: marco atzeri @ 2012-06-15 15:57 UTC (permalink / raw)
  To: cygwin

On 6/15/2012 4:37 PM, matt_bali@mac.hush.com wrote:
>> If it is a native (doesn't require cygwin1.dll) then yes, wx won't
>> be able to read the Cygwin POSIX paths.
>
> I compiled wx it under Cygwin
> wx libraries are are in /usr/local/lib/
>
> Everything works as expected, only some programs won't start because of this issue, or throw error about missing resource file if file is located beneath /usr/lib/

eventually you build a partially hybrid application

On cygwin
/usr/lib is a mount of /lib
so a pure cygwin program will see no difference between

/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png
/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png

> Please see this output from python interpreter:
>
> ========================================
> $ python
> Python 2.6.8 (unknown, Jun  9 2012, 11:30:32)
> [GCC 4.5.3] on cygwin
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import wx
>>>> wx.Image.CanRead('/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png')
> True
>>>> wximg = wx.Image('/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png', wx.BITMAP_TYPE_ANY)
> 14:36:44: Error: Can't load image from file '/usr/lib/python2.6/site-packages/matplotlib/mpl-data/images/filesave.png': file does not exist.
>>>>
> ========================================
>
> Only wx has this issue for some reason
>

have you tried using Yaakov wx libraries ?

http://sourceware.org/cygwinports/

Regards
Marco




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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
  2012-06-15 19:48 matt_bali
@ 2012-06-15 20:19 ` marco atzeri
  0 siblings, 0 replies; 11+ messages in thread
From: marco atzeri @ 2012-06-15 20:19 UTC (permalink / raw)
  To: cygwin

On 6/15/2012 9:48 PM, matt_bali@mac.hush.com wrote:
>> So perhaps I should remove my compiled wx and install from
>> suggested ports linked in one of previous mails?
>> I'll do that
>
> I somehow managed to add cygports link from funet to Cygwin setup, but then just realized that wx will need X server and/or gtk, and won't use windows gdi
> So is there some way of compiling wx on Cygwin and using it through Cygwin but drawing on Windows native graphic interface?
>

no. Cygwin uses the X graphic



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
@ 2012-06-15 19:48 matt_bali
  2012-06-15 20:19 ` marco atzeri
  0 siblings, 1 reply; 11+ messages in thread
From: matt_bali @ 2012-06-15 19:48 UTC (permalink / raw)
  To: cygwin

>So perhaps I should remove my compiled wx and install from 
>suggested ports linked in one of previous mails?
>I'll do that

I somehow managed to add cygports link from funet to Cygwin setup, but then just realized that wx will need X server and/or gtk, and won't use windows gdi
So is there some way of compiling wx on Cygwin and using it through Cygwin but drawing on Windows native graphic interface?


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
@ 2012-06-15 18:39 matt_bali
  0 siblings, 0 replies; 11+ messages in thread
From: matt_bali @ 2012-06-15 18:39 UTC (permalink / raw)
  To: cygwin

>There is no mystery here.  You're obviously not using cygwin-compiled
>libraries.  Cygwin doesn't make Windows apps aware of POSIX paths.

That makes sense. If I understand you correct you are implying that I compiled wx under Cygwin for Windows instead for Cygwin

So perhaps I should remove my compiled wx and install from suggested ports linked in one of previous mails?
I'll do that

Thanks


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
  2012-06-15 17:47 matt_bali
@ 2012-06-15 18:07 ` Christopher Faylor
  0 siblings, 0 replies; 11+ messages in thread
From: Christopher Faylor @ 2012-06-15 18:07 UTC (permalink / raw)
  To: cygwin

On Fri, Jun 15, 2012 at 07:46:58PM +0200, matt_bali wrote:
>I forgot to mention that it's not just mounted "/usr/lib/" problem for
>wx, but any cygwin posix path.  OTOH loading file like
>wx.Image("c:\\temp\\image.png") works fine, so something is messed
>somewhere

There is no mystery here.  You're obviously not using cygwin-compiled
libraries.  Cygwin doesn't make Windows apps aware of POSIX paths.

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
@ 2012-06-15 17:47 matt_bali
  2012-06-15 18:07 ` Christopher Faylor
  0 siblings, 1 reply; 11+ messages in thread
From: matt_bali @ 2012-06-15 17:47 UTC (permalink / raw)
  To: cygwin

I forgot to mention that it's not just mounted "/usr/lib/" problem for wx, but any cygwin posix path.
OTOH loading file like wx.Image("c:\\temp\\image.png") works fine, so something is messed somewhere


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
@ 2012-06-15 17:43 matt_bali
  0 siblings, 0 replies; 11+ messages in thread
From: matt_bali @ 2012-06-15 17:43 UTC (permalink / raw)
  To: cygwin

>eventually you build a partially hybrid application

Can't see how. I have configure log for wx, but nothing "unusual" there for me.


>have you tried using Yaakov wx libraries ?
>
>http://sourceware.org/cygwinports/

Thanks for suggestion, I'll have it in mind, but will try to avoid removing all installed packages and recompiling everything again if I can

As intermediate workaround I patched Matplotlib wx backend source: _load_bitmap() function that passes filename to wx.Bitmap() I changed to:

f = open(filename, 'rb')
wx.BitmapFromImage(wx.ImageFromStream(f))
f.close()

and that works fine for Matplotlib

I'll wait on wxPython mailing list someone to suggest "proper" patch so that other packages work without issue


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
  2012-06-15 13:03 matt_bali
@ 2012-06-15 13:49 ` Earnie Boyd
  0 siblings, 0 replies; 11+ messages in thread
From: Earnie Boyd @ 2012-06-15 13:49 UTC (permalink / raw)
  To: cygwin

On Fri, Jun 15, 2012 at 9:03 AM,  matt_bali wrote:
> I suspect that similarly wx *can't* read it

If it is a native (doesn't require cygwin1.dll) then yes, wx won't be
able to read the Cygwin POSIX paths.

-- 
Earnie
-- https://sites.google.com/site/earnieboyd

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: Some issues with "/usr/lib/" and "/lib/" and wx
@ 2012-06-15 13:03 matt_bali
  2012-06-15 13:49 ` Earnie Boyd
  0 siblings, 1 reply; 11+ messages in thread
From: matt_bali @ 2012-06-15 13:03 UTC (permalink / raw)
  To: cygwin

>As folder "/usr/lib/" seem to be a link to "/lib/" (i.e. Windows 
>console can read it, but Cygwin terminal can) I suspect that 
>similarly wx can read it

Obvious typo:

As folder "/usr/lib/" seem to be a link to "/lib/" (i.e. Windows 
console *can't* read it, but Cygwin terminal can) I suspect that 
similarly wx *can't* read it


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Some issues with "/usr/lib/" and "/lib/" and wx
@ 2012-06-15 12:59 matt_bali
  0 siblings, 0 replies; 11+ messages in thread
From: matt_bali @ 2012-06-15 12:59 UTC (permalink / raw)
  To: cygwin

Hi,

I use current Cygwin on current XP
I build wx 2.8.11.0 and have issue with it not recognizing "/usr/lib/" it seems.
wx works fine, but if it has to load some resource from "/usr/lib/" it throws error. More info posted in wxpython mailing list: http://groups.google.com/group/wxpython-users/browse_thread/thread/3ffdf4c94276450a

As folder "/usr/lib/" seem to be a link to "/lib/" (i.e. Windows console can read it, but Cygwin terminal can) I suspect that similarly wx can read it

How can I approach and potentially solve this problem?

Thanks in advance


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-06-15 20:19 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-15 14:37 Some issues with "/usr/lib/" and "/lib/" and wx matt_bali
2012-06-15 15:57 ` marco atzeri
  -- strict thread matches above, loose matches on Subject: below --
2012-06-15 19:48 matt_bali
2012-06-15 20:19 ` marco atzeri
2012-06-15 18:39 matt_bali
2012-06-15 17:47 matt_bali
2012-06-15 18:07 ` Christopher Faylor
2012-06-15 17:43 matt_bali
2012-06-15 13:03 matt_bali
2012-06-15 13:49 ` Earnie Boyd
2012-06-15 12:59 matt_bali

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).