RE: Compiling Glib 2.16.5 on strawberry perl
Hi Zaki Thanks for the proposal. The perl you are using is installed by MSYS2, is it ? I'm using strawberry perl. And unfortunately libwinpthread-1.dll in strawberry is not compatible with the one in msys64/mingw32. A naïve question sorry: using perl from MSYS2, can you start a perl script from the "normal" MS cmd.exe shell ? François > -Original Message- > From: Zakariyya Mughal [mailto:zaki.mug...@gmail.com] > Sent: mardi, 5. juillet 2016 07:13 > To: RAPPAZ Francois > Cc: "Torsten Schönfeld"; gtk-perl-list@gnome.org > Subject: Re: Compiling Glib 2.16.5 on strawberry perl > > On 2016-06-30 at 07:50:30 +, RAPPAZ Francois wrote: > > Finally I succeed to compile this Gtk stuff. > > > > The important thing is to change the prefix line in the pc files in > gtk+\lib\pkgconfig with prefix=${pcfiledir}/../.. > > > > The pc file to choose is the one corresponding to the first library > being searched in the perl Makefile.pl step for a given package. > > > > Once this change is done, there is still the need to indicate where > all the header files are using INC="-Ipath/to/file -I..." > > but LIBS="..." is not needed. > > > > With that the compiling + linking goes without undefined reference > errors. > > > > Two remarks: > > - why did nobody ever told me that on this list ? Did no one try to > compile this stuff on windows ? > > - wxWidget is also based on external libs. It is set up in two steps > Alien::wxWidget + Wx and it's much, much, easier to install. > > I have been compiling Gtk3 Perl packages using MSYS2 and find it much > easier to do consistently. > > Would you be interested in a set of scripts that you can use on your > machines or on Appveyor? To give an example of what I was able to > accomplish, see the build artifact at > <https://ci.appveyor.com/project/zmughal/release/build/1.0.20/artifacts > >. > > That is a ZIP file that contains Perl, GTK+3, GTK themes, etc. along > with a PAR::Packer-based executable that starts the application (a PDF > reader based on MuPDF). I hope to take this and build an MSI installer > with it soon. > > Cheers, > - Zaki Mughal > > > > > François > > > > > > > -Original Message----- > > > From: gtk-perl-list [mailto:gtk-perl-list-boun...@gnome.org] On > > > Behalf Of "Torsten Schönfeld" > > > Sent: mercredi, 29. juin 2016 11:39 > > > To: gtk-perl-list@gnome.org > > > Subject: Re: Compiling Glib 2.16.5 on strawberry perl > > > > > > "RAPPAZ Francois" <francois.rap...@unifr.ch>: > > > > pkg-config --libs glib-2.0 > > > > -Lc:/devel/target/0ca5583385db1135a53cf9e275815b19/lib -lglib-2.0 > > > > - > > > lintl > > > > > > There's your problem. You seem to have multiple conflicting > > > installations: C:/prog/gtk+ vs. C:/devel, and maybe others. I > > > suggest cleaning this up, or at least cleaning up your PATH and > > > PKG_CONFIG_PATH environment variables, and trying again. > > > ___ > > > gtk-perl-list mailing list > > > gtk-perl-list@gnome.org > > > https://mail.gnome.org/mailman/listinfo/gtk-perl-list > > ___ > > gtk-perl-list mailing list > > gtk-perl-list@gnome.org > > https://mail.gnome.org/mailman/listinfo/gtk-perl-list ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Glib 2.16.5 on strawberry perl
Finally I succeed to compile this Gtk stuff. The important thing is to change the prefix line in the pc files in gtk+\lib\pkgconfig with prefix=${pcfiledir}/../.. The pc file to choose is the one corresponding to the first library being searched in the perl Makefile.pl step for a given package. Once this change is done, there is still the need to indicate where all the header files are using INC="-Ipath/to/file -I..." but LIBS="..." is not needed. With that the compiling + linking goes without undefined reference errors. Two remarks: - why did nobody ever told me that on this list ? Did no one try to compile this stuff on windows ? - wxWidget is also based on external libs. It is set up in two steps Alien::wxWidget + Wx and it's much, much, easier to install. François > -Original Message- > From: gtk-perl-list [mailto:gtk-perl-list-boun...@gnome.org] On Behalf > Of "Torsten Schönfeld" > Sent: mercredi, 29. juin 2016 11:39 > To: gtk-perl-list@gnome.org > Subject: Re: Compiling Glib 2.16.5 on strawberry perl > > "RAPPAZ Francois" <francois.rap...@unifr.ch>: > > pkg-config --libs glib-2.0 > > -Lc:/devel/target/0ca5583385db1135a53cf9e275815b19/lib -lglib-2.0 - > lintl > > There's your problem. You seem to have multiple conflicting > installations: C:/prog/gtk+ vs. C:/devel, and maybe others. I suggest > cleaning this up, or at least cleaning up your PATH and PKG_CONFIG_PATH > environment variables, and trying again. > ___ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-perl-list ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Glib 2.16.5 on strawberry perl
pkg-config --libs glib-2.0 -Lc:/devel/target/0ca5583385db1135a53cf9e275815b19/lib -lglib-2.0 -lintl pkg-config --static --libs glib-2.0 g object-2.0 -Lc:/devel/target/0ca5583385db1135a53cf9e275815b19/lib -lglib-2.0 -lintl -lgobject-2.0 pkg-config --libs gobject-2.0 -Lc:/devel/target/0ca5583385db1135a53cf9e275815b19/lib -lgobject-2.0 -lglib-2.0 -lintl pkg-config --cflags gobject-2.0 -Ic:/devel/target/0ca5583385db1135a53cf9e275815b19/include/glib-2.0 -Ic:/devel/target/0ca5583385db1135a53cf9e275815b19/lib/glib-2.0/include -mms-bitfields pkg-config --libs gthread-2.0 -Lc:/devel/target/0ca5583385db1135a53cf9e275815b19/lib -lgthread-2.0 -lglib-2.0 -lintl pkg-config --cflags gthread-2.0 -Ic:/devel/target/0ca5583385db1135a53cf9e275815b19/include/glib-2.0 -Ic:/devel/target/0ca5583385db1135a53cf9e275815b19/lib/glib-2.0/include -mms-bitfields If I run perl Makefile.pl verbose I received Warning (mostly harmless): No library found for -lgobject-2.0 Etc... for all the libraries > -Original Message- > From: gtk-perl-list [mailto:gtk-perl-list-boun...@gnome.org] On Behalf > Of "Torsten Schönfeld" > Sent: mercredi, 29. juin 2016 11:14 > To: gtk-perl-list@gnome.org > Subject: RE: Compiling Glib 2.16.5 on strawberry perl > > "RAPPAZ Francois" <francois.rap...@unifr.ch>: > > The makefile is coming from > > > > perl Makefile.pl INC="-IC:\prog\gtk+\include\glib-2.0 - > IC:\prog\Gtk+\lib\glib-2.0\include -I. -I./build" LIBS="- > LC:/prog/gtk+/lib -lglib-2.0 -lintl " > > I don't understand why you need to specify INC and LIBS manually, it > should work automatically if pkg-config is set up correctly. What do > these commands return for you? > > pkg-config --libs gobject-2.0 > pkg-config --cflags gobject-2.0 > pkg-config --libs gthread-2.0 > pkg-config --cflags gthread-2.0 > > (They are used by Makefile.PL.) > > In any case, your LIBS is missing "-lgobject-2.0" and possibly "- > lgthread-2.0" and "-lgmodule-2.0". > ___ > gtk-perl-list mailing list > gtk-perl-list@gnome.org > https://mail.gnome.org/mailman/listinfo/gtk-perl-list ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
Compiling Glib 2.16.5 on strawberry perl
I fetched the Gtk+ stack from http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+ (Bundle 2.24) that I unzipped in C:\prog\gtk+ My %path% contains C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;C:\prog\gtk+\bin My PKG_CONFIG_PATH is C:\strawberry\c\lib\pkgconfig; C:\prog\gtk+\lib\pkgconfig I'm trying to compile Glib-2.0 ver 2.16.5 The linker fails with "C:\strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Glib .bs blib\arch\auto\Glib\Glib.bs 644 [ LD blib\arch\auto\Glib\Glib.xs.dll ] Cannot export SvGVariant: symbol not defined ... My makefile is done with perl Makefile.pl INC="-IC:\prog\gtk+\include\glib-2.0 -IC:\prog\Gtk+\lib\glib-2.0\include -I. -./build" LIBS="-LC:/prog/gtk+/lib -lglib-2.0 -lintl -lgobject-2.0 -lgthread-2.0" Thanks for any help François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
Pango compile
I have downloaded Gtk2 from here http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/2.24/ and unzipped the gtk+-bundle_2.24.10-20120208_win32.zip I have succeeded in compiling cairo with the makefile issued from perl Makefile.pl INC="-IC:/strawberry/c/include/freetype2 -IC:/prog/Gtk+/include/cairo -IC:/prog/Gtk+/include/ -I. -I./build" LIBS=":nosearch -LC:/prog/Gtk+/lib -lcairo" and glib: perl Makefile.pl INC="-IC:/prog/Gtk+/lib/glib-2.0/include -IC:/prog/Gtk+/include -IC:\prog\gtk+\include\glib-2.0 -I. -I./build" LIBS=":nosearch -LC:/prog/Gtk+/lib -lgthread-2.0 -lgobject-2.0 -lglib-2.0 -lintl" Not all tested passed with glib (t/a.t failed) but I installed it anyway. I'm stuck with pango having undefined reference xs/Pango.o:Pango.c:(.text+0x335): undefined reference to `pango_alignment_get_type' xs/Pango.o:Pango.c:(.text+0x345): undefined reference to `gperl_register_fundamental' My makefile is obtained with perl Makefile.pl INC="-I.\build -IC:\prog\Gtk+\include\glib-2.0 -IC:\prog\Gtk+\lib\glib-2.0\include -IC:/prog/Gtk+/include/pango-1.0 -IC:/prog/gtk+/include/freetype2 -IC:/prog/Gtk+/include/cairo -IC:/prog/Gtk+/include -IC:/strawberry/perl/site/lib/Cairo/Install -IC:/strawberry/perl/site/lib/Glib/Install -I." LIBS=":nosearch -LC:/prog/Gtk+/lib -lpango-1.0 -lglib-2.0 -lintl -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lpangocairo-1.0" The gtk stack installed from msys2 did not work with my strawberry perl 5.24: the test for cairo gives errors: missing function pthread_setname_np needed by cairo but missing from my libwinprthread-1.dll Thanks François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Glib compilation on windows 10
Hello Max Thanks for the link, after reading the page, I try this C:\strawberry\cpan\build\Glib-1.321-28apTA>pkg-config --libs gobject-2.0 glib-2.0 Which gives -L/mingw32/lib -lgobject-2.0 -lglib-2.0 -lintl Then C:\strawberry\cpan\build\Glib-1.321-28apTA>perl Makefile.pl LIBS=":nosearch -L/mingw32/lib -lgobject-2.0 -lglib-2.0 -lintl" C:\strawberry\cpan\build\Glib-1.321-28apTA>dmake But the linker still fails with [ LD blib\arch\auto\Glib\Glib.xs.dll ] C:\STRAWB~1\c\lib/gobject-2.0.lib: error adding symbols: File in wrong format François -Original Message- From: gtk-perl-list [mailto:gtk-perl-list-boun...@gnome.org] On Behalf Of max.augsb...@gmx.de Sent: mercredi, 8 juin 2016 23:24 To: gtk-perl-list@gnome.org Subject: Re: Glib compilation on windows 10 Dear Francois, I have no idea about installing perl Gtk2 in Windows. But some time ago Zaki Mughal posted a very interesting blog entry about installing a Perl Gtk3 Application on Windows with mysys2. He had a similar error as you and perhaps the solution could work for you, too... Here is the link: https://project-renard.github.io/doc/development/meeting-log/posts/2016/05/03/windows-build-with-msys2/ I hope this is helpful, Max ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Glib compilation on windows 10
Thanks for replying I have installed msys2-x86_64 from http://msys2.github.io/ and got mingw-w64-gtk2 from https://github.com/Alexpux/MINGW-packages I have edited my environment variables with adding C:\msys\mingw32\bin to PATH And I have set pkg_config_path to C:\msys\mingw32\lib\pkgconfig I have changed libpath in my perl config.pm with adding C:\msys\mingw32\lib (since defining an INCLUDE environment variable does not work) From the downloaded glib package from cpan: Running perl Makefile.pl gives Warning: Warning (mostly harmless): No library found for -pthread I add this to the INC in the makefile produced -IC:/msys/mingw32/include -IC:/msys/mingw32/lib/glib-2.0/include -IC:/msys/mingw32/include/glib-2.0 (without these , header files are not found) But the compilation still fails with ' => { }, 'DL_VARS' => []);" [ LD blib\arch\auto\Glib\Glib.xs.dll ] Glib.o:Glib.c:(.text+0x12a0): undefined reference to `g_mutex_lock' TYIA François -Original Message- From: br...@xaoc.org [mailto:br...@xaoc.org] On Behalf Of Brian Manning Sent: mardi, 7 juin 2016 16:51 To: RAPPAZ Francois <francois.rap...@unifr.ch> Cc: gtk-perl-list@gnome.org Subject: Re: Glib compilation on windows 10 On Tue, Jun 7, 2016 at 6:56 AM, RAPPAZ Francois <francois.rap...@unifr.ch> wrote: > Hi there > > I have to compile Gtk2 on windows 10 with strawberry perl. > > I have unzip in a share U:\docs\backup\Gtk+ a Gtk 2.20.0 runtime > environment for windows > > I got Glib from CPAN and > Running perl Makefile.pl in the cpan/build dir gives > > Including generated API documentation... > Warning (mostly harmless): No library found for -lgobject-2.0 Warning > (mostly harmless): No library found for -lglib-2.0 Warning (mostly > harmless): No library found for -lintl Warning (mostly harmless): No > library found for -lgthread-2.0 Generating a dmake-style Makefile > Writing Makefile for Glib Writing MYMETA.yml and MYMETA.json > > Since some header files were not found, I add this to the generated > makefile INC = -I. ... -IU:\docs\backup\Gtk+\include > -IU:\docs\backup\Gtk+\include\glib-2.0 > -IU:\docs\backup\Gtk+\lib\glib-2.0\include That warning said that library files were not found, not that headers weren't found; I would try to make sure that the Glib module installer can find the libraries it needs to link against before going further. Where did you source the GTK+ runtime environment that you're using, and does it include a copy of libglib file? What version of libglib is included? FYI, the GTK project is now recommending that you use MSYS2 [1] on Windows for installing Windows versions of GTK+ libraries. I don't have any experience with it however. Thanks, Brian [1] https://msys2.github.io/ ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
Glib compilation on windows 10
Hi there I have to compile Gtk2 on windows 10 with strawberry perl. I have unzip in a share U:\docs\backup\Gtk+ a Gtk 2.20.0 runtime environment for windows I got Glib from CPAN and Running perl Makefile.pl in the cpan/build dir gives Including generated API documentation... Warning (mostly harmless): No library found for -lgobject-2.0 Warning (mostly harmless): No library found for -lglib-2.0 Warning (mostly harmless): No library found for -lintl Warning (mostly harmless): No library found for -lgthread-2.0 Generating a dmake-style Makefile Writing Makefile for Glib Writing MYMETA.yml and MYMETA.json Since some header files were not found, I add this to the generated makefile INC = -I. ... -IU:\docs\backup\Gtk+\include -IU:\docs\backup\Gtk+\include\glib-2.0 -IU:\docs\backup\Gtk+\lib\glib-2.0\include Runing dmake compile some c files then gives a lot of errors: [ CC GVariant.c ] GVariant.xs: In function 'wrap_variant': GVariant.xs:78:24: warning: passing argument 1 of 'variant_to_sv' makes pointer from integer without a cast return variant_to_sv (g_value_get_variant (value), FALSE); ^ GVariant.xs:28:1: note: expected 'struct GVariant *' but argument is of type 'int' variant_to_sv (GVariant * variant, gboolean own) ^ GVariant.c: In function 'XS_Glib__Variant_lookup_value': GVariant.c:1323:9: warning: assignment makes pointer from integer without a cast RETVAL = g_variant_lookup_value(dictionary, key, expected_type); ^ [ CC gperl-gtypes.c ] [ LD blib\arch\auto\Glib\Glib.xs.dll ] Glib.o:Glib.c:(.text+0x85): undefined reference to `g_filename_display_basename' My perl is ummary of my perl5 (revision 5 version 24 subversion 0) configuration: Platform: osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int uname='Win32 strawberry-perl 5.24.0.1 #1 Tue May 10 17:10:11 2016 i386' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.9.2', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678, doublekind=3 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12, longdblkind=3 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"' libpth=C:\STRAWB~1\c\lib C:\STRAWB~1\c\i686-w64-mingw32\lib C:\STRAWB~1\c\lib\gcc\i686-w64-mingw32\4.9.2 libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl524.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib"' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_COPY_ON_WRITE PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at May 10 2016 17:20:50 %ENV: PERL5LIB="U:\docs\perl\lib" @INC: U:\docs\perl\lib C:/strawberry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/lib . My environment variable PATH is C:\prog\perl;U:\docs\backup\Gtk+\bin;U:\docs\backup\Gtk+\lib PKG_CONFIG_LIBDIR is C:\strawberry\c\lib\pkgconfig PKG_CONFIG_PATH is U:\docs\backup\Gtk+\lib\pkgconfig;U:\docs\backup\Gtk+\include Thanks for any help F. ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
toubles with building cairo
I changed the pkg_config_path to C:\strawberry\c\lib\pkgconfig Now ExtUtils::PkgConfig-find ('cairo'); Says modversion: 1.10.0 cflags: -mms-bitfields -IC:/strawberry/c/include/cairo -IC:/strawberry/c/in clude/glib-2.0 -IC:/strawberry/c/lib/glib-2.0/include -IC:/strawberry/c/include -IC:/strawberry/c/include/freetype2 -IC:/strawberry/c/include/libpng16 -IC:/stra wberry/c/lib/pkgconfig/../../include libs:-LC:/strawberry/c/lib -lcairo perl Makefile.pl still warns me of a missing -lcairo dmake goes a little further but the command g++ -o blib\arch\auto\Cairo\Cairo.xs.dll -Wl,--base-file -Wl,dll.base -mdll -s -LC:\STRAWB~2\perl\lib\CORE -LC:\STRAWB~2\c\lib Cairo.o CairoFont.o CairoMatrix.o CairoPath.o CairoPattern.o CairoSurface.o CairoRegion.o CairoFt.o cairo-perl-enums.o cairo-perl-flags.o C:\STRAWB~2\pelibcomctl32.a dll.exp fails with a lot of errors like Cairo.o:Cairo.c:(.text+0x6ae): undefined reference to `cairo_version_string' I have checked that C:\STRAWB~2 is indeed c:\strawberry with dir \X It seems that all the files listed in -L arg are present. Idea ? Thanks François -Original Message- From: br...@xaoc.org [mailto:br...@xaoc.org] On Behalf Of Brian Manning Sent: jeudi, 23. avril 2015 18:23 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: toubles with building cairo On Thu, Apr 23, 2015 at 7:48 AM, RAPPAZ Francois francois.rap...@unifr.ch wrote: Hi I'm trying to install cairo on a new setup of perl strawberry (details below) When I run dmake I get C:\strawberry\perl\lib\ExtUtils\xsubpp -noprototypes -typemap C:\STRAWB~2\perl\lib\ExtUtils\typemap -typemap build\cairo-perl-auto.typemap -typemap cairo-perl.typemap Cairo.xs Cairo.xsc C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- Cairo.xsc Cairo.c gcc -c -I. -Ibuild -mms-bitfields -IC:strawberryclib/include/cairo -IC:strawberryclib/include/glib-2.0 -IC:strawberryclib/lib/glib-2.0/include -IC:strawberryclib/include I have a cairo.h file in C:\strawberry\c\include\cairo And not in C:\strawberry\c\lib\include as described by the includedir above. If I use %pkg_info = ExtUtils::PkgConfig-find ($package); I get modversion: 1.10.0 cflags: -mms-bitfields -IC:strawberryclib/include/cairo - IC:strawberryclib/ include/glib-2.0 -IC:strawberryclib/lib/glib-2.0/include -IC:strawberryclib/incl ude -Ic:/STRAWB~2/c/lib/PKGCON~1/../../include/freetype2 -Ic:/STRAWB~2/c/lib/PKG CON~1/../../include/libpng16 - Ic:/STRAWB~2/c/lib/PKGCON~1/../../include libs:-LC:strawberryclib/lib -lcairo My questions are - shall I edit all the pc files by hand to correct for the includedir variable or shall I move the include folder under the lib folder ? Or move the header file to where the Makefile is expecting it, but your problem is most likely related to your 2nd question; - is IC:strawberryclib/include/cairo correct ? why are the / removed ? What command shell are you using when trying to build Cairo, bash.exe or cmd.exe? You also didn't mention your version of Windows. Is this your 2nd copy of Strawberry installed on the machine? The long filename got truncated to strawb~2, which makes me think there may be another copy on the machine you're using. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
toubles with building cairo
Hi I'm trying to install cairo on a new setup of perl strawberry (details below) When I run dmake I get C:\strawberry\perl\lib\ExtUtils\xsubpp -noprototypes -typemap C:\STRAWB~2\perl\lib\ExtUtils\typemap -typemap build\cairo-perl-auto.typemap -typemap cairo-perl.typemap Cairo.xs Cairo.xsc C:\strawberry\perl\bin\perl.exe -MExtUtils::Command -e mv -- Cairo.xsc Cairo.c gcc -c -I. -Ibuild -mms-bitfields -IC:strawberryclib/include/cairo -IC:strawberryclib/include/glib-2.0 -IC:strawberryclib/lib/glib-2.0/include -IC:strawberryclib/include -Ic:/STRAWB~2/c/lib/PKGCON~1/../../include/freetype2 -Ic:/STRAWB~2/c/lib/PKGCON~1/../../include/libpng16 -Ic:/STRAWB~2/c/lib/PKGCON~1/../../include -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\1.105\ -DXS_VERSION=\1.105\ -IC:\STRAWB~2\perl\lib\CORE Cairo.c In file included from Cairo.xs:10:0: /cairo-perl.h:17:19: fatal error: cairo.h: No such file or directory #include cairo.h MY environment variable PKG_CONFIG_PATH is set to c:\STRAWB~2\c\lib\PKGCON~1 And the cairo.pc in this folder is prefix=C:\strawberry\c\lib exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: cairo Description: Multi-platform 2D graphics library Version: 1.10.0 Requires.private: gobject-2.0 glib-2.0 fontconfig = 2.2.95 freetype2 = 9.7.3 libpng Libs: -L${libdir} -lcairo Libs.private: -lz -lz Cflags: -I${includedir}/cairo I have a cairo.h file in C:\strawberry\c\include\cairo And not in C:\strawberry\c\lib\include as described by the includedir above. If I use %pkg_info = ExtUtils::PkgConfig-find ($package); I get modversion: 1.10.0 cflags: -mms-bitfields -IC:strawberryclib/include/cairo -IC:strawberryclib/ include/glib-2.0 -IC:strawberryclib/lib/glib-2.0/include -IC:strawberryclib/incl ude -Ic:/STRAWB~2/c/lib/PKGCON~1/../../include/freetype2 -Ic:/STRAWB~2/c/lib/PKG CON~1/../../include/libpng16 -Ic:/STRAWB~2/c/lib/PKGCON~1/../../include libs:-LC:strawberryclib/lib -lcairo My questions are - shall I edit all the pc files by hand to correct for the includedir variable or shall I move the include folder under the lib folder ? - is IC:strawberryclib/include/cairo correct ? why are the / removed ? Thanks for any help François Summary of my perl5 (revision 5 version 20 subversion 2) configuration: Platform: osname=MSWin32, osvers=6.3, archname=MSWin32-x86-multi-thread-64int uname='Win32 strawberry-perl 5.20.2.1 #1 Sat Feb 21 12:32:00 2015 i386' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags =' -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT _CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitf ields', optimize='-s -O2', cppflags='-DWIN32' ccversion='', gccversion='4.8.3', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='long long', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='g++', ldflags ='-s -LC:\STRAWB~2\perl\lib\CORE -LC:\STRAWB~2\c\lib' libpth=C:\STRAWB~2\c\lib C:\STRAWB~2\c\i686-w64-mingw32\lib C:\STRAWB~2\c\li b\gcc\i686-w64-mingw32\4.8.3 libs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 perllibs=-lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladva pi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lver sion -lodbc32 -lodbccp32 -lcomctl32 libc=, so=dll, useshrplib=true, libperl=libperl520.a gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=xs.dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-mdll -s -LC:\STRAWB~2\perl\lib\CORE -LC:\STRA WB~2\c\lib' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF Built under MSWin32 Compiled at Feb 21 2015 12:36:01 %ENV: PERL5LIB=U:\docs\perl\lib
Installing Glib::Object::Introspection
I would like to install Glib::Object::Introspection on my w7 pc with Strawberry perl. I can have the perl Makefile.pl command finishing. I miss a gobject-introspection-1.0 library. I have download a gobject- introspection-1.31.0 from github but as far as I can see I should compile this. Where can I find the binary file for W7 ? How can I install this package ? Thanks for any help François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Installing Glib::Object::Introspection
Thanks for replying That would mean that I would have to replace all my existing perl installation with this one ? Regards François -Original Message- From: br...@xaoc.org [mailto:br...@xaoc.org] On Behalf Of Brian Manning Sent: vendredi, 9. janvier 2015 11:18 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: Installing Glib::Object::Introspection Sorry, that someone with the Gtk3 Strawberry Perl is Daniel Kasak, I meant to put his name in the e-mail before I sent it. Thanks, Brian On Fri, Jan 9, 2015 at 1:17 PM, Brian Manning c...@xaoc.org wrote: Someone has already a modified Strawberry Perl with the Gtk3 module for Windows, which would include the G:O:I module you are trying to build. The original release announcement is here: https://mail.gnome.org/archives/gtk-perl-list/2014- October/msg7.ht ml And this message has a newer download link: https://mail.gnome.org/archives/gtk-perl-list/2014- October/msg00011.ht ml Thanks, Brian On Fri, Jan 9, 2015 at 12:02 PM, RAPPAZ Francois francois.rap...@unifr.ch wrote: I would like to install Glib::Object::Introspection on my w7 pc with Strawberry perl. I can have the perl Makefile.pl command finishing. I miss a gobject-introspection-1.0 library. I have download a gobject- introspection-1.31.0 from github but as far as I can see I should compile this. Where can I find the binary file for W7 ? How can I install this package ? Thanks for any help François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: RFC: Gtk2::Ex::Linker
Hi there, Thanks for the comment and suggestion of a more specific name : What about « Gtk2::Ex::DbLinker » ? I understand Daniel’s concerns but I would assure him that my lack of response was not because I didn’t care. I was surprised by his cautious answer and had not realized the evolution of his modules compares to those I got from CPAN. Maybe we will unfork in some time ? maybe both modules will find their users and will address different needs. François From: gtk-perl-list [mailto:gtk-perl-list-boun...@gnome.org] On Behalf Of Daniel Kasak Sent: jeudi, 15. mai 2014 06:00 To: gtk-perl mailing list Subject: Re: RFC: Gtk2::Ex::Linker OK I guess I should comment on why this was forked from my work ... I asked François a couple of times to comment on some basic things like: - compatibility with existing supported databases - use cases - advantages in this approach ( a major piece of work ) - features I'd lose ... and didn't get an answer, or the answer felt like don't know, don't care. François sent me a demo application that didn't work at all. I hacked for a couple of hours, and still couldn't get anywhere. It pulled in LOTS and LOTS of dependencies that is never a good idea for compatibility - in particular if you have clients on Windows. More broadly, using an abstraction layer like Rose::DB seemed to add considerable complexity ( and dependencies ), while making further development and debugging much more difficult. Rose::DB only supports a handful of databases, whereas I have a bunch of oddball databases with broken drivers to support. As François' work was forked from a VERY old version of my code, which I'd put another couple of hundred ( possibly thousands ) of hours of work into, it all seemed like a lot of work for absolutely no benefit. I have a number of clients using my code in a production environment, and I have zero scope to tell them yeah there are a whole heap of things broken because some guy asked me to accept a massive patch that took my code back by 5 years and targeted some ORM thing. If François had contacted me early on and told me of his intentions, and better described some things like key benefits ( of which I currently know NONE ), I would most likely have worked on this with him. Not getting that basic communication at the START of the project is really not a good sign of things to come down the track. As things stand now, I've already done 'final' releases of Gtk2 versions, and I'm working on Gtk3 ports of both form and datasheet classes, on top of all the work I'd done over the past couple of years ( Oracle, Teradata, Netezza support, sequence support, multi-column primary key support, and stacks of bug fixes ). François is free to have another attempt at porting his work to a current version of my code, while addressing the above issues, at which point I'd be much more likely to undertake the MASSIVE testing fixing exercise that would follow. Dan On Sun, May 11, 2014 at 8:44 AM, Torsten Schoenfeld kaffeeti...@gmx.demailto:kaffeeti...@gmx.de wrote: On 09.04.2014 15:25, RAPPAZ Francois wrote: Gtk2::Ex::Linker Looks interesting, thanks for sharing! It is a little unfortunate that you could not agree with Daniel on a common way forward, but that happens. I do think that you should try to find a more specific name for your module. Linker seems too generic; maybe Gtk2::Ex::RdbLinker? ___ gtk-perl-list mailing list gtk-perl-list@gnome.orgmailto:gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RFC: Gtk2::Ex::Linker
Hi, I wrote a simple module to link a database content to a Gtk2 window, and I thought that a suitable name would be Gtk2::Ex::Linker and I'm planning to upload it on CPAN. Here's the rationale: -- NAME Gtk2::Ex::Linker - Use sql or an object-relational mapper to get data from a database and build a gtk2 Gui using a glade file SYNOPSIS use My::Form; use Rdb::MyTable::Manager; use Gtk2::Ex::Linker::RdbDataManager use Gtk2 -init; use Gtk2::GladeXML; my $builder = Gtk2::Builder-new(); $builder-add_from_file($path_to_glade_file); my $data = Rdb::MyTable::Manager-get_mytable(query = [primary_key = {eq = $self-{pk}}]); my $dman = Gtk2::Ex::Linker::RdbDataManager-new({data= $data, meta = Rdb::MyTable-meta }); $self-{form_for_my_table} = Gtk2::Ex::Linker::Form-new({ data_manager = $dman, builder = $builder, }); DESCRIPTION The aim of this module is to automate the process of tying data from a database to widgets on a Glade-generated window. All that is required is that you name your widgets the same as the fields in your data source. Step for use: 1) Instanciate a xxxDataManager object that access the database and contains the rows to display to the Form or Datasheet modules. Currently there are three way to access the database: plain sql + DBI, Rose::DB::Object, and DBIx::Class 2) Instanciate a Gtk2::GladeXML object 3) Instanciate a Gtk2::Ex::Linker::Form object or a Gtk2::EX::Linker::Datasheet that displays the data from the DataManager using the glade file. You would then typically connect the buttons to the methods below to handle common actions such as inserting, moving, deleting, etc. This module is the same as Gtk2::Ex::DBI and Gtk2::Ex::Datasheet::DBI except that database access can be made using plain SQL or the ORM mentioned above. Other ORM could be added if needed. The developer of Gtk2::Ex::DBI is not interested + has no time + no needs for including these change in the original modules unfortunately. I'm kindly asking for comments/suggestions/impressions about this idea and the namespace. François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Help with Gtk2::CellRendererCombo
Hi Daniel Thanks for replying With $column-set_cell_data_func($renderer, sub{ process_combo(@_); }); ... Sub process_combo { my ($tree_column, $renderer, $model, $iter ) = @_; ... } $model and $iter refer to the data grid (the tree) not the combo in the cell. How can I adjust the combo when the value in the grid (coming from a database) changes without looping in the whole combo ? By the way, I know, and I use your modules ! François From: Daniel Kasak [mailto:d.j.kasak...@gmail.com] Sent: dimanche, 9. février 2014 06:41 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: Help with Gtk2::CellRendererCombo Unless I misunderstand what you're doing ... you're making things far more complicated for yourself than they need to be. Your sub process_combo() receives: $tree_column, $renderer, $model, $iter. Your $model has both the text and the ID. The ID is in position 0, and the text that's displayed is in column 1. To get the ID, you'd go: my $id = $model-get( $iter, 0 ); To get the string, you'd go: my $string = $model-get( $iter, 1 ); If your IDs and strings come from a database, use my Gtk2::Ex::Datasheet::DBI ;) Big updates coming soon ... Dan On Sat, Feb 8, 2014 at 2:09 AM, RAPPAZ Francois francois.rap...@unifr.chmailto:francois.rap...@unifr.ch wrote: Hi there, I'm trying to use a CellRendererCombo in a tree. The combo has 2 columns one which holds a key (numeric) not displayed and, the visible column which holds a text. The only way I got it working is with two sub that searches the whole combo content for a match and then display the value found in the tree, or take the value from the tree to display the corresponding row in the combo. There is a similar code in perlmonks http://www.perlmonks.org/?node_id=952244 Is there no short way to do this ? My code is below. Thanks for any help François #! /usr/bin/perl -w use strict; use Gtk2 '-init'; use Glib qw/TRUE FALSE/; use Data::Dumper; my %render = ( text = sub { return Gtk2::CellRendererText-new; }, hidden = sub { return Gtk2::CellRendererText-new; }, number = sub { return Gtk2::CellRendererText-new;}, toggle = sub { return Gtk2::CellRendererToggle-new; }, combo = sub { return Gtk2::CellRendererCombo-new; }, progress = sub { return Gtk2::CellRendererProgress-new; }, status_column = sub { return Gtk2::CellRendererPixbuf-new; }, image = sub { return Gtk2::CellRendererPixbuf-new; }, ); my %signals = ( 'Gtk2::CellRendererText' = [ 'edited' , sub { cell_edited(@_)}], ' Gtk2::CellRendererToggle' = ['toggled', sub { toggle_edited(@_)}], 'Gtk2::CellRendererCombo' = ['edited', sub { combo_edited(@_)}], ); my @fields = (a,b,c); my %combo = (1 = one, 2 = two, 3 = three); #standard window creation, placement, and signal connecting my $window = Gtk2::Window-new('toplevel'); $window-signal_connect('delete_event' = sub { Gtk2-main_quit; }); $window-set_border_width(5); $window-set_position('center_always'); #this vbox will geturn the bulk of the gui my $vbox = ret_vbox(); #add and show the vbox $window-add($vbox); $window-show(); #our main event-loop Gtk2-main; sub ret_vbox { my $vbox = Gtk2::VBox-new(FALSE,5); $vbox-set_size_request (300, 300); #this is one of the provided base Gtk2::TreeModel classes. my $tree = Gtk2::TreeView-new(); my $pos=0; my @listedef; foreach my $field (@fields) { my $renderer = ($pos == 0 ? $render{combo}():$render{text}()); my $cell_ref = ref $renderer; print $cell_ref\n; $renderer-set( editable = TRUE ); if ($pos == 0){ setup_combo($pos, $field, $renderer); } #else { #$renderer-signal_connect (edited = sub { cell_edited(@_)}, $tree); #} $renderer-{column}=$pos; my $col = Gtk2::TreeViewColumn-new_with_attributes($field, $renderer, text = $pos); $tree-append_column($col); my $label = Gtk2::Label-new; $label-set_text($field); $label-visible( 1 ); $col-set_widget($label); push @listedef, Glib::String; if (exists $signals{$cell_ref}) { my $coderef = $signals{$cell_ref}[1]; $renderer-signal_connect ( $signals{$cell_ref}[0] = \$coderef, $tree ); } if ($pos == 0){ $col-set_cell_data_func($renderer, sub{ process_combo(@_); }); } $pos++; } my $liste = Gtk2::ListStore-new(@listedef); #fill it with arbitry data foreach (0..3){ $pos = 0; my @model_row; # $tree-append_column($col++); #my $iter = $tree
Help with Gtk2::CellRendererCombo
Hi there, I'm trying to use a CellRendererCombo in a tree. The combo has 2 columns one which holds a key (numeric) not displayed and, the visible column which holds a text. The only way I got it working is with two sub that searches the whole combo content for a match and then display the value found in the tree, or take the value from the tree to display the corresponding row in the combo. There is a similar code in perlmonks http://www.perlmonks.org/?node_id=952244 Is there no short way to do this ? My code is below. Thanks for any help François #! /usr/bin/perl -w use strict; use Gtk2 '-init'; use Glib qw/TRUE FALSE/; use Data::Dumper; my %render = ( text = sub { return Gtk2::CellRendererText-new; }, hidden = sub { return Gtk2::CellRendererText-new; }, number = sub { return Gtk2::CellRendererText-new;}, toggle = sub { return Gtk2::CellRendererToggle-new; }, combo = sub { return Gtk2::CellRendererCombo-new; }, progress = sub { return Gtk2::CellRendererProgress-new; }, status_column = sub { return Gtk2::CellRendererPixbuf-new; }, image = sub { return Gtk2::CellRendererPixbuf-new; }, ); my %signals = ( 'Gtk2::CellRendererText' = [ 'edited' , sub { cell_edited(@_)}], ' Gtk2::CellRendererToggle' = ['toggled', sub { toggle_edited(@_)}], 'Gtk2::CellRendererCombo' = ['edited', sub { combo_edited(@_)}], ); my @fields = (a,b,c); my %combo = (1 = one, 2 = two, 3 = three); #standard window creation, placement, and signal connecting my $window = Gtk2::Window-new('toplevel'); $window-signal_connect('delete_event' = sub { Gtk2-main_quit; }); $window-set_border_width(5); $window-set_position('center_always'); #this vbox will geturn the bulk of the gui my $vbox = ret_vbox(); #add and show the vbox $window-add($vbox); $window-show(); #our main event-loop Gtk2-main; sub ret_vbox { my $vbox = Gtk2::VBox-new(FALSE,5); $vbox-set_size_request (300, 300); #this is one of the provided base Gtk2::TreeModel classes. my $tree = Gtk2::TreeView-new(); my $pos=0; my @listedef; foreach my $field (@fields) { my $renderer = ($pos == 0 ? $render{combo}():$render{text}()); my $cell_ref = ref $renderer; print $cell_ref\n; $renderer-set( editable = TRUE ); if ($pos == 0){ setup_combo($pos, $field, $renderer); } #else { #$renderer-signal_connect (edited = sub { cell_edited(@_)}, $tree); #} $renderer-{column}=$pos; my $col = Gtk2::TreeViewColumn-new_with_attributes($field, $renderer, text = $pos); $tree-append_column($col); my $label = Gtk2::Label-new; $label-set_text($field); $label-visible( 1 ); $col-set_widget($label); push @listedef, Glib::String; if (exists $signals{$cell_ref}) { my $coderef = $signals{$cell_ref}[1]; $renderer-signal_connect ( $signals{$cell_ref}[0] = \$coderef, $tree ); } if ($pos == 0){ $col-set_cell_data_func($renderer, sub{ process_combo(@_); }); } $pos++; } my $liste = Gtk2::ListStore-new(@listedef); #fill it with arbitry data foreach (0..3){ $pos = 0; my @model_row; # $tree-append_column($col++); #my $iter = $tree-append(undef); #$tree_store-set ($iter,MODEL_FIRST_COLUMN, Parent $parent_nr); foreach my $field (@fields) { if ($pos == 0) { push @model_row, $liste-append, $pos, $_; } else { push @model_row, $pos, $field . . $_; } $pos++; } $liste-set(@model_row); } $liste-signal_connect( row-changed = sub { changed(@_) } ); $tree-set_model($liste); $vbox-pack_start($tree,TRUE,TRUE,0); $vbox-show_all(); return $vbox; } sub cell_edited { my ($cell, $path_string, $new_text, $tree) = @_; print cell_edited\n; # return unless ($tree); my $model = $tree-get_model; my $path = Gtk2::TreePath-new_from_string ($path_string); #my $model = $tree-get_model; my $col = $cell-{column}; my $iter = $model-get_iter($path); $model-set_value ($iter, $col, $new_text); } sub changed { my ( $liststore, $treepath, $iter ) = @_; print changed\n; } sub setup_combo { my
From Gtk2::GladeXML to Gtk2::Builder
To replace my use of Gtk2::GladeXML with Gtk2::Builder, I tried the following steps: With Glade 3.6.4, I saved my glade xml files as Gtkbuilder files. In my perl scripts, I changed # $self-{glade_xml_coll} = Gtk2::GladeXML-new(glade/jrn_coll.glade, 'jrn_coll'); $self-{glade_xml_coll}= Gtk2::Builder-new(); $self-{glade_xml_coll}-add_from_file(glade/jrn_coll.glade.bld); # $self-{glade_xml_coll}-signal_autoconnect_from_package($self); $self-{glade_xml_coll}-connect_signals($self); And all the call with get_wiget(name) were changed to get_object(name); I got the following warning when I call the add_from_file from the builder object Gtk-WARNING **: No object called: at forms/jrn_coll.pm line 22. Can someone explain me what this warning mean ? Thanks François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: From Gtk2::GladeXML to Gtk2::Builder
The module is here http://pastebin.com/8yn8aJWJ And the xml file here http://pastebin.com/DH1Su3qv Thanks François -Original Message- From: Brian Manning [mailto:elspicyj...@gmail.com] Sent: jeudi, 17. novembre 2011 17:14 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: From Gtk2::GladeXML to Gtk2::Builder On Thu, Nov 17, 2011 at 7:36 AM, RAPPAZ Francois francois.rap...@unifr.ch wrote: To replace my use of Gtk2::GladeXML with Gtk2::Builder, I tried the following steps: With Glade 3.6.4, I saved my glade xml files as Gtkbuilder files. In my perl scripts, I changed # $self-{glade_xml_coll} = Gtk2::GladeXML-new(glade/jrn_coll.glade, 'jrn_coll'); $self-{glade_xml_coll}= Gtk2::Builder-new(); $self-{glade_xml_coll}-add_from_file(glade/jrn_coll.glade.bld); # $self-{glade_xml_coll}-signal_autoconnect_from_package($self); $self-{glade_xml_coll}-connect_signals($self); And all the call with get_wiget(name) were changed to get_object(name); I got the following warning when I call the add_from_file from the builder object Gtk-WARNING **: No object called: at forms/jrn_coll.pm line 22. Can someone explain me what this warning mean ? Can you post/pastebin the contents of your Glade XML file (jrn_coll.glade.bld) and the module jrn_coll.pm? There's not enough context here to determine what is causing that error. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Gtk2::GladeXML
Thanks for replying, and for asking the good questions ! Where did you get the rest of the GTK library stack (GTK+/Glib/Pango/Cairo) that you're using on your Windows machine? I used this scripts from http://code.google.com/p/gtk-perl-compiler/ The files are from http://ftp.gnome.org/pub/gnome/binaries/win32 So it's the source you used. I tried again with http://ftp.acc.umu.se/pub/gnome/binaries/win32/libglade/2.6/libglade-dev_2.6.4-1_win32.zip And looking at what the scripts where doing I could have a makefile done without error or warning. At the end with copying include/glade/glade-xml.h from the unzipped libglade folder in the cpan build folder, I could compile and install the module... I will try the Gtk2::Builder anyway. Thanks again François -Original Message- From: Brian Manning [mailto:elspicyj...@gmail.com] Sent: jeudi, 3. novembre 2011 17:31 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: Compiling Gtk2::GladeXML On Thu, Nov 3, 2011 at 9:11 AM, RAPPAZ Francois francois.rap...@unifr.ch wrote: With perl 5.12 from strawberry, I managed to compile Gtk2 and friends from CPAN. Now I need to use glade generated xml files and I need the Gtk2::GladeXML module. I downloaded the libglade dll from http://wingtk.sourceforge.net/ and installed it. Where did you get the rest of the GTK library stack (GTK+/Glib/Pango/Cairo) that you're using on your Windows machine? http://wingtk.sourceforge.net/ looks like they only have binaries for GTK version 1.x, which is probably not what you're after. When I tried to generate a makefile from the cpan build folder of Gtk2::GladeXML it complains about a libglade-2.0.pc file missing in the pkgconfig folder. I add by hand such a file with 3 lines: Name: Libglade Description: a library for dynamically loading GLADE interface files Version: 2.0.2 and a makefile is produced. But the compilation failed with a glade/glade-xml.h file missing. Copying this file and the glade folder from the libglade/glade installed from wingtk does not help either. Does anyone know how to have this module installed ? Maybe you missed a -dev package that has the .pc and header files you need? Also see my comment above about http://wingtk.sourceforge.net/ and GTK version 1.x. For what it's worth #1, I get my Windows GTK binaries here: http://ftp.gnome.org/pub/gnome/binaries/win32/ For what it's worth #2, I use Glade-generated XML with Gtk2::Builder [1], which comes as part of the Gtk2.pm module distribution. If you're using Glade to generate XML for your GUI, newer versions of Glade can generate the correctly formatted XML to use with Gtk2::Builder. Thanks, Brian [1] http://gtk2-perl.sourceforge.net/doc/pod/Gtk2/Builder.html ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Compiling Gtk2::GladeXML
With perl 5.12 from strawberry, I managed to compile Gtk2 and friends from CPAN. Now I need to use glade generated xml files and I need the Gtk2::GladeXML module. I downloaded the libglade dll from http://wingtk.sourceforge.net/ and installed it. When I tried to generate a makefile from the cpan build folder of Gtk2::GladeXML it complains about a libglade-2.0.pc file missing in the pkgconfig folder. I add by hand such a file with 3 lines: Name: Libglade Description: a library for dynamically loading GLADE interface files Version: 2.0.2 and a makefile is produced. But the compilation failed with a glade/glade-xml.h file missing. Copying this file and the glade folder from the libglade/glade installed from wingtk does not help either. Does anyone know how to have this module installed ? Thanks François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Glib 1.223 on win xp
Hi Martin Thanks for the proposal but the problem is not worth the bother. I will probably move to Strawberry perl in the future (being obliged to upgrade from xp to w7), and will reconsider this at that time. Since the binaries I've found are working now with AS, it's not that much important. Regards François -Original Message- From: Martin Schlemmer [mailto:martin.schlem...@nwu.ac.za] Sent: mercredi, 1. juin 2011 14:11 To: gtk-perl-list@gnome.org; RAPPAZ Francois Subject: RE: Compiling Glib 1.223 on win xp On 2011/05/27 at 01:26 PM, RAPPAZ Francois francois.rap...@unifr.ch wrote: Hi I wanted to compile perl bindind for Glib and friends to have a recent Gtk2-perl, but I give up... Generally building packages for AS perl with mingw is a pita. I have sorted out most of the issues in the last few years I have been building Gtk2-perl for AS perl, and could send the scripts I am using, but you will need MSYS as well (I use grep, which I guess I could replace with perl code, but do not have time right now). The other option is if you can point me to the Gtk2 build you are using, I can compile them for you against that version of Gtk2. Regards, Martin I tried camelbox but without installing the core perl which was needed with it, and that was not working either with my perl 5.8.9 from ActiveState. I'm reluctant to have two perl versions installed, it's not very elegant at least, and even in twisting the path when using the gtk2 in a script, I prefer to keep the binaries I have found for ActiveState. The questions will come again when I upgrade and possibly move to another perl distribution. Francois At this point I have to ask why you're not using Camelbox. All this work is done for you already, you just have to run the installer and let it do it's magick. It looks like the only downside to running Camelbox for you would be the fact that you have different versions of Perl and GTK installed and listed in your %PATH environment variable, and you would need to clean up your %PATH (remove any GTK and Perl paths not related to Camelbox) prior to trying to use Camelbox. This could be done quite easily by using a DOS batch file, and you would not need to make any systemwide changes. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list Vrywaringsklousule / Disclaimer: http://www.nwu.ac.za/it/gov- man/disclaimer.html ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Glib 1.223 on win xp
Thanks for the comments. I wanted to compile perl bindind for Glib and friends to have a recent Gtk2-perl, but I give up... I tried camelbox but without installing the core perl which was needed with it, and that was not working either with my perl 5.8.9 from ActiveState. I'm reluctant to have two perl versions installed, it's not very elegant at least, and even in twisting the path when using the gtk2 in a script, I prefer to keep the binaries I have found for ActiveState. The questions will come again when I upgrade and possibly move to another perl distribution. Francois At this point I have to ask why you're not using Camelbox. All this work is done for you already, you just have to run the installer and let it do it's magick. It looks like the only downside to running Camelbox for you would be the fact that you have different versions of Perl and GTK installed and listed in your %PATH environment variable, and you would need to clean up your %PATH (remove any GTK and Perl paths not related to Camelbox) prior to trying to use Camelbox. This could be done quite easily by using a DOS batch file, and you would not need to make any systemwide changes. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Glib 1.223 on win xp
Thanks As far as I remember, I got the dll from a compiled module Now I have copied the dll in the folder blib\arch\auto\Glib But still has the same error Running Mkbootstrap for Glib () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Glib.bs [ LD blib\arch\auto\Glib\Glib.dll ] C:\Perl\site\lib\auto\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin \ld.exe: cannot open output file ut:blib\arch\auto\Glib\Glib.dll: Invalid argume nt collect2: ld returned 1 exit status dmake.exe: Error code 129, while making 'blib\arch\auto\Glib\Glib.dll' Francois -Original Message- From: Brian Manning [mailto:elspicyj...@gmail.com] Sent: mercredi, 25. mai 2011 07:59 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: Compiling Glib 1.223 on win xp On Tue, May 24, 2011 at 10:54 PM, RAPPAZ Francois francois.rap...@unifr.ch wrote: No, the glib folder has not the dll file. On my pc it's at C:\Perl\site\lib\auto\Glib Have I to copy the dll in the searched folder ? That's a strange place for the Glib library. Did you copy the Glib library .dll file to that folder yourself? In any case, if you want the compile to work, you can either move/copy the .dll file to where the compiler is looking for it, or add the correct path to the Makefile in the proper locations, your choice. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Glib 1.223 on win xp
Thanks the comment. When I run the makefile.PL script, I got a lot of Note (probably harmless): No library found for -lgobject-2.0 Note (probably harmless): No library found for -lgthread-2.0 Note (probably harmless): No library found for -lglib-2.0 Note (probably harmless): No library found for -lintl Note (probably harmless): No library found for -lkernel32 ... That I find strange since I have all these (I believe) in my IC:/Prog/gtk_2.16.6 folder. Following a thread on perlmonks http://www.perlmonks.org/?node_id=671567 I tried to add INC = q[-IC:/Prog/gtk_2.16.6/include/glib-2.0 -IC:/Prog/gtk_2.16.6/lib/glib-2.0/include -I.], LIBS = q[-LC:/Prog/gtk_2.16.6/lib -lgobject-2.0 -lglib-2.0 -lintl -liconv -lgthread-2.0], In the writemakefile call in the middle of the Makefile.pl. Without effect unfortunately. Looking at the MakeMaker.pm I have, I can see that INC is not an argument to the WriteMakeFile. Thanks for any suggestion F. -Original Message- From: Brian Manning [mailto:elspicyj...@gmail.com] Sent: mercredi, 25. mai 2011 09:04 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: Compiling Glib 1.223 on win xp On Tue, May 24, 2011 at 11:58 PM, RAPPAZ Francois francois.rap...@unifr.ch wrote: Now I have copied the dll in the folder blib\arch\auto\Glib But still has the same error Running Mkbootstrap for Glib () C:\Perl\bin\perl.exe -MExtUtils::Command -e chmod -- 644 Glib.bs [ LD blib\arch\auto\Glib\Glib.dll ] C:\Perl\site\lib\auto\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin \ld.exe: cannot open output file ut:blib\arch\auto\Glib\Glib.dll: Invalid argume nt collect2: ld returned 1 exit status dmake.exe: Error code 129, while making 'blib\arch\auto\Glib\Glib.dll' And my answer is still the same; your path above ut:blib\arch\auto\Glib\Glib.dll doesn't look like it's a valid path, and this is what the linker is complaining about; you need to fix the path, and probably figure out how that path got added to your Makefile for Glib in the first place. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: Compiling Glib 1.223 on win xp
No, the glib folder has not the dll file. On my pc it's at C:\Perl\site\lib\auto\Glib Have I to copy the dll in the searched folder ? Thanks Francois -Original Message- From: Brian Manning [mailto:elspicyj...@gmail.com] Sent: mardi, 24. mai 2011 17:30 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: Compiling Glib 1.223 on win xp On Tue, May 24, 2011 at 4:58 AM, RAPPAZ Francois francois.rap...@unifr.ch wrote: When I run dmake, I have the following error: [ LD blib\arch\auto\Glib\Glib.dll ] C:\Perl\site\lib\auto\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin \ld.exe: cannot open output file ut:blib\arch\auto\Glib\Glib.dll: Invalid argume nt collect2: ld returned 1 exit status Is that path to Glib.dll above correct, i.e. does an actual file exist at ut:blib\arch\auto\Glib\Glib.dll? It looks like mingw is complaining because it can't find that file. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: installing Perl Gtk2 on windows xp
Thanks for the comment I tried to install CamelBox and I updated my perl5lib path to include the modules path from CB, but on start, it crashes because it was searching for a perl-5.10.exe (that I had not install) Is there a page explaining how to have ActiveState and CamelBox cohabiting ? François -Original Message- From: Brian Manning [mailto:elspicyj...@gmail.com] Sent: jeudi, 12. mai 2011 16:01 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: installing Perl Gtk2 on windows xp On Thu, May 12, 2011 at 12:24 AM, RAPPAZ Francois francois.rap...@unifr.ch wrote: Running a perl script using Gtk2 gives the following error (perl.exe:2672): libglade-WARNING **: unknown property `orientation' for class ` GtkVBox' How can I solved this ? The Glade XML layout file is either newer or older than the version of libglade that you're using, and one of the XML properties is not understood by the version of libglade installed on your machine. You can pretty much ignore the warning, although your layout may not be exactly what you expected when you set it up in Glade. Since I have perl 5.8.9, I understand that the CamelBox binaries could be problematic ? Why is that? If you manage your PATH environment variable so that when you use ActiveState, the GTK libraries for ActiveState are found, and vice versa for Camelbox, the two can peacefully co-exist on the same machine. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
RE: installing Perl Gtk2 on windows xp
Thanks for the advice. I did this: - removing Gimp, and the Gtk2 run time files. From http://live.gnome.org/GTK2-Perl/FrequentlyAskedQuestions I reinstalled gtk-2.12.9 for win32 Using ppm I can see that the perl modules are installed. Gtk2 version 1.141 Gtk2::Glade XML 1.006 + a lot of modules in the Gtk2::Ex family Running a perl script using Gtk2 gives the following error (perl.exe:2672): libglade-WARNING **: unknown property `orientation' for class ` GtkVBox' How can I solved this ? Since I have perl 5.8.9, I understand that the CamelBox binaries could be problematic ? Downloading Bundle::Gnome2 with ppm and running the install command via CPAN perl -MCPAN -e 'install Bundle::Gnome2' require the binaries of pkg-config, and so on, wich are not installed any more on my PC Thanks for any help François -Original Message- From: Brian Manning [mailto:elspicyj...@gmail.com] Sent: mercredi, 11. mai 2011 18:48 To: RAPPAZ Francois Cc: gtk-perl-list@gnome.org Subject: Re: installing Perl Gtk2 on windows xp On Wed, May 11, 2011 at 5:36 AM, RAPPAZ Francois francois.rap...@unifr.ch wrote: Hi I tried to run a Gtk2 based perl script on window xp with active state perl installed. (perl version is 5.8.9) I use also mingw + dmake to compile from C. I have download Gtk2 from http://sourceforge.net/userapps/mediawiki/alex-sh/index.php?title=Main_Page I have problem with Glib : the Makefile.pl breaks with errors 1) a msgbox saying that a entrypoint in libglib-2.0-0.dll is not found How many copies of the GTK stack (gtk+/glib/pango/cairo) do you have installed on your machine? I would say your perl script is finding the wrong glib library. Note that apps like Pidgin and Gimp for Windows are sometimes bundled with their own GTK stack as well. 2) Can't find package gobject-2.0 I have gobject-2.0.lib in my gtk\lib folder and a gobject-2.0.pc in gtk\lib\pkgconfig. My PKG_CONFIG_PATH is C:\Prog\gtk\bin;C:\Prog\gtk\lib\pkgconfig Can you run the pkgconfig command in the same shell that you set PKG_CONFIG_PATH in and have it return the version for gobject? XP-GTK-BUILDER# pkg-config --modversion gobject-2.0 2.20.0 If you can't run the above command, then your PKG_CONFIG_PATH is not set or is set incorrectly. Thanks, Brian ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
Gtk2 on windows xp: libglade warning
At the end, I follow the setup proposed here http://lostmind.de/gtk2-perl/ and with this modification http://mail.gnome.org/archives/gtk-perl-list/2006-May/msg00054.html I got my application appearing on the screen. But still the error message (perl.exe:3144): libglade-WARNING **: unknown property `orientation' for class ` GtkVBox' Thanks for any help François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list
installing Perl Gtk2 on windows xp
Hi I tried to run a Gtk2 based perl script on window xp with active state perl installed. (perl version is 5.8.9) I use also mingw + dmake to compile from C. I have download Gtk2 from http://sourceforge.net/userapps/mediawiki/alex-sh/index.php?title=Main_Page I have problem with Glib : the Makefile.pl breaks with errors 1) a msgbox saying that a entrypoint in libglib-2.0-0.dll is not found 2) Can't find package gobject-2.0 I have gobject-2.0.lib in my gtk\lib folder and a gobject-2.0.pc in gtk\lib\pkgconfig. My PKG_CONFIG_PATH is C:\Prog\gtk\bin;C:\Prog\gtk\lib\pkgconfig Thanks for any help François ___ gtk-perl-list mailing list gtk-perl-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-perl-list