in reply to Re^4: Help with compiling glib
in thread Help with compiling glib

I can't spot the problem there.
I haven't built the Glib module beyond version 1.305 because the later versions reference some symbols that my glib libraries do not define.
For example, with Glib-1.321 I get undefined reference to 'g_variant_lookup_value', but I would expect that your glib libraries would define 'g_value_get_variant' (as mine do).

The snippet of your build that you provided looks quite different to anything that my build outputs.
For me, it's dlltool (not g++) that's being given the task of creating the Glib dll. Is Strawberry doing it differently ? (I know that the Strawberry developer does not like dlltool.)

Which version of the Glib module are you attempting to build ?
Do you get better results with version 1.305 ?
Which version of Strawberry Perl are you using ?
Could you post all of the output you're getting from your attempted build.

Cheers,
Rob

Replies are listed 'Best First'.
Re^6: Help with compiling glib
by frazap (Monk) on Jun 24, 2016 at 09:37 UTC
    Sooooo... I did install strawberry 5.24.0.1 (32 bit) again, download Cairo, Glib, Pango using cpan get ...

    I fetched gtk+-bundle_2.24.10-20120208_win32.zip from

    http://ftp.gnome.org/pub/GNOME/binaries/win32/gtk+/2.24/ That I unzipped in
    c:/prog
    and renamed the top unzipped folder to gtk+
    • I created the environment variable GTK_DIR = 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;%GTK_DIR%\lib\pkgconfig

    Cairo compiled ok with this call to makefile.pl

    perl Makefile.pl INC="-IC:/strawberry/c/include/freetype2 -IC:/prog/gt +k+/include/cairo -IC:/prog/gtk+/include/ -I. -I.\build" LIBS="-LC:/pr +og/gtk+/lib -lcairo" verbose
    Then
    dmake dmake test dmake insall

    passed ok

    In the capn/build/Glib... folder, I called

    perl Makefile.pl INC="-IC:\prog\gtk+\include\glib-2.0 -IC:\prog\Gtk+\l +ib\glib-2.0\include" LIBS="-LC:/prog/gtk+/lib -lgobject-2.0 -lglib-2. +0 -lintl -lgthread-2.0"
    and dmake passed without errors...

    Yesterday when I got undefined ref, I was trying to compile with the gtk+-bundle_2.20.1 version of the libs.

    By the way, the Glib version now installed is

    U:\docs\backup\Gtk+>pkg-config glib-2.0 --modversion 2.28.8

    dmake test gives errors with a.t

    C:\strawberry\cpan\build\Glib-1.321-hjAlkH>dmake test "C:\strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonemp +ty -- Glib .bs blib\arch\auto\Glib\Glib.bs 644 "C:\strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::H +arness" "- e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\ +arch')" t/ *.t t/1.t ...................... ok t/2.t ...................... ok t/3.t ...................... ok t/4.t ...................... ok t/5.t ...................... ok t/6.t ...................... ok t/64bit.t .................. ok t/7.t ...................... ok t/8.t ...................... ok t/9.t ...................... ok t/a.t ...................... 1/30 # Failed test 'default log handler: install undef, prev default' # at t/a.t line 78. # got: undef # expected: 'CODE(0x25dfdbc)' # Looks like you failed 1 test of 30. t/a.t ...................... Dubious, test returned 1 (wstat 256, 0x10 +0) Failed 1/30 subtests t/b.t ...................... ok t/boxed_errors.t ........... ok t/bytes.t .................. skipped: GBytes is new in 2.32 t/c.t ...................... ok t/constants.t .............. ok t/d.t ...................... ok t/e.t ...................... ok t/f.t ...................... ok t/filename.t ............... ok t/g.t ...................... ok t/h.t ...................... ok t/lazy_loader.t ............ ok t/make_helper.t ............ ok t/module_versions.t ........ skipped: Test::ConsistentVersion required + for check ing module versions t/options.t ................ ok t/signal_emission_hooks.t .. ok t/signal_marshal.t ......... ok t/signal_query.t ........... ok t/tied_definedness.t ....... ok t/tied_flags.t ............. ok t/tied_set_property.t ...... ok t/variant.t ................ ok Test Summary Report ------------------- t/a.t (Wstat: 256 Tests: 30 Failed: 1) Failed test: 10 Non-zero exit status: 1 Files=33, Tests=1164, 8 wallclock secs ( 0.17 usr + 0.06 sys = 0.23 + CPU) Result: FAIL Failed 1/33 test programs. 1/1164 subtests failed. dmake: Error code 255, while making 'test_dynamic'
    I installed Glib anyway.

    From the build/pango... folder, I called makefile.pl with

    perl Makefile.pl INC="-IC:\prog\gtk+\include -IC:/prog/gtk+/include/fr +eetype2 -IC:/prog/Gtk+/include/cairo -IC:\prog\Gtk+\include\Pango-1.0 + -IC:\prog\Gtk+\include\glib-2.0 -IC:\prog\Gtk+\lib\glib-2.0\include +-I. -I./build -IC:\strawberry\perl\site\lib\Glib\Install -IC:\strawbe +rry\perl\site\lib\Cairo\Install" LIBS="-LC:/prog/gtk+/lib -lpango-1.0 + -lglib-2.0 -lintl -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -lpangoc +airo-1.0"
    dmake failed with undefined references
    [ CC xs\PangoMatrix.c ] "C:\strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Pango\", 'DLBASE' => 'Pango', 'DL_FUNCS' + => { Pango=>[] }, 'FUNCLIST' => [q[newSVPangoRectangle], q[SvPangoRe +ctangle], q[gtk2perl_pango_attribute_get_type], q[gtk2perl_pango_attr +ibute_register_custom_type], q[gtk2perl_pango_attr_iterator_get_type] +, q[gtk2perl_pango_layout_iter_get_type], q[gtk2perl_pango_layout_lin +e_get_type], q[gtk2perl_pango_script_iter_get_type]], 'IMPORTS' => { + }, 'DL_VARS' => []);" [ LD blib\arch\auto\Pango\Pango.xs.dll ] xs/Pango.o:Pango.c:(.text+0x345): undefined reference to `gperl_regist +er_fundamental' xs/Pango.o:Pango.c:(.text+0x362): undefined reference to `gperl_regist +er_boxed' ... xs/Pango.o:Pango.c:(.text+0x6fa): undefined reference to `_gperl_call_ +XS' xs/Pango.o:Pango.c:(.text+0x714): undefined reference to `_gperl_call_ +XS' xs/Pango.o:Pango.c:(.text+0x72e): undefined reference to `_gperl_call_ +XS' xs/Pango.o:Pango.c:(.text+0x748): undefined reference to `_gperl_call_ +XS' xs/Pango.o:Pango.c:(.text+0x762): undefined reference to `_gperl_call_ +XS' xs/Pango.o:Pango.c:(.text+0x77c): more undefined references to `_gperl +_call_XS' follow xs/Pango.o:Pango.c:(.text+0x83e): undefined reference to `gperl_handle +_logs_for' xs/PangoAttributes.o:PangoAttributes.c:(.text+0x1f): undefined referen +ce to `gperl_sv_is_defined' ...

    Update: The command that fails, run by dmake is

    gcc -c -IC:\prog\gtk+\include -IC:/prog/gtk+/include/freetype2 -IC:/p +rog/Gtk+/include/cairo -IC:\prog\Gtk+\include\Pango-1.0 -IC:\prog\Gtk ++\include\glib-2.0 -IC:\prog\Gtk+\lib\glib-2.0\include -I. -I./build +-IC:\strawberry\perl\site\lib\Glib\Install -IC:\strawberry\perl\site\ +lib\Cairo\Install -s -O2 -DWIN32 -DPERL_TEXTMODE_SCRIPTS -DPERL_I +MPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms +-bitfields -s -O2 -DVERSION=\"1.227\" -DXS_VERSION=\"1.227\ +" -o xs\PangoMatrix.o "-IC:\STRAWB~3\perl\lib\CORE" xs\PangoMatrix +.c "C:\strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Pango\", 'DLBASE' => 'Pango', 'DL_FUNCS' + => { Pango=>[] }, 'FUNCLIST' => [q[newSVPangoRectangle], q[SvPangoRe +ctangle], q[gtk2perl_pango_attribute_get_type], q[gtk2perl_pango_attr +ibute_register_custom_type], q[gtk2perl_pango_attr_iterator_get_type] +, q[gtk2perl_pango_layout_iter_get_type], q[gtk2perl_pango_layout_lin +e_get_type], q[gtk2perl_pango_script_iter_get_type]], 'IMPORTS' => { + }, 'DL_VARS' => []);" g++ Pango.def -o blib\arch\auto\Pango\Pango.xs.dll -mdll -s -L"C:\STRA +WB~3\perl\lib\CORE" -L"C:\STRAWB~3\c\lib" xs/Pango.o xs/PangoAttribut +es.o xs/PangoContext.o xs/PangoFont.o xs/PangoFontset.o xs/PangoFontM +ap.o xs/PangoLayout.o xs/PangoRenderer.o xs/PangoScript.o xs/PangoTab +s.o xs/PangoTypes.o xs/PangoCairo.o xs/PangoGravity.o xs/PangoMatrix. +o "C:\STRAWB~3\perl\lib\CORE\libperl524.a" "C:\prog\gtk+\lib\libpan +go-1.0.dll.a" "C:\prog\gtk+\lib\libglib-2.0.dll.a" "C:\prog\gtk+\lib\ +libintl.dll.a" "C:\prog\gtk+\lib\libgobject-2.0.dll.a" "C:\prog\gtk+\ +lib\libgthread-2.0.dll.a" "C:\prog\gtk+\lib\libgmodule-2.0.dll.a" "C: +\prog\gtk+\lib\libpangocairo-1.0.dll.a" "C:\STRAWB~3\c\i686-w64-mingw +32\lib\libmoldname.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\libkernel32 +.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\libuser32.a" "C:\STRAWB~3\c\i +686-w64-mingw32\lib\libgdi32.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\l +ibwinspool.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\libcomdlg32.a" "C:\ +STRAWB~3\c\i686-w64-mingw32\lib\libadvapi32.a" "C:\STRAWB~3\c\i686-w6 +4-mingw32\lib\libshell32.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\libol +e32.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\liboleaut32.a" "C:\STRAWB~ +3\c\i686-w64-mingw32\lib\libnetapi32.a" "C:\STRAWB~3\c\i686-w64-mingw +32\lib\libuuid.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\libws2_32.a" "C +:\STRAWB~3\c\i686-w64-mingw32\lib\libmpr.a" "C:\STRAWB~3\c\i686-w64-m +ingw32\lib\libwinmm.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\libversion +.a" "C:\STRAWB~3\c\i686-w64-mingw32\lib\libodbc32.a" "C:\STRAWB~3\c\i +686-w64-mingw32\lib\libodbccp32.a" "C:\STRAWB~3\c\i686-w64-mingw32\li +b\libcomctl32.a" -Wl,--enable-auto-image-base xs/Pango.o:Pango.c:(.text+0x345): undefined reference to `gperl_regist +er_fundamental'
    My pango version is
    C:\strawberry\cpan\build\Pango-1.227-H3fg7_>pkg-config pango --modvers +ion 1.29.4
    But maybe I should start a new thread "Help with compiling Pango ?"

    Best

    François