Status: Accepted
Owner: [hidden email] CC: marianopeck, [hidden email] New issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 I try to build my own vm (ubuntu 10.04, virtualbox) Thanks to the **excellent** Mariano's 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 _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #1 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 ----- from Igor ------- 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. ------------------ _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #2 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 #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" ... _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Updates:
Status: ReviewNeeded Labels: Milestone-1.3-DevImage Comment #3 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 FT2PLugin is now ok in Pharo 1.3 #13254, as an internal and as an external plugin. Here is what I've done and changed: -- started from Mariano's blog explanations (except that for testing purpose, I've tried with the last version of ConfigurationOfCog and of CMakeVMMaker). ---------------------- Deprecation raiseWarning: false. Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfCog'; load. ((Smalltalk at: #ConfigurationOfCog) project latestVersion) load. Gofer new squeaksource: 'VMMaker'; package: 'CMakeVMMaker'; load. ---------- ConfigurationOfCog raises the following: *********** This package depends on the following classes: AbstractLauncher You must resolve these dependencies before you will be able to load these definitions: CommandLineLauncher ... *************** One can proceed here (btw: the question is why this dependency ?) -- Next the plugin source. I've tried to load Freetype-Plugin-Igor.Stasenko.57 from: 'http://www.squeaksource.com/FreetypePlugin'. But, because of few underscores, it is unloadable in Pharo 1.3. So, I've removed these underscores. The resulting source file is attached (Freetype-Plugin-source.st). My other changes are in ft2plugin-cmake-gen.2.cs. With this small changes set you should be able to compile the FT2Plugin. It is made with a 'postConfiguration' logic as explained in the previous post. For convenience and testing purpose I've attached MyCMakeVMMaker-Unix-Cog.cs with the MyCogUnixConfig class which have the FT2Plugin declared as an external plugin. ----- MyCogUnixConfig new generateSources; generate. ----- Alain Attachments: Freetype-Plugin-source.st 50.2 KB ft2plugin-cmake-gen.2.cs 2.9 KB MyCMakeVMMaker-Unix-Cog.st 465 bytes _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #4 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 Thanks, Alain. I will integrate that to our builds. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Updates:
Labels: -Milestone-1.3-DevImage Type-Jenkins Comment #5 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 (No comment was entered for this change.) _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #6 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 I uploaded a new version of freetype plugin package into repository with your fixes. Freetype-Plugin-IgorStasenko.59 _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Updates:
Status: Closed Comment #7 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 Name: CMakeVMMaker-IgorStasenko.107 Author: IgorStasenko Time: 14 June 2011, 3:19:10 pm UUID: f958c4bb-fcbc-4098-aa4c-6cf1a554f09c Ancestors: CMakeVMMaker-IgorStasenko.106 - added rules for building freetype plugin under unix platform. - you should load thre freetype plugin into image (http://www.squeaksource.com/FreetypePlugin ) and then you can build VM with freetype plugin, either internal or external: | config | config := CogUnixConfig new. config externalPlugins: (config externalPlugins copyWith: #FT2Plugin ). " or config internalPlugins: (config internalPlugins copyWith: #FT2Plugin ). " config generateSources. config generate. (both build types tested and working fine) _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #8 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 Hi Igor, unfortunately it is not fixed :) the good news is that now the freetype plugin can be loaded. For FT2Plugin as an internal plugin, the -lfreetype is missing for the vm linking. The same when you try to compile it as an external plugin. the -lfreetype is missing for the shared library libFT2Plugin.so linking (undefined symbol at runtime). configureFT2Plugin is empty, so I guess something is missing. Alain _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Comment #9 on issue 4374 by [hidden email]: Compiling and using the FT2Plugin http://code.google.com/p/pharo/issues/detail?id=4374 it works ok for me. (tested with CMakeVMMaker-IgorStasenko.115) work both for internal plugin as well as for external one. _______________________________________________ Pharo-bugtracker mailing list [hidden email] http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker |
Free forum by Nabble | Edit this page |