RE: Compiling Glib 2.16.5 on strawberry perl



Thanks for the tip, after editing Glib.exports, I still have errors (undefined reference) when running dmake:

The last command (not changed by quiet_rule in MakeHelper) is 

"C:\strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \
     -e "Mksymlists('NAME'=>\"Glib\", 'DLBASE' => 'Glib', 'DL_FUNCS' => { Glib=>[] }, 'FUNCLIST' => 
[q[SvGChar], q[SvGKeyFile], q[SvGParamFlags], q[SvGParamSpec], q[SvGSignalFlags], q[SvGInt64], q[SvGUInt64], 
q[_gperl_attach_mg], q[_gperl_call_XS], q[_gperl_find_mg], q[_gperl_remove_mg], q[gperl_alloc_temp], 
q[gperl_argv_free], q[gperl_argv_new], q[gperl_argv_update], q[gperl_boxed_package_from_type], 
q[gperl_boxed_type_from_package], q[gperl_callback_destroy], q[gperl_callback_invoke], q[gperl_callback_new], 
q[gperl_closure_new], q[gperl_closure_new_with_marshaller], q[gperl_convert_back_enum], 
q[gperl_convert_back_enum_pass_unknown], q[gperl_convert_back_flags], q[gperl_convert_enum], 
q[gperl_convert_flag_one], q[gperl_convert_flags], q[gperl_croak_gerror], 
q[gperl_default_boxed_wrapper_class], q[gperl_filename_from_sv], q[gperl_format_variable_for_output], 
q[gperl_fundamental_package_from_type], q[gperl_fundamental_type_from_package], q[gperl_gerror_from_sv], 
q[gperl_get_boxed_check], q[gperl_get_object], q[gperl_get_object_check], q[gperl_handle_logs_for], 
q[gperl_hv_take_sv], q[gperl_install_exception_handler], q[gperl_new_boxed], q[gperl_new_boxed_copy], 
q[gperl_new_object], q[gperl_object_check_type], q[gperl_object_package_from_type], 
q[gperl_object_set_no_warn_unreg_subclass], q[gperl_object_stash_from_type], 
q[gperl_object_type_from_package], q[gperl_option_context_get_type], q[gperl_option_group_get_type], 
q[gperl_package_from_type], q[gperl_param_spec_package_from_type], q[gperl_param_spec_type_from_package], 
q[gperl_prepend_isa], q[gperl_register_boxed], q[gperl_register_boxed_alias], 
q[gperl_register_boxed_synonym], q[gperl_register_error_domain], q[gperl_register_fundamental], 
q[gperl_register_fundamental_alias], q[gperl_register_object], q[gperl_register_object_alias], 
q[gperl_register_param_spec], q[gperl_register_sink_func], q[gperl_remove_exception_handler], 
q[gperl_run_exception_handlers], q[gperl_set_isa], q[gperl_signal_connect], 
q[gperl_signal_set_marshaller_for], q[gperl_str_eq], q[gperl_str_hash], q[gperl_sv_copy], 
q[gperl_sv_is_defined], q[gperl_sv_free], q[gperl_sv_from_filename], q[gperl_sv_from_gerror], 
q[gperl_sv_from_value], q[gperl_sv_get_type], q[gperl_try_convert_enum], q[gperl_try_convert_flag], 
q[gperl_type_class], q[gperl_type_from_package], q[gperl_value_from_sv], q[newSVGChar], q[newSVGParamFlags], 
q[newSVGParamSpec], q[newSVGSignalFlags], q[newSVGSignalInvocationHint], q[newSVGSignalQuery], 
q[newSVGInt64], q[newSVGUInt64]], 'IMPORTS' => {  }, 'DL_VARS' => []);"
g++ Glib.def -o blib\arch\auto\Glib\Glib.xs.dll -mdll -s -L"C:\STRAWB~3\perl\lib\CORE" -L"C:\STRAWB~3\c\lib" 
Glib.o GError.o GUtils.o GLog.o GType.o GBoxed.o GObject.o GValue.o GClosure.o GSignal.o GMainLoop.o 
GIOChannel.o GParamSpec.o GKeyFile.o GOption.o GBookmarkFile.o gperl-gtypes.o   
"C:\STRAWB~3\perl\lib\CORE\libperl524.a" "C:\prog\gtk+\lib\libglib-2.0.a" "C:\prog\gtk+\lib\libintl.dll.a" 
"C:\STRAWB~3\c\i686-w64-mingw32\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\i686-w64-mingw32\lib\libgdi32.a" 
"C:\STRAWB~3\c\i686-w64-mingw32\lib\libwinspool.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-w64-mingw32\lib\libshell32.a" 
"C:\STRAWB~3\c\i686-w64-mingw32\lib\libole32.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-mingw32\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-mingw32\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\i686-w64-mingw32\lib\libodbccp32.a" 
"C:\STRAWB~3\c\i686-w64-mingw32\lib\libcomctl32.a" -Wl,--enable-auto-image-base
Glib.o:Glib.c:(.text+0x1472): undefined reference to `g_type_init'
Glib.o:Glib.c:(.text+0x162a): undefined reference to `g_thread_init'
GType.o:GType.c:(.text+0x288): undefined reference to `g_type_class_peek_parent'
GType.o:GType.c:(.text+0x2ab): undefined reference to `g_type_class_peek_parent'
GType.o:GType.c:(.text+0x1176): undefined reference to `g_param_spec_get_name'
....

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 "

Thanks

François

-----Original Message-----
From: "Torsten Schönfeld" [mailto:torsten schoenfeld gmx de]
Sent: mardi, 28. juin 2016 17:20
To: RAPPAZ Francois
Cc: gtk-perl-list gnome org
Subject: Re: Compiling Glib 2.16.5 on strawberry perl

"RAPPAZ Francois" <francois rappaz unifr ch>:
 "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 ...

That looks like a bug indeed.  It seems that the bundle you use
includes an old glib version (older than 2.24.0) without support for
variants.  Unfortunately, the exports table (which is only used on
Windows) in the Perl bindings blindly assumes that there is support for
variants.  I'll try to fix this soon.  Workaround in the meantime:
remove all six lines that contain "Variant" in the file "Glib.exports"
in the top-level source directory of the Perl bindings.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]