Hi all,
I try to build my own vm (ubuntu 10.04, virtualbox) Thanks to the **excellent** Mariano blog, I can compile, it runs ok except the FT2Plugin I always have the following error message while trying to load fonts: ioLoadModule(libFT2Plugin.so): libFT2Plugin.so: cannot open shared object file: No such file or directory I guess that it is because the plugin is unable to load libfreetype.so. does someone know what I am missing ? thanks Alain |
On 1 June 2011 19:20, Alain Plantec <[hidden email]> wrote:
> Hi all, > I try to build my own vm (ubuntu 10.04, virtualbox) > Thanks to the **excellent** Mariano blog, I can compile, it runs ok except > the FT2Plugin > I always have the following error message while trying to load fonts: > > ioLoadModule(libFT2Plugin.so): > libFT2Plugin.so: cannot open shared object file: No such file or directory > > I guess that it is because the plugin is unable to load libfreetype.so. > does someone know what I am missing ? > i wanna add a correct settings for building this plugin on all platforms. so we can ship a vm with this plugin by default. But i haven't time to do it yet. So, if you find a solution how to do it for unix, i will capture your knowledge in corresponding config(s) :) > thanks > Alain > -- Best regards, Igor Stasenko AKA sig. |
Le 01/06/2011 19:46, Igor Stasenko a écrit :
> On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >> Hi all, >> I try to build my own vm (ubuntu 10.04, virtualbox) >> Thanks to the **excellent** Mariano blog, I can compile, it runs ok except >> the FT2Plugin >> I always have the following error message while trying to load fonts: >> >> ioLoadModule(libFT2Plugin.so): >> libFT2Plugin.so: cannot open shared object file: No such file or directory >> >> I guess that it is because the plugin is unable to load libfreetype.so. >> does someone know what I am missing ? >> > i know. ;) > > i wanna add a correct settings for building this plugin on all > platforms. so we can ship a vm with this plugin by default. > But i haven't time to do it yet. So, if you find a solution how to do > it for unix, i will capture your knowledge in corresponding config(s) > :) I'm not so stupid, its a problem :) ok, I will try Cheers Alain >> thanks >> Alain >> > |
Alain,
Sig's answer leaves me doubting my suspicion, but I will toss it out anyway, and since you are building a vm, you can pretty easily run through the exercise. First, the question: what (full path) library is the vm trying to load? It really is a plugin, so some of my more common concerns (extra slashes in the path, so.Name instead of libName.so, etc., go away - or do they??). Sadly, I don't see the code I want to give you on this machine. Maybe my laptop will have some friendly symlinks to the tweaked files. In short, I think that any time the (particularly linux) vm translates a number to to a name or a name to a path, and the subsequent load fails, it should say something somewhere about what it tried to open/load. I have used syslog() to good effect. It's nice because the logs rotate, giving some time for the user to look for it and yet not clog the drive with old news. Ok; I'll shut up and see if I can find some code for you :) Bill ________________________________________ From: [hidden email] [[hidden email]] On Behalf Of Alain Plantec [[hidden email]] Sent: Wednesday, June 01, 2011 2:00 PM To: [hidden email] Subject: Re: [Pharo-project] Compiling and using the FT2Plugin Le 01/06/2011 19:46, Igor Stasenko a écrit : > On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >> Hi all, >> I try to build my own vm (ubuntu 10.04, virtualbox) >> Thanks to the **excellent** Mariano blog, I can compile, it runs ok except >> the FT2Plugin >> I always have the following error message while trying to load fonts: >> >> ioLoadModule(libFT2Plugin.so): >> libFT2Plugin.so: cannot open shared object file: No such file or directory >> >> I guess that it is because the plugin is unable to load libfreetype.so. >> does someone know what I am missing ? >> > i know. ;) > > i wanna add a correct settings for building this plugin on all > platforms. so we can ship a vm with this plugin by default. > But i haven't time to do it yet. So, if you find a solution how to do > it for unix, i will capture your knowledge in corresponding config(s) > :) I'm not so stupid, its a problem :) ok, I will try Cheers Alain >> thanks >> Alain >> > |
Look for the
// wks ... comment near the bottom of the attached. It's not much, but it can be a HUGE help when the paths are off, etc. I really should have used syslog(), but I don't see a good example of that. Either I never did it in the vm or lost track of it. The change goes in sqUnixExternalPrims.c, at least in the vms that I have hacked (non-Cog). Caveat emptor, etc. Good luck! Bill ________________________________________ From: [hidden email] [[hidden email]] On Behalf Of Schwab,Wilhelm K [[hidden email]] Sent: Wednesday, June 01, 2011 8:59 PM To: [hidden email] Subject: Re: [Pharo-project] Compiling and using the FT2Plugin Alain, Sig's answer leaves me doubting my suspicion, but I will toss it out anyway, and since you are building a vm, you can pretty easily run through the exercise. First, the question: what (full path) library is the vm trying to load? It really is a plugin, so some of my more common concerns (extra slashes in the path, so.Name instead of libName.so, etc., go away - or do they??). Sadly, I don't see the code I want to give you on this machine. Maybe my laptop will have some friendly symlinks to the tweaked files. In short, I think that any time the (particularly linux) vm translates a number to to a name or a name to a path, and the subsequent load fails, it should say something somewhere about what it tried to open/load. I have used syslog() to good effect. It's nice because the logs rotate, giving some time for the user to look for it and yet not clog the drive with old news. Ok; I'll shut up and see if I can find some code for you :) Bill ________________________________________ From: [hidden email] [[hidden email]] On Behalf Of Alain Plantec [[hidden email]] Sent: Wednesday, June 01, 2011 2:00 PM To: [hidden email] Subject: Re: [Pharo-project] Compiling and using the FT2Plugin Le 01/06/2011 19:46, Igor Stasenko a écrit : > On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >> Hi all, >> I try to build my own vm (ubuntu 10.04, virtualbox) >> Thanks to the **excellent** Mariano blog, I can compile, it runs ok except >> the FT2Plugin >> I always have the following error message while trying to load fonts: >> >> ioLoadModule(libFT2Plugin.so): >> libFT2Plugin.so: cannot open shared object file: No such file or directory >> >> I guess that it is because the plugin is unable to load libfreetype.so. >> does someone know what I am missing ? >> > i know. ;) > > i wanna add a correct settings for building this plugin on all > platforms. so we can ship a vm with this plugin by default. > But i haven't time to do it yet. So, if you find a solution how to do > it for unix, i will capture your knowledge in corresponding config(s) > :) ok, I will try Cheers Alain >> thanks >> Alain >> > linux-vm-hack.c (1K) Download Attachment |
In reply to this post by Schwab,Wilhelm K
Hi Bill,
Thanks for your help. For now, I'm just trying to compile my own vm to learn. to me, the stderr message "ioLoadModule(libFT2Plugin.so): libFT2Plugin.so: cannot open shared object file: No such file or directory" means that the external libFT2Plugin.so fails while trying to load a library. I guess, it is the libfreetype.so which is in /usr/lib, a standard location. To find out what is the problem, I've tried to compile the ft2plugin as an internal one. I've succeed in compiling it after a method addition in the plugin (FT2Plugin>>#bytesPerWord) and with the adding of -lfreetype for the final linking of cogVM. I've manually added it, I mean in the linux console. so, first step, I have a vm, compiled by myself and with a functional FT2Plugin, yes!!! cool. Now I'm trying to figure out how to automatically add "-lfreetype" for the linking invocation. lost in the plugin/cmake infrastructure jungle .... :) as a second step, I will come back to the compiling of FT2Plugin as an external plugin. Cheers Alain 02/06/2011 02:59, Schwab,Wilhelm K a écrit : > Alain, > > Sig's answer leaves me doubting my suspicion, but I will toss it out anyway, and since you are building a vm, you can pretty easily run through the exercise. > > First, the question: what (full path) library is the vm trying to load? It really is a plugin, so some of my more common concerns (extra slashes in the path, so.Name instead of libName.so, etc., go away - or do they??). > > Sadly, I don't see the code I want to give you on this machine. Maybe my laptop will have some friendly symlinks to the tweaked files. In short, I think that any time the (particularly linux) vm translates a number to to a name or a name to a path, and the subsequent load fails, it should say something somewhere about what it tried to open/load. I have used syslog() to good effect. It's nice because the logs rotate, giving some time for the user to look for it and yet not clog the drive with old news. > > Ok; I'll shut up and see if I can find some code for you :) > > Bill > > > > ________________________________________ > From: [hidden email] [[hidden email]] On Behalf Of Alain Plantec [[hidden email]] > Sent: Wednesday, June 01, 2011 2:00 PM > To: [hidden email] > Subject: Re: [Pharo-project] Compiling and using the FT2Plugin > > Le 01/06/2011 19:46, Igor Stasenko a écrit : >> On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >>> Hi all, >>> I try to build my own vm (ubuntu 10.04, virtualbox) >>> Thanks to the **excellent** Mariano blog, I can compile, it runs ok except >>> the FT2Plugin >>> I always have the following error message while trying to load fonts: >>> >>> ioLoadModule(libFT2Plugin.so): >>> libFT2Plugin.so: cannot open shared object file: No such file or directory >>> >>> I guess that it is because the plugin is unable to load libfreetype.so. >>> does someone know what I am missing ? >>> >> i know. ;) >> >> i wanna add a correct settings for building this plugin on all >> platforms. so we can ship a vm with this plugin by default. >> But i haven't time to do it yet. So, if you find a solution how to do >> it for unix, i will capture your knowledge in corresponding config(s) >> :) > ahhhhh! thanks Igor > I'm not so stupid, its a problem :) > ok, I will try > Cheers > Alain >>> thanks >>> Alain >>> > > |
On 2 June 2011 12:51, Alain Plantec <[hidden email]> wrote:
> Hi Bill, > > Thanks for your help. > For now, I'm just trying to compile my own vm to learn. > to me, the stderr message > "ioLoadModule(libFT2Plugin.so): > libFT2Plugin.so: cannot open shared object file: No such file or directory" > means that the external libFT2Plugin.so fails while trying to load a > library. > I guess, it is the libfreetype.so which is in /usr/lib, a standard location. > > To find out what is the problem, I've tried to compile the ft2plugin as an > internal one. > I've succeed in compiling it after a method addition in the plugin > (FT2Plugin>>#bytesPerWord) and > with the adding of -lfreetype for the final linking of cogVM. > I've manually added it, I mean in the linux console. > so, first step, I have a vm, compiled by myself and with a functional > FT2Plugin, yes!!! cool. > > Now I'm trying to figure out how to automatically add "-lfreetype" for the > linking invocation. > lost in the plugin/cmake infrastructure jungle .... :) > CogFamilyUnixConfig>>configureFT2Plugin: gen "extra rules for FT2Plugin" | generator | generator := maker isExternal ifTrue: [ gen ] ifFalse: [ gen vmGenerator ]. generator addExternalLibraries: #( 'freetype' "freetype library" ). This will force maker to link against freetype library. (actually i think better would be to override the #addExternalLibraries: in CMakePluginGenerator which will add libraries to vm generator, if plugin is internal. So in configureXYZPlugin: , you can just write: gen addExternalLibraries: #( .. ) without testing if plugin is internal or external. > as a second step, I will come back to the compiling of FT2Plugin as an > external plugin. > > Cheers > Alain > > > 02/06/2011 02:59, Schwab,Wilhelm K a écrit : >> >> Alain, >> >> Sig's answer leaves me doubting my suspicion, but I will toss it out >> anyway, and since you are building a vm, you can pretty easily run through >> the exercise. >> >> First, the question: what (full path) library is the vm trying to load? >> It really is a plugin, so some of my more common concerns (extra slashes in >> the path, so.Name instead of libName.so, etc., go away - or do they??). >> >> Sadly, I don't see the code I want to give you on this machine. Maybe my >> laptop will have some friendly symlinks to the tweaked files. In short, I >> think that any time the (particularly linux) vm translates a number to to a >> name or a name to a path, and the subsequent load fails, it should say >> something somewhere about what it tried to open/load. I have used syslog() >> to good effect. It's nice because the logs rotate, giving some time for the >> user to look for it and yet not clog the drive with old news. >> >> Ok; I'll shut up and see if I can find some code for you :) >> >> Bill >> >> >> >> ________________________________________ >> From: [hidden email] >> [[hidden email]] On Behalf Of Alain Plantec >> [[hidden email]] >> Sent: Wednesday, June 01, 2011 2:00 PM >> To: [hidden email] >> Subject: Re: [Pharo-project] Compiling and using the FT2Plugin >> >> Le 01/06/2011 19:46, Igor Stasenko a écrit : >>> >>> On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >>>> >>>> Hi all, >>>> I try to build my own vm (ubuntu 10.04, virtualbox) >>>> Thanks to the **excellent** Mariano blog, I can compile, it runs ok >>>> except >>>> the FT2Plugin >>>> I always have the following error message while trying to load fonts: >>>> >>>> ioLoadModule(libFT2Plugin.so): >>>> libFT2Plugin.so: cannot open shared object file: No such file or >>>> directory >>>> >>>> I guess that it is because the plugin is unable to load libfreetype.so. >>>> does someone know what I am missing ? >>>> >>> i know. ;) >>> >>> i wanna add a correct settings for building this plugin on all >>> platforms. so we can ship a vm with this plugin by default. >>> But i haven't time to do it yet. So, if you find a solution how to do >>> it for unix, i will capture your knowledge in corresponding config(s) >>> :) >> >> ahhhhh! thanks Igor >> I'm not so stupid, its a problem :) >> ok, I will try >> Cheers >> Alain >>>> >>>> thanks >>>> Alain >>>> >> >> > > > -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by Alain Plantec-3
Alain,
Success is the important thing; and you seem to be making strides in the correct direction. My mantra remains: we shouldn't have to guess at what the vm is trying to do when it translates a number or name and a library fails to load or a serial port doesn't open Bill ________________________________________ From: [hidden email] [[hidden email]] On Behalf Of Alain Plantec [[hidden email]] Sent: Thursday, June 02, 2011 6:51 AM To: [hidden email] Subject: Re: [Pharo-project] Compiling and using the FT2Plugin Hi Bill, Thanks for your help. For now, I'm just trying to compile my own vm to learn. to me, the stderr message "ioLoadModule(libFT2Plugin.so): libFT2Plugin.so: cannot open shared object file: No such file or directory" means that the external libFT2Plugin.so fails while trying to load a library. I guess, it is the libfreetype.so which is in /usr/lib, a standard location. To find out what is the problem, I've tried to compile the ft2plugin as an internal one. I've succeed in compiling it after a method addition in the plugin (FT2Plugin>>#bytesPerWord) and with the adding of -lfreetype for the final linking of cogVM. I've manually added it, I mean in the linux console. so, first step, I have a vm, compiled by myself and with a functional FT2Plugin, yes!!! cool. Now I'm trying to figure out how to automatically add "-lfreetype" for the linking invocation. lost in the plugin/cmake infrastructure jungle .... :) as a second step, I will come back to the compiling of FT2Plugin as an external plugin. Cheers Alain 02/06/2011 02:59, Schwab,Wilhelm K a écrit : > Alain, > > Sig's answer leaves me doubting my suspicion, but I will toss it out anyway, and since you are building a vm, you can pretty easily run through the exercise. > > First, the question: what (full path) library is the vm trying to load? It really is a plugin, so some of my more common concerns (extra slashes in the path, so.Name instead of libName.so, etc., go away - or do they??). > > Sadly, I don't see the code I want to give you on this machine. Maybe my laptop will have some friendly symlinks to the tweaked files. In short, I think that any time the (particularly linux) vm translates a number to to a name or a name to a path, and the subsequent load fails, it should say something somewhere about what it tried to open/load. I have used syslog() to good effect. It's nice because the logs rotate, giving some time for the user to look for it and yet not clog the drive with old news. > > Ok; I'll shut up and see if I can find some code for you :) > > Bill > > > > ________________________________________ > From: [hidden email] [[hidden email]] On Behalf Of Alain Plantec [[hidden email]] > Sent: Wednesday, June 01, 2011 2:00 PM > To: [hidden email] > Subject: Re: [Pharo-project] Compiling and using the FT2Plugin > > Le 01/06/2011 19:46, Igor Stasenko a écrit : >> On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >>> Hi all, >>> I try to build my own vm (ubuntu 10.04, virtualbox) >>> Thanks to the **excellent** Mariano blog, I can compile, it runs ok except >>> the FT2Plugin >>> I always have the following error message while trying to load fonts: >>> >>> ioLoadModule(libFT2Plugin.so): >>> libFT2Plugin.so: cannot open shared object file: No such file or directory >>> >>> I guess that it is because the plugin is unable to load libfreetype.so. >>> does someone know what I am missing ? >>> >> i know. ;) >> >> i wanna add a correct settings for building this plugin on all >> platforms. so we can ship a vm with this plugin by default. >> But i haven't time to do it yet. So, if you find a solution how to do >> it for unix, i will capture your knowledge in corresponding config(s) >> :) > ahhhhh! thanks Igor > I'm not so stupid, its a problem :) > ok, I will try > Cheers > Alain >>> thanks >>> Alain >>> > > |
In reply to this post by Schwab,Wilhelm K
On 2 June 2011 02:59, Schwab,Wilhelm K <[hidden email]> wrote:
> Alain, > > Sig's answer leaves me doubting my suspicion, but I will toss it out anyway, and since you are building a vm, you can pretty easily run through the exercise. > > First, the question: what (full path) library is the vm trying to load? It really is a plugin, so some of my more common concerns (extra slashes in the path, so.Name instead of libName.so, etc., go away - or do they??). > > Sadly, I don't see the code I want to give you on this machine. Maybe my laptop will have some friendly symlinks to the tweaked files. In short, I think that any time the (particularly linux) vm translates a number to to a name or a name to a path, and the subsequent load fails, it should say something somewhere about what it tried to open/load. I have used syslog() to good effect. It's nice because the logs rotate, giving some time for the user to look for it and yet not clog the drive with old news. > Yes, it is a pain to determine, why lib cannot be loaded/not found. And that's why i proposed to make library loading mechanism more stupid and give more extended error messages if loading was failed. See corresponding topic on vm-dev list , titled Stupidifying FFI ... blah blah :) > Ok; I'll shut up and see if I can find some code for you :) > > Bill > > > > ________________________________________ > From: [hidden email] [[hidden email]] On Behalf Of Alain Plantec [[hidden email]] > Sent: Wednesday, June 01, 2011 2:00 PM > To: [hidden email] > Subject: Re: [Pharo-project] Compiling and using the FT2Plugin > > Le 01/06/2011 19:46, Igor Stasenko a écrit : >> On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >>> Hi all, >>> I try to build my own vm (ubuntu 10.04, virtualbox) >>> Thanks to the **excellent** Mariano blog, I can compile, it runs ok except >>> the FT2Plugin >>> I always have the following error message while trying to load fonts: >>> >>> ioLoadModule(libFT2Plugin.so): >>> libFT2Plugin.so: cannot open shared object file: No such file or directory >>> >>> I guess that it is because the plugin is unable to load libfreetype.so. >>> does someone know what I am missing ? >>> >> i know. ;) >> >> i wanna add a correct settings for building this plugin on all >> platforms. so we can ship a vm with this plugin by default. >> But i haven't time to do it yet. So, if you find a solution how to do >> it for unix, i will capture your knowledge in corresponding config(s) >> :) > ahhhhh! thanks Igor > I'm not so stupid, its a problem :) > ok, I will try > Cheers > Alain >>> thanks >>> Alain >>> >> > > > > -- Best regards, Igor Stasenko AKA sig. |
Excellent!
________________________________________ From: [hidden email] [[hidden email]] On Behalf Of Igor Stasenko [[hidden email]] Sent: Thursday, June 02, 2011 7:20 AM To: [hidden email] Subject: Re: [Pharo-project] Compiling and using the FT2Plugin On 2 June 2011 02:59, Schwab,Wilhelm K <[hidden email]> wrote: > Alain, > > Sig's answer leaves me doubting my suspicion, but I will toss it out anyway, and since you are building a vm, you can pretty easily run through the exercise. > > First, the question: what (full path) library is the vm trying to load? It really is a plugin, so some of my more common concerns (extra slashes in the path, so.Name instead of libName.so, etc., go away - or do they??). > > Sadly, I don't see the code I want to give you on this machine. Maybe my laptop will have some friendly symlinks to the tweaked files. In short, I think that any time the (particularly linux) vm translates a number to to a name or a name to a path, and the subsequent load fails, it should say something somewhere about what it tried to open/load. I have used syslog() to good effect. It's nice because the logs rotate, giving some time for the user to look for it and yet not clog the drive with old news. > Yes, it is a pain to determine, why lib cannot be loaded/not found. And that's why i proposed to make library loading mechanism more stupid and give more extended error messages if loading was failed. See corresponding topic on vm-dev list , titled Stupidifying FFI ... blah blah :) > Ok; I'll shut up and see if I can find some code for you :) > > Bill > > > > ________________________________________ > From: [hidden email] [[hidden email]] On Behalf Of Alain Plantec [[hidden email]] > Sent: Wednesday, June 01, 2011 2:00 PM > To: [hidden email] > Subject: Re: [Pharo-project] Compiling and using the FT2Plugin > > Le 01/06/2011 19:46, Igor Stasenko a écrit : >> On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >>> Hi all, >>> I try to build my own vm (ubuntu 10.04, virtualbox) >>> Thanks to the **excellent** Mariano blog, I can compile, it runs ok except >>> the FT2Plugin >>> I always have the following error message while trying to load fonts: >>> >>> ioLoadModule(libFT2Plugin.so): >>> libFT2Plugin.so: cannot open shared object file: No such file or directory >>> >>> I guess that it is because the plugin is unable to load libfreetype.so. >>> does someone know what I am missing ? >>> >> i know. ;) >> >> i wanna add a correct settings for building this plugin on all >> platforms. so we can ship a vm with this plugin by default. >> But i haven't time to do it yet. So, if you find a solution how to do >> it for unix, i will capture your knowledge in corresponding config(s) >> :) > ahhhhh! thanks Igor > I'm not so stupid, its a problem :) > ok, I will try > Cheers > Alain >>> thanks >>> Alain >>> >> > > > > -- Best regards, Igor Stasenko AKA sig. |
In reply to this post by Igor Stasenko
Hi Igor,
#configureFT2Plugin: is the place for #addExternalLibraries: but it only works for FT2Plugin compiled as internal plugin. To compile the FT2Plugin as external, you also have to use #addExternalLibraries: #('freetype') but not sent from #configureFT2Plugin:. It is because of cmake and where #configurePlugin:with: is sent from the #generate method. in the #generate method, #configurePlugin:with: is sent **BEFORE** the 'add_library' cmd production for cmake. it is ok for internal plugin. but, if the plugin is external, then, #addExternalLibraries: #('freetype') has to be invoked **AFTER** the 'add_library' cmd production for cmake. I've implemented a #postConfigurePlugin:with:. same logic as #configurePlugin:with: but sent from the generate method after the 'add_library' cmd production. generate ... vmGen config configurePlugin: plugin with: self. ... internal ifTrue: [self cmd: 'add_library' params: name , ' STATIC ${sources}'.] ifFalse: [self cmd: 'add_library' params: name , ' SHARED ${sources}']. vmGen config postConfigurePlugin: plugin with: self. "added post configuration here" ... I will open an issue and put all my stuffs there. Cheers Alain Le 02/06/2011 13:16, Igor Stasenko a écrit : > Add following to > CogFamilyUnixConfig>>configureFT2Plugin: gen > "extra rules for FT2Plugin" > > | generator | > > generator := maker isExternal ifTrue: [ gen ] > ifFalse: [ gen vmGenerator ]. > > generator > addExternalLibraries: > #( > 'freetype' "freetype library" > ). > > This will force maker to link against freetype library. > (actually i think better would be to override the #addExternalLibraries: > in CMakePluginGenerator > which will add libraries to vm generator, if plugin is internal. > So in configureXYZPlugin: , you can just write: > > gen addExternalLibraries: #( .. ) > without testing if plugin is internal or external. > > >> as a second step, I will come back to the compiling of FT2Plugin as an >> external plugin. >> >> Cheers >> Alain >> >> >> 02/06/2011 02:59, Schwab,Wilhelm K a écrit : >>> Alain, >>> >>> Sig's answer leaves me doubting my suspicion, but I will toss it out >>> anyway, and since you are building a vm, you can pretty easily run through >>> the exercise. >>> >>> First, the question: what (full path) library is the vm trying to load? >>> It really is a plugin, so some of my more common concerns (extra slashes in >>> the path, so.Name instead of libName.so, etc., go away - or do they??). >>> >>> Sadly, I don't see the code I want to give you on this machine. Maybe my >>> laptop will have some friendly symlinks to the tweaked files. In short, I >>> think that any time the (particularly linux) vm translates a number to to a >>> name or a name to a path, and the subsequent load fails, it should say >>> something somewhere about what it tried to open/load. I have used syslog() >>> to good effect. It's nice because the logs rotate, giving some time for the >>> user to look for it and yet not clog the drive with old news. >>> >>> Ok; I'll shut up and see if I can find some code for you :) >>> >>> Bill >>> >>> >>> >>> ________________________________________ >>> From: [hidden email] >>> [[hidden email]] On Behalf Of Alain Plantec >>> [[hidden email]] >>> Sent: Wednesday, June 01, 2011 2:00 PM >>> To: [hidden email] >>> Subject: Re: [Pharo-project] Compiling and using the FT2Plugin >>> >>> Le 01/06/2011 19:46, Igor Stasenko a écrit : >>>> On 1 June 2011 19:20, Alain Plantec<[hidden email]> wrote: >>>>> Hi all, >>>>> I try to build my own vm (ubuntu 10.04, virtualbox) >>>>> Thanks to the **excellent** Mariano blog, I can compile, it runs ok >>>>> except >>>>> the FT2Plugin >>>>> I always have the following error message while trying to load fonts: >>>>> >>>>> ioLoadModule(libFT2Plugin.so): >>>>> libFT2Plugin.so: cannot open shared object file: No such file or >>>>> directory >>>>> >>>>> I guess that it is because the plugin is unable to load libfreetype.so. >>>>> does someone know what I am missing ? >>>>> >>>> i know. ;) >>>> >>>> i wanna add a correct settings for building this plugin on all >>>> platforms. so we can ship a vm with this plugin by default. >>>> But i haven't time to do it yet. So, if you find a solution how to do >>>> it for unix, i will capture your knowledge in corresponding config(s) >>>> :) >>> ahhhhh! thanks Igor >>> I'm not so stupid, its a problem :) >>> ok, I will try >>> Cheers >>> Alain >>>>> thanks >>>>> Alain >>>>> >>> >> >> > > |
On 4 June 2011 11:34, Alain Plantec <[hidden email]> wrote:
> Hi Igor, > > #configureFT2Plugin: is the place for #addExternalLibraries: but it only > works for FT2Plugin compiled as internal plugin. > To compile the FT2Plugin as external, you also have to use > #addExternalLibraries: #('freetype') but not sent from #configureFT2Plugin:. > It is because of cmake and where #configurePlugin:with: is sent from the > #generate method. > in the #generate method, #configurePlugin:with: is sent **BEFORE** the > 'add_library' cmd production for cmake. > it is ok for internal plugin. but, if the plugin is external, then, > #addExternalLibraries: #('freetype') > has to be invoked **AFTER** the 'add_library' cmd production for cmake. > > I've implemented a #postConfigurePlugin:with:. same logic as > #configurePlugin:with: but sent from > the generate method after the 'add_library' cmd production. > > generate > ... > vmGen config configurePlugin: plugin with: self. > ... > internal > ifTrue: [self cmd: 'add_library' params: name , ' STATIC > ${sources}'.] > ifFalse: [self cmd: 'add_library' params: name , ' SHARED > ${sources}']. > > vmGen config postConfigurePlugin: plugin with: self. "added post > configuration here" > ... > Yeah. I am also stumbled with this couple of times. The workaround would be to use variables, so in #addExternalLibrary , it should set (or better append ) library to the list, and then generator will simply use this list in a single command for linking with target. > I will open an issue and put all my stuffs there. > good. thanks. > Cheers > Alain > > -- Best regards, Igor Stasenko AKA sig. |
Hi Alain. I am a bit late, sorry. I just wanted to let you know that you made me happy :)
Not only because you could build the vm by yourself but in addition you could help us, comment a problem and even helping with the solution. That kind of thing is exactly what I expect and hope when I write my posts or colaborate with the VM world. Cheers Mariano On Sat, Jun 4, 2011 at 2:55 PM, Igor Stasenko <[hidden email]> wrote:
-- Mariano http://marianopeck.wordpress.com |
Free forum by Nabble | Edit this page |