Re: [Pharo-dev] LibFFI/NB Cairo External Module Not Found debugging

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] LibFFI/NB Cairo External Module Not Found debugging

Richard O'Keefe
It's not just Windows users.  I have Pharo 6.0 #605.40
running under Linux Ubuntu version 17.10 and the cairo
library is definitely installed.

Just starting Pharo is a little concerning:
ok@Herbrand:~/Smalltalk$ pharo
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
Yet these files exist.
/usr/lib/x86_64-linux-gnu/libfreetype.a
/usr/lib/x86_64-linux-gnu/libfreetype.so
/usr/lib/x86_64-linux-gnu/libfreetype.la
/usr/lib/x86_64-linux-gnu/libfreetype.so.6
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.14.0

When I try any Roassal examples, I get
Error: cannot locate cairo library. Please check if it is installed ...
CairoLibrary(Object) error:
CairoLibrary unix32ModuleName
Unix32Platform ffiModuleName
CairoLibrayr(FFILibrary) moduleName
FFICalloutMethodBuilder moduleName

The 32 is the clue.  Apparently I'm running a 32-bit Pharo
with 64-bit libraries installed.  Could this be the problem
on Windows?


On 21 May 2018 at 07:46, Guillermo Polito <[hidden email]> wrote:


On Sat, May 19, 2018 at 1:37 PM, Peter Uhnák <[hidden email]> wrote:
Hi,

some Windows users are repeatedly running into Pharo failing to load Cairo library on Windows (see stack screenshot at the bottom).

The problem is that I have no idea how to even start debugging this.

Is there some documentation on how Pharo loads libraries via FFI on Windows that I can start digging into?

Note that the library is definitely present, as this happens only occasionally -- it can be fixed by restarting PC. But I cannot reasonably ask users to restart just because Pharo decided it doesn't feel like loading a library.

Any pointers / docs / ideas appreciated.

You can see the actual code from 


?
 

Thanks,
Peter






--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] LibFFI/NB Cairo External Module Not Found debugging

John Pfersich
If you are running a 32 bit Pharo on a 64 bit Ubuntu, there is instructions for additional steps needed at https://pharo.org/gnu-linux-installation under the ‘Prepare 64-bit-Linux for 32bit Pharo’ heading

For encrypted mail use [hidden email]
Get a free account at ProtonMail.com

On May 21, 2018, at 00:18, Richard O'Keefe <[hidden email]> wrote:

It's not just Windows users.  I have Pharo 6.0 #605.40
running under Linux Ubuntu version 17.10 and the cairo
library is definitely installed.

Just starting Pharo is a little concerning:
ok@Herbrand:~/Smalltalk$ pharo
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
Yet these files exist.
/usr/lib/x86_64-linux-gnu/libfreetype.a
/usr/lib/x86_64-linux-gnu/libfreetype.so
/usr/lib/x86_64-linux-gnu/libfreetype.la
/usr/lib/x86_64-linux-gnu/libfreetype.so.6
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.14.0

When I try any Roassal examples, I get
Error: cannot locate cairo library. Please check if it is installed ...
CairoLibrary(Object) error:
CairoLibrary unix32ModuleName
Unix32Platform ffiModuleName
CairoLibrayr(FFILibrary) moduleName
FFICalloutMethodBuilder moduleName

The 32 is the clue.  Apparently I'm running a 32-bit Pharo
with 64-bit libraries installed.  Could this be the problem
on Windows?


On 21 May 2018 at 07:46, Guillermo Polito <[hidden email]> wrote:


On Sat, May 19, 2018 at 1:37 PM, Peter Uhnák <[hidden email]> wrote:
Hi,

some Windows users are repeatedly running into Pharo failing to load Cairo library on Windows (see stack screenshot at the bottom).

The problem is that I have no idea how to even start debugging this.

Is there some documentation on how Pharo loads libraries via FFI on Windows that I can start digging into?

Note that the library is definitely present, as this happens only occasionally -- it can be fixed by restarting PC. But I cannot reasonably ask users to restart just because Pharo decided it doesn't feel like loading a library.

Any pointers / docs / ideas appreciated.

You can see the actual code from 


?
 

Thanks,
Peter

<image.png>




--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13


Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] LibFFI/NB Cairo External Module Not Found debugging

Richard O'Keefe
Thank you for that.  The instructions there are incomplete.
It is necessary to add
sudo apt-get install libcairo2-dev:i386
to the script.

On 21 May 2018 at 19:36, John Pfersich <[hidden email]> wrote:
If you are running a 32 bit Pharo on a 64 bit Ubuntu, there is instructions for additional steps needed at https://pharo.org/gnu-linux-installation under the ‘Prepare 64-bit-Linux for 32bit Pharo’ heading

For encrypted mail use [hidden email]
Get a free account at ProtonMail.com

On May 21, 2018, at 00:18, Richard O'Keefe <[hidden email]> wrote:

It's not just Windows users.  I have Pharo 6.0 #605.40
running under Linux Ubuntu version 17.10 and the cairo
library is definitely installed.

Just starting Pharo is a little concerning:
ok@Herbrand:~/Smalltalk$ pharo
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
Yet these files exist.
/usr/lib/x86_64-linux-gnu/libfreetype.a
/usr/lib/x86_64-linux-gnu/libfreetype.so
/usr/lib/x86_64-linux-gnu/libfreetype.la
/usr/lib/x86_64-linux-gnu/libfreetype.so.6
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.14.0

When I try any Roassal examples, I get
Error: cannot locate cairo library. Please check if it is installed ...
CairoLibrary(Object) error:
CairoLibrary unix32ModuleName
Unix32Platform ffiModuleName
CairoLibrayr(FFILibrary) moduleName
FFICalloutMethodBuilder moduleName

The 32 is the clue.  Apparently I'm running a 32-bit Pharo
with 64-bit libraries installed.  Could this be the problem
on Windows?


On 21 May 2018 at 07:46, Guillermo Polito <[hidden email]> wrote:


On Sat, May 19, 2018 at 1:37 PM, Peter Uhnák <[hidden email]> wrote:
Hi,

some Windows users are repeatedly running into Pharo failing to load Cairo library on Windows (see stack screenshot at the bottom).

The problem is that I have no idea how to even start debugging this.

Is there some documentation on how Pharo loads libraries via FFI on Windows that I can start digging into?

Note that the library is definitely present, as this happens only occasionally -- it can be fixed by restarting PC. But I cannot reasonably ask users to restart just because Pharo decided it doesn't feel like loading a library.

Any pointers / docs / ideas appreciated.

You can see the actual code from 


?
 

Thanks,
Peter

<image.png>




--

   

Guille Polito

Research Engineer

Centre de Recherche en Informatique, Signal et Automatique de Lille

CRIStAL - UMR 9189

French National Center for Scientific Research - http://www.cnrs.fr


Web: http://guillep.github.io

Phone: +33 06 52 70 66 13



Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-dev] LibFFI/NB Cairo External Module Not Found debugging

EstebanLM
why libcairo2-dev and not just libcairo2?

cheers,
Esteban

On 21 May 2018, at 17:25, Richard O'Keefe <[hidden email]> wrote:

Thank you for that.  The instructions there are incomplete.
It is necessary to add
sudo apt-get install libcairo2-dev:i386
to the script.

On 21 May 2018 at 19:36, John Pfersich <[hidden email]> wrote:
If you are running a 32 bit Pharo on a 64 bit Ubuntu, there is instructions for additional steps needed at https://pharo.org/gnu-linux-installation under the ‘Prepare 64-bit-Linux for 32bit Pharo’ heading

For encrypted mail use [hidden email]
Get a free account at ProtonMail.com

On May 21, 2018, at 00:18, Richard O'Keefe <[hidden email]> wrote:

It's not just Windows users.  I have Pharo 6.0 #605.40
running under Linux Ubuntu version 17.10 and the cairo
library is definitely installed.

Just starting Pharo is a little concerning:
ok@Herbrand:~/Smalltalk$ pharo
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
ioLoadModule(/home/ok/Pharo.d/pharo-vm/lib/pharo/5.0-201707201942/FT2Plugin.so):
  libfreetype.so.6: cannot open shared object file: No such file or directory
Yet these files exist.
/usr/lib/x86_64-linux-gnu/libfreetype.a
/usr/lib/x86_64-linux-gnu/libfreetype.so
/usr/lib/x86_64-linux-gnu/libfreetype.la
/usr/lib/x86_64-linux-gnu/libfreetype.so.6
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.14.0

When I try any Roassal examples, I get
Error: cannot locate cairo library. Please check if it is installed ...
CairoLibrary(Object) error:
CairoLibrary unix32ModuleName
Unix32Platform ffiModuleName
CairoLibrayr(FFILibrary) moduleName
FFICalloutMethodBuilder moduleName

The 32 is the clue.  Apparently I'm running a 32-bit Pharo
with 64-bit libraries installed.  Could this be the problem
on Windows?


On 21 May 2018 at 07:46, Guillermo Polito <[hidden email]> wrote:


On Sat, May 19, 2018 at 1:37 PM, Peter Uhnák <[hidden email]> wrote:
Hi,

some Windows users are repeatedly running into Pharo failing to load Cairo library on Windows (see stack screenshot at the bottom).

The problem is that I have no idea how to even start debugging this.

Is there some documentation on how Pharo loads libraries via FFI on Windows that I can start digging into?

Note that the library is definitely present, as this happens only occasionally -- it can be fixed by restarting PC. But I cannot reasonably ask users to restart just because Pharo decided it doesn't feel like loading a library.

Any pointers / docs / ideas appreciated.

You can see the actual code from 


?
 

Thanks,
Peter

<image.png>




--
   
Guille Polito
Research Engineer


Centre de Recherche en Informatique, Signal et Automatique de Lille
CRIStAL - UMR 9189
French National Center for Scientific Research - http://www.cnrs.fr

Phone: +33 06 52 70 66 13