Собрал систему со следующими флагами:
zlib #1.2.5.1-r2 @ SHARED_MODE=0
libiconv #1.14 @ --disable-nls --disable-shared
expat #2.0.1-r5 @ --disable-shared
pixman #0.24.0 @ --disable-mmx --disable-sse2 --disable-vmx --disable-arm-neon --disable-arm-iwmmxt --disable-gtk --disable-shared
libffi #3.0.10 @ --disable-shared
libxml2 #2.7.8-r3 @ --disable-shared --without-debug --without-python --without-threads
libpng #1.5.7 @ --disable-shared
freetype #2.4.8 @ --disable-shared --disable-bzip2
gettext #0.18.1.1-r3 @ --disable-shared --enable-threads=win32 --without-libexpat-prefix --without-libxml2-prefix
glib #2.3.16 @ --disable-shared --enable-regex --disable-threads --disable-selinux --disable-fam --disable-xattr --disable-dtrace --with-libiconv=gnu --with-pcre=internal
cairo #1.10.2-r1 @ --disable-shared --disable-gtk-doc --disable-test-surfaces --disable-gcov --disable-xlib --disable-xlib-xrender --disable-xcb --disable-quartz --disable-quartz-font --disable-quartz-image --disable-os2 --disable-beos --disable-glitz --disable-directfb --disable-atomic --enable-win32 --enable-win32-font --enable-png --enable-ft --enable-ps --enable-pdf --enable-svg --disable-pthread
gdk-pixbuf #2.25.0 @ --disable-shared --disable-modules
atk #2.2.0 @ --disable-glibtest --disable-shared --disable-gtk-doc
pango #1.29.4 @ --disable-shared --disable-gtk-doc --without-x --enable-explicit-deps --without-dynamic-modules --with-included-modules
gtk+ #2.24.8-r1 @ --disable-shared --enable-explicit-deps --disable-gdiplus --disable-glibtest --disable-modules --disable-cups --disable-test-print-backend --disable-gtk-doc --disable-man --with-libpng --with-included-loaders --with-included-immodules --without-x
Делаю простейший гткшный сорец
#include <gtk/gtk.h>
int main(int argc, char ** argv) {
g_type_init();
return 0;
}
Собираю
user@note /tmp/lol/gtk $ compileline="i686-mingw32-gcc abc.c -o abc.exe `PKG_CONFIG_LIBDIR=/usr/i686-mingw32/usr/lib/pkgconfig/ pkg-config --libs --cflags gtk+-2.0` -mwindows"; echo $compileline; $compileline
i686-mingw32-gcc abc.c -o abc.exe -mms-bitfields -I/usr/i686-mingw32/usr/include/gtk-2.0 -I/usr/i686-mingw32/usr/lib/gtk-2.0/include -I/usr/i686-mingw32/usr/include/atk-1.0 -I/usr/i686-mingw32/usr/include/cairo -I/usr/i686-mingw32/usr/include/gdk-pixbuf-2.0 -I/usr/i686-mingw32/usr/include/pango-1.0 -I/usr/i686-mingw32/usr/include/glib-2.0 -I/usr/i686-mingw32/usr/lib/glib-2.0/include -I/usr/i686-mingw32/usr/include/pixman-1 -I/usr/i686-mingw32/usr/include/freetype2 -I/usr/i686-mingw32/usr/include -I/usr/i686-mingw32/usr/include/libpng15 -Wl,-luuid -L/usr/i686-mingw32/usr/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -limm32 -lshell32 -luuid -latk-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lusp10 -lpango-1.0 -lm -lcairo -lgdi32 -lmsimg32 -lpixman-1 -lfreetype -lpng15 -lz -lgio-2.0 -ldnsapi -lshlwapi -lgobject-2.0 -lffi -lgmodule-2.0 -lglib-2.0 -lintl -liconv -lws2_32 -lole32 -lwinmm -mwindows
Пытаюсь запустить, получаю сегфолт:
user@note /tmp/lol/gtk $ wine abc.exe
err:menubuilder:init_xdg error looking up the desktop directory
wine: Unhandled page fault on read access to 0x00000000 at address (nil) (thread 0009), starting debugger...
Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x00000000).
Register dump:
CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b
EIP:00000000 ESP:007bfd6c EBP:007bfe28 EFLAGS:00010202( R- -- I - - - )
EAX:005ac434 EBX:7b884ff4 ECX:00000001 EDX:00000000
ESI:7ffdf000 EDI:004012b0
Stack dump:
0x007bfd6c: 004222fa 005ac434 4d430003 00000000
0x007bfd7c: 7b884ff4 001263bc 00000138 007bfda8
0x007bfd8c: 00406358 005ac434 00000000 00123760
0x007bfd9c: 00000000 00000000 00000000 007bfdc8
0x007bfdac: 7b836222 00110000 00000000 00123760
0x007bfdbc: 007bfe08 7ef1aff4 7ef1aff4 007bfe08
Backtrace:
=>0 0x00000000 (0x007bfe28)
1 0x004010bb in abc (+0x10ba) (0x007bfe70)
2 0x004012c8 in abc (+0x12c7) (0x007bfe90)
3 0x7b8562bc call_process_entry+0xb() in kernel32 (0x007bfea8)
4 0x7b856eff ExitProcess+0xc3e() in kernel32 (0x007bfee8)
5 0x7bc733f0 call_thread_func+0xb() in ntdll (0x007bfef8)
6 0x7bc75ef0 call_thread_entry_point+0x6f() in ntdll (0x007bffc8)
7 0x7bc4ceca call_dll_entry_point+0x629() in ntdll (0x007bffe8)
0x00000000: -- no code accessible --
Modules:
Module Address Debug info Name (59 modules)
PE 400000- 5b2000 COFF abc
ELF 7b800000-7b97e000 Export kernel32<elf>
\-PE 7b810000-7b97e000 \ kernel32
ELF 7bc00000-7bcbc000 Export ntdll<elf>
\-PE 7bc10000-7bcbc000 \ ntdll
ELF 7bf00000-7bf04000 Deferred <wine-loader>
ELF 7e467000-7e49b000 Deferred uxtheme<elf>
\-PE 7e470000-7e49b000 \ uxtheme
ELF 7e49b000-7e4a1000 Deferred libxfixes.so.3
ELF 7e4a1000-7e4ac000 Deferred libxcursor.so.1
ELF 7e4ac000-7e4b5000 Deferred libxrandr.so.2
ELF 7e4b5000-7e4bf000 Deferred libxrender.so.1
ELF 7e4bf000-7e4c5000 Deferred libxxf86vm.so.1
ELF 7e4c5000-7e4c9000 Deferred libxinerama.so.1
ELF 7e4c9000-7e4eb000 Deferred imm32<elf>
\-PE 7e4d0000-7e4eb000 \ imm32
ELF 7e4eb000-7e4f1000 Deferred libxdmcp.so.6
ELF 7e4f1000-7e4f5000 Deferred libxau.so.6
ELF 7e4f5000-7e510000 Deferred libxcb.so.1
ELF 7e510000-7e515000 Deferred libuuid.so.1
ELF 7e515000-7e52e000 Deferred libice.so.6
ELF 7e52e000-7e64e000 Deferred libx11.so.6
ELF 7e64e000-7e65f000 Deferred libxext.so.6
ELF 7e65f000-7e668000 Deferred libsm.so.6
ELF 7e668000-7e709000 Deferred winex11<elf>
\-PE 7e680000-7e709000 \ winex11
ELF 7e709000-7e71a000 Deferred libbz2.so.1
ELF 7e71a000-7e72f000 Deferred libz.so.1
ELF 7e72f000-7e7ba000 Deferred libfreetype.so.6
ELF 7e7ba000-7e850000 Deferred winmm<elf>
\-PE 7e7c0000-7e850000 \ winmm
ELF 7e850000-7e93e000 Deferred comctl32<elf>
\-PE 7e860000-7e93e000 \ comctl32
ELF 7e93e000-7e9a1000 Deferred shlwapi<elf>
\-PE 7e950000-7e9a1000 \ shlwapi
ELF 7e9a1000-7eb7c000 Deferred shell32<elf>
\-PE 7e9b0000-7eb7c000 \ shell32
ELF 7eb7c000-7ebf2000 Deferred rpcrt4<elf>
\-PE 7eb90000-7ebf2000 \ rpcrt4
ELF 7ebf2000-7ec7f000 Deferred gdi32<elf>
\-PE 7ec00000-7ec7f000 \ gdi32
ELF 7ec7f000-7edb2000 Deferred user32<elf>
\-PE 7ec90000-7edb2000 \ user32
ELF 7edb2000-7eeb3000 Deferred ole32<elf>
\-PE 7edd0000-7eeb3000 \ ole32
ELF 7eeb3000-7ef37000 Deferred msvcrt<elf>
\-PE 7eed0000-7ef37000 \ msvcrt
ELF 7ef37000-7ef93000 Deferred advapi32<elf>
\-PE 7ef40000-7ef93000 \ advapi32
ELF 7ef93000-7ef9f000 Deferred libnss_files.so.2
ELF 7ef9f000-7efaa000 Deferred libnss_nis.so.2
ELF 7efaa000-7efc1000 Deferred libnsl.so.1
ELF 7efc1000-7efe7000 Deferred libm.so.6
ELF b75a3000-b75a7000 Deferred libdl.so.2
ELF b75a7000-b7705000 Deferred libc.so.6
ELF b7705000-b771f000 Deferred libpthread.so.0
ELF b7730000-b7738000 Deferred libnss_compat.so.2
ELF b7738000-b7879000 Export libwine.so.1
ELF b787a000-b7898000 Deferred ld-linux.so.2
Threads:
process tid prio (all id:s are in hex)
00000008 (D) Z:\tmp\lol\gtk\abc.exe
00000009 0 <==
0000000e services.exe
00000015 0
00000014 0
00000010 0
0000000f 0
00000011 winedevice.exe
00000016 0
00000013 0
00000012 0
00000019 explorer.exe
0000001a 0
Backtrace:
=>0 0x00000000 (0x007bfe28)
1 0x004010bb in abc (+0x10ba) (0x007bfe70)
2 0x004012c8 in abc (+0x12c7) (0x007bfe90)
3 0x7b8562bc call_process_entry+0xb() in kernel32 (0x007bfea8)
4 0x7b856eff ExitProcess+0xc3e() in kernel32 (0x007bfee8)
5 0x7bc733f0 call_thread_func+0xb() in ntdll (0x007bfef8)
6 0x7bc75ef0 call_thread_entry_point+0x6f() in ntdll (0x007bffc8)
7 0x7bc4ceca call_dll_entry_point+0x629() in ntdll (0x007bffe8)
В каком пакете (пакетах) посоветуете искать ошибку?