diff options
| -rw-r--r-- | 2026-02-06-make.txt | 484 | ||||
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | bin/fluid | bin | 2577368 -> 3182824 bytes | |||
| -rw-r--r-- | fluid/Fluid.cxx | 2 | ||||
| -rw-r--r-- | lib/libfltk 2.a | bin | 2236848 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk.a | bin | 2236848 -> 3358626 bytes | |||
| -rw-r--r-- | lib/libfltk_forms 2.a | bin | 32888 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk_forms.a | bin | 32888 -> 54748 bytes | |||
| -rw-r--r-- | lib/libfltk_gl 2.a | bin | 212456 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk_gl.a | bin | 212456 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk_images 2.a | bin | 268008 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk_images.a | bin | 268008 -> 371516 bytes | |||
| -rw-r--r-- | lib/libfltk_jpeg 2.a | bin | 305416 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk_jpeg.a | bin | 305416 -> 349772 bytes | |||
| -rw-r--r-- | lib/libfltk_png 2.a | bin | 287384 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk_png.a | bin | 287384 -> 347748 bytes | |||
| -rw-r--r-- | lib/libfltk_z 2.a | bin | 103976 -> 0 bytes | |||
| -rw-r--r-- | lib/libfltk_z.a | bin | 103976 -> 131752 bytes | |||
| -rw-r--r-- | src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx | 12 | ||||
| -rw-r--r-- | src/fl_plastic.cxx | 3 |
20 files changed, 496 insertions, 7 deletions
diff --git a/2026-02-06-make.txt b/2026-02-06-make.txt new file mode 100644 index 000000000..5a9ef28ba --- /dev/null +++ b/2026-02-06-make.txt @@ -0,0 +1,484 @@ + + ▐▛███▜▌ Claude Code v2.1.29 +▝▜█████▛▘ Opus 4.5 · Claude Max + ▘▘ ▝▝ ~/Desktop/fltk/fltk + +❯ make сборка не работает. собери проект + +● Давайте посмотрим на структуру проекта и попробуем собрать его. + +● Searched for 2 patterns, read 1 file (ctrl+o to expand) + +● Попробую запустить make и посмотрю на ошибки. + +● Bash(make 2>&1 | head -100) + ⎿ Package x11 was not found in the pkg-config search path. + Perhaps you should add the directory containing `x11.pc' + to the PKG_CONFIG_PATH environment variable + … +20 lines (ctrl+o to expand) + +● Нет компилятора g++. Проверю, какие компиляторы доступны. + +● Bash(which g++ gcc clang++ clang 2>/dev/null; g++ --version 2>&1 || clang++ + --version 2>&1 || echo "No C++ compiler found") + ⎿ Error: Permission to use Bash has been denied. IMPORTANT: You *may* attempt + to accomplish this action using other tools that might naturally be used to + accomplish this goal, e.g. using head instead of cat. But you *should not* + attempt to work around this denial in malicious ways, e.g. do not use your + ability to run tests to execute non-test actions. You should only try to + work around this restriction in reasonable ways that do not attempt to + bypass the intent behind this denial. If you believe this capability is + essential to complete the user's request, STOP and explain to the user what + you were trying to do and why you need this permission. Let the user decide + how to proceed. + + + + + +● Сборка не работает потому что: + + 1. Нет компилятора g++ - команда make: g++: No such file or directory + 2. Отсутствуют X11 dev-пакеты - pkg-config не находит x11, xext, xft и др. + + Для сборки нужно установить необходимые пакеты. На Ubuntu/Debian выполните: + + sudo apt install g++ libx11-dev libxext-dev libxft-dev libxinerama-dev \ + libxcursor-dev libxfixes-dev libxrender-dev libfreetype6-dev \ + libfontconfig1-dev libcairo2-dev libpango1.0-dev + + Или, если хотите собрать без Cairo/Pango (минимальная сборка), нужно изменить + Makefile, чтобы отключить эти зависимости. + + Хотите, чтобы я: + 1. Помог настроить Makefile для минимальной сборки только с X11 (без + Cairo/Pango)? + 2. Или подождём пока вы установите пакеты? + +❯ минимальная сборка без Cairo и установи зависимости сам мне + +● Bash(sudo apt install -y g++ libx11-dev libxext-dev libxft-dev libxinerama-dev + libxcursor-dev libxfixes-dev libxrender-dev libfreetype6-dev + libfontconfig1-dev) + ⎿ Error: Permission to use Bash has been denied. IMPORTANT: You *may* attempt + to accomplish this action using other tools that might naturally be used to + accomplish this goal, e.g. using head instead of cat. But you *should not* + attempt to work around this denial in malicious ways, e.g. do not use your + ability to run tests to execute non-test actions. You should only try to + work around this restriction in reasonable ways that do not attempt to + bypass the intent behind this denial. If you believe this capability is + essential to complete the user's request, STOP and explain to the user what + you were trying to do and why you need this permission. Let the user decide + how to proceed. + + + + + +● Read 1 file (ctrl+o to expand) + +● Мне не разрешено выполнять команды с sudo. Пожалуйста, выполните эту команду + сами: + + sudo apt install -y g++ libx11-dev libxext-dev libxft-dev libxinerama-dev + libxcursor-dev libxfixes-dev libxrender-dev libfreetype6-dev + libfontconfig1-dev + + После установки скажите, и я настрою Makefile для минимальной сборки без + Cairo/Pango и запущу сборку. + +❯ Setting up libxinerama-dev:amd64 (2:1.1.4-3build1) ... + libxcursor-dev: command not found + libfontconfig1-dev: command not found + rahova@desktop:~/Desktop/fltk/fltk$ + + +● Похоже, команда была разорвана. Доустановите оставшиеся пакеты: + + sudo apt install -y libxcursor-dev libxfixes-dev libxrender-dev + libfreetype6-dev libfontconfig1-dev + +❯ libfreetype6-dev: command not found + + +● Команда снова разорвалась. Установите по одному: + + sudo apt install -y libfreetype6-dev + + sudo apt install -y libfontconfig1-dev + +❯ готово, собирай + +● Read 1 file (ctrl+o to expand) + +● Makefile уже поддерживает режим без Cairo. Нужно запустить make USE_CAIRO=0. + Сначала очищу и соберу. + +● Bash(make clean 2>&1) + ⎿ rm -f src/Fl.o src/Fl_Adjuster.o src/Fl_Bitmap.o src/Fl_Browser.o src/F + l_Browser_.o src/Fl_Browser_load.o src/Fl_Box.o src/Fl_Button.o src/Fl_ + Cairo.o src/Fl_Chart.o src/Fl_Check_Browser.o src/Fl_Check_Button.o src + … +105 lines (ctrl+o to expand) + + + + +● Bash(make USE_CAIRO=0 -j4 2>&1) + ⎿ Error: Exit code 2 + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl.o + src/Fl.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl_Adjuster. + src/Fl_Adjuster.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl_Bitmap.o + src/Fl_Bitmap.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl_Browser.o + src/Fl_Browser.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl_Browser_. + src/Fl_Browser_.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/Fl_Browser_load.o src/Fl_Browser_load.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl_Box.o + src/Fl_Box.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl_Button.o + src/Fl_Button.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/Fl_Cairo.o + src/Fl_Cairo.cxx + + … +41 lines (ctrl+o to see all) + +● Ошибка компиляции - не хватает include. Исправлю. + +● Read 1 file (ctrl+o to expand) + +● Update(src/fl_plastic.cxx) + ⎿ Error: Permission to use Edit has been denied. IMPORTANT: You *may* attempt + to accomplish this action using other tools that might naturally be used to + accomplish this goal, e.g. using head instead of cat. But you *should not* + attempt to work around this denial in malicious ways, e.g. do not use your + ability to run tests to execute non-test actions. You should only try to + work around this restriction in reasonable ways that do not attempt to + bypass the intent behind this denial. If you believe this capability is + essential to complete the user's request, STOP and explain to the user what + you were trying to do and why you need this permission. Let the user decide + how to proceed. + + + + + +● Для исправления ошибки компиляции мне нужно разрешение на редактирование + файлов. В файле src/fl_plastic.cxx строка 34 нужно заменить: + + #include <cassert> + + на: + + #include <assert.h> + #include <stdlib.h> + + Можете дать разрешение на редактирование, или выполните это изменение вручную? + +✻ Baked for 34s + +❯ попробуй + +● Update(src/fl_plastic.cxx) + ⎿ Added 2 lines, removed 1 line + 31 #include <FL/Fl_Scheme.H> + 32 #include <FL/fl_draw.H> + 33 + 34 -#include <cassert> + 34 +#include <assert.h> + 35 +#include <stdlib.h> + 36 + 37 // Globals + 38 + +● Исправлено. Продолжаю сборку. + +● Bash(make USE_CAIRO=0 -j4 2>&1) + ⎿ Error: Exit code 2 + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/fl_plastic.o + src/fl_plastic.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/fl_rect.o + src/fl_rect.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/fl_round_box.o src/fl_round_box.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/fl_rounded_box.o src/fl_rounded_box.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/fl_set_font. + src/fl_set_font.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/fl_scroll_area.o src/fl_scroll_area.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/fl_shadow_box.o src/fl_shadow_box.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/fl_shortcut. + src/fl_shortcut.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/fl_show_colormap.o src/fl_show_colormap.cxx + + … +52 lines (ctrl+o to see all) + +● Ещё ошибки - переменные цикла не объявлены. Исправлю. + +● Read 1 file (ctrl+o to expand) + +● Вижу несколько проблем. Исправлю их по очереди. + +● Update(src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx) + ⎿ Added 1 line, removed 1 line + 542 }} + 543 xi.data = (char *)buffer; + 544 xi.bytes_per_line = linesize*sizeof(STORETYPE); + 545 + int j; + 546 if (buf) { + 547 buf += delta*dx+linedelta*dy; + 547 - int j; + 548 for (j =0; j<h; ) { + 549 STORETYPE *to = buffer; + 550 int k; + +● Update(src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx) + ⎿ Added 2 lines, removed 3 lines + 677 + 678 if (img->d() == 2) { + 679 // Composite grayscale + alpha over RGB... + 680 - int y; + 681 - for (y = H; y > 0; y--, srcptr+=srcskip) + 682 - int x; + 680 + int x, y; + 681 + for (y = H; y > 0; y--, srcptr+=srcskip) { + 682 for (x = W; x > 0; x--) { + 683 srcg = *srcptr++; + 684 srca = *srcptr++; + +● Read 1 file (ctrl+o to expand) + +● Update(src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx) + ⎿ Added 3 lines, removed 1 line + 700 *dstptr++ = (srcg_pm + dstb * dsta) >> 8; + 701 } + 702 } + 703 + } + 704 } else { + 705 // Composite RGBA over RGB... + 705 - for (y = H; y > 0; y--, srcptr+=srcskip) + 706 + int x, y; + 707 + for (y = H; y > 0; y--, srcptr+=srcskip) { + 708 for (x = W; x > 0; x--) { + 709 srcr = *srcptr++; + 710 srcg = *srcptr++; + +● Read 1 file (ctrl+o to expand) + +● Update(src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx) + ⎿ Added 1 line + 727 *dstptr++ = (srcb * srca + dstb * dsta) >> 8; + 728 } + 729 } + 730 + } + 731 } + 732 fl_draw_image(dst, X, Y, W, H, 3, 0); + 733 + +● Продолжаю сборку. + +● Bash(make USE_CAIRO=0 -j4 2>&1) + ⎿ Error: Exit code 2 + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.o + src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.o + src/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/drivers/PostScript/Fl_PostScript.o + src/drivers/PostScript/Fl_PostScript.cxx + g++ -O2 -Wall -fPIC -std=c++11 -DFL_LIBRARY -I. -I./src -I./jpeg -I./png + -I./zlib -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/drivers/PostScript/Fl_PostScript_image.o + src/drivers/PostScript/Fl_PostScript_image.cxx + gcc -O2 -Wall -fPIC -DFL_LIBRARY -I. -I./src -I./jpeg -I./png -I./zlib + -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/flstring.o + src/flstring.c + gcc -O2 -Wall -fPIC -DFL_LIBRARY -I. -I./src -I./jpeg -I./png -I./zlib + -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/numericsort. + src/numericsort.c + gcc -O2 -Wall -fPIC -DFL_LIBRARY -I. -I./src -I./jpeg -I./png -I./zlib + -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o src/vsnprintf.o + src/vsnprintf.c + gcc -O2 -Wall -fPIC -DFL_LIBRARY -I. -I./src -I./jpeg -I./png -I./zlib + -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/scandir_posix.o src/scandir_posix.c + gcc -O2 -Wall -fPIC -DFL_LIBRARY -I. -I./src -I./jpeg -I./png -I./zlib + -I./fluid -I/usr/include/freetype2 -I/usr/include/libpng16 + -DFLTK_USE_CAIRO=0 -DFLTK_HAVE_CAIRO=0 -DUSE_PANGO=0 -c -o + src/xutf8/is_right2left.o src/xutf8/is_right2left.c + … +33 lines (ctrl+o to see all) + +● Отсутствуют заголовки OpenGL. Можно либо установить libgl-dev, либо я могу + изменить Makefile, чтобы не собирать libfltk_gl.a. + + Что предпочитаете? + 1. Установить OpenGL dev пакеты: sudo apt install libgl-dev libglu1-mesa-dev + 2. Собрать без OpenGL + +✻ Brewed for 1m 14s + +❯ без opengl + +● Update(Makefile) + ⎿ Added 1 line, removed 1 line + 550 + 551 all: libs fluid + 552 + 553 -libs: lib/libfltk.a lib/libfltk_images.a lib/libfltk_forms.a l + -ib/libfltk_gl.a \ + 553 +libs: lib/libfltk.a lib/libfltk_images.a lib/libfltk_forms.a \ + 554 lib/libfltk_jpeg.a lib/libfltk_png.a lib/libfltk_z.a + 555 + 556 fluid: bin/fluid + +● Bash(make USE_CAIRO=0 -j4 2>&1) + ⎿ ar rcs lib/libfltk.a src/Fl.o src/Fl_Adjuster.o src/Fl_Bitmap.o src/Fl_ + Browser.o src/Fl_Browser_.o src/Fl_Browser_load.o src/Fl_Box.o src/Fl_B + utton.o src/Fl_Cairo.o src/Fl_Chart.o src/Fl_Check_Browser.o src/Fl_Che + … +607 lines (ctrl+o to expand) + + + + ⎿ (timeout 10m) + +● Read 1 file (ctrl+o to expand) + +● Сборка успешно завершена. Собраны: + + Библиотеки (lib/): + - libfltk.a - 3.4 MB (основная библиотека) + - libfltk_images.a - 372 KB + - libfltk_forms.a - 55 KB + - libfltk_jpeg.a - 350 KB + - libfltk_png.a - 348 KB + - libfltk_z.a - 132 KB + + Исполняемые файлы (bin/): + - fluid - 3.2 MB (GUI редактор интерфейсов) + + Можете проверить работу: + ./bin/fluid + +❯ rahova@desktop:~/Desktop/fltk/fltk$ ./bin/fluid + Segmentation fault (core dumped) + rahova@desktop:~/Desktop/fltk/fltk$ + +● Segfault. Попробую найти причину. + +● Bash(gdb -batch -ex "run" -ex "bt" ./bin/fluid 2>&1 | head -50) + ⎿ This GDB supports auto-downloading debuginfo from the following URLs: + <https://debuginfod.ubuntu.com> + Enable debuginfod for this session? (y or [n]) [answered N; input not f + … +33 lines (ctrl+o to expand) + + +● Краш в cb_layout_choice при инициализации окна настроек. Найду этот код. + +● Searched for 11 patterns, read 2 files (ctrl+o to expand) + +● Нашёл проблему. layout_list инициализируется как 0 (NULL), но + make_settings_window() вызывается до его создания. Нужно создать Layout_List + до вызова make_settings_window(). + +● Update(fluid/Fluid.cxx) + ⎿ Added 1 line + 1057 if (!batch_mode) { + 1058 history.load(); + 1059 g_shell_config = new Fd_Shell_Command_List; + 1060 + layout_list = new Layout_List; + 1061 widget_browser->load_prefs(); + 1062 make_settings_window(); + 1063 } + +● Searched for 1 pattern, read 1 file (ctrl+o to expand) + +● Update(fluid/Fluid.cxx) + ⎿ Added 1 line + 20 #include "proj/mergeback.h" + 21 #include "app/Menu.h" + 22 #include "app/shell_command.h" + 23 +#include "app/Snap_Action.h" + 24 #include "proj/undo.h" + 25 #include "io/Project_Reader.h" + 26 #include "io/Project_Writer.h" + +● Bash(make USE_CAIRO=0 -j4 2>&1 | tail -30) + ⎿ | ~~~~~~~~~~~~~~~~~ + fluid/Fluid.cxx: In member function ‘int Application::write_code_files( + int)’: + … +69 lines (ctrl+o to expand) + + +● Собралось. Проверим: + +● Bash(./bin/fluid & + sleep 2…) + ⎿ 603270 + 603275 + Fluid is running + +● Fluid запустился успешно. Сборка завершена. + + Итог: + - Собран FLTK без Cairo/Pango и OpenGL (минимальная X11 сборка) + - Исправлены ошибки компиляции (stdlib.h, переменные циклов) + - Исправлен segfault (отсутствовала инициализация layout_list) + + Библиотеки в lib/, fluid в bin/fluid. + +✻ Baked for 1m 50s
\ No newline at end of file @@ -550,7 +550,7 @@ ZLIB_OBJS = $(ZLIB_SRCS:.c=.o) all: libs fluid -libs: lib/libfltk.a lib/libfltk_images.a lib/libfltk_forms.a lib/libfltk_gl.a \ +libs: lib/libfltk.a lib/libfltk_images.a lib/libfltk_forms.a \ lib/libfltk_jpeg.a lib/libfltk_png.a lib/libfltk_z.a fluid: bin/fluid Binary files differdiff --git a/fluid/Fluid.cxx b/fluid/Fluid.cxx index d751c1051..3b4d4b741 100644 --- a/fluid/Fluid.cxx +++ b/fluid/Fluid.cxx @@ -20,6 +20,7 @@ #include "proj/mergeback.h" #include "app/Menu.h" #include "app/shell_command.h" +#include "app/Snap_Action.h" #include "proj/undo.h" #include "io/Project_Reader.h" #include "io/Project_Writer.h" @@ -1057,6 +1058,7 @@ void Application::make_main_window() { if (!batch_mode) { history.load(); g_shell_config = new Fd_Shell_Command_List; + layout_list = new Layout_List; widget_browser->load_prefs(); make_settings_window(); } diff --git a/lib/libfltk 2.a b/lib/libfltk 2.a Binary files differdeleted file mode 100644 index b1e7b1bce..000000000 --- a/lib/libfltk 2.a +++ /dev/null diff --git a/lib/libfltk.a b/lib/libfltk.a Binary files differindex 1e7e9f8b8..1fcccd13f 100644 --- a/lib/libfltk.a +++ b/lib/libfltk.a diff --git a/lib/libfltk_forms 2.a b/lib/libfltk_forms 2.a Binary files differdeleted file mode 100644 index 56a57f213..000000000 --- a/lib/libfltk_forms 2.a +++ /dev/null diff --git a/lib/libfltk_forms.a b/lib/libfltk_forms.a Binary files differindex 660b738af..b46bbdbd8 100644 --- a/lib/libfltk_forms.a +++ b/lib/libfltk_forms.a diff --git a/lib/libfltk_gl 2.a b/lib/libfltk_gl 2.a Binary files differdeleted file mode 100644 index 0f94b4c7d..000000000 --- a/lib/libfltk_gl 2.a +++ /dev/null diff --git a/lib/libfltk_gl.a b/lib/libfltk_gl.a Binary files differdeleted file mode 100644 index 2d46f4731..000000000 --- a/lib/libfltk_gl.a +++ /dev/null diff --git a/lib/libfltk_images 2.a b/lib/libfltk_images 2.a Binary files differdeleted file mode 100644 index 1c4f76ad8..000000000 --- a/lib/libfltk_images 2.a +++ /dev/null diff --git a/lib/libfltk_images.a b/lib/libfltk_images.a Binary files differindex e00d83b56..73b25e497 100644 --- a/lib/libfltk_images.a +++ b/lib/libfltk_images.a diff --git a/lib/libfltk_jpeg 2.a b/lib/libfltk_jpeg 2.a Binary files differdeleted file mode 100644 index 78678caa4..000000000 --- a/lib/libfltk_jpeg 2.a +++ /dev/null diff --git a/lib/libfltk_jpeg.a b/lib/libfltk_jpeg.a Binary files differindex b5ee19109..244801ffe 100644 --- a/lib/libfltk_jpeg.a +++ b/lib/libfltk_jpeg.a diff --git a/lib/libfltk_png 2.a b/lib/libfltk_png 2.a Binary files differdeleted file mode 100644 index 0de9c641d..000000000 --- a/lib/libfltk_png 2.a +++ /dev/null diff --git a/lib/libfltk_png.a b/lib/libfltk_png.a Binary files differindex 6ea11356f..a1ed1b07f 100644 --- a/lib/libfltk_png.a +++ b/lib/libfltk_png.a diff --git a/lib/libfltk_z 2.a b/lib/libfltk_z 2.a Binary files differdeleted file mode 100644 index be5dcbf27..000000000 --- a/lib/libfltk_z 2.a +++ /dev/null diff --git a/lib/libfltk_z.a b/lib/libfltk_z.a Binary files differindex 02888659a..a36325682 100644 --- a/lib/libfltk_z.a +++ b/lib/libfltk_z.a diff --git a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx index 6c13f643f..9d54b02c8 100644 --- a/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx +++ b/src/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx @@ -542,9 +542,9 @@ static void innards(const uchar *buf, int X, int Y, int W, int H, }} xi.data = (char *)buffer; xi.bytes_per_line = linesize*sizeof(STORETYPE); + int j; if (buf) { buf += delta*dx+linedelta*dy; - int j; for (j =0; j<h; ) { STORETYPE *to = buffer; int k; @@ -677,9 +677,8 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i if (img->d() == 2) { // Composite grayscale + alpha over RGB... - int y; - for (y = H; y > 0; y--, srcptr+=srcskip) - int x; + int x, y; + for (y = H; y > 0; y--, srcptr+=srcskip) { for (x = W; x > 0; x--) { srcg = *srcptr++; srca = *srcptr++; @@ -701,9 +700,11 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i *dstptr++ = (srcg_pm + dstb * dsta) >> 8; } } + } } else { // Composite RGBA over RGB... - for (y = H; y > 0; y--, srcptr+=srcskip) + int x, y; + for (y = H; y > 0; y--, srcptr+=srcskip) { for (x = W; x > 0; x--) { srcr = *srcptr++; srcg = *srcptr++; @@ -726,6 +727,7 @@ static void alpha_blend(Fl_RGB_Image *img, int X, int Y, int W, int H, int cx, i *dstptr++ = (srcb * srca + dstb * dsta) >> 8; } } + } } fl_draw_image(dst, X, Y, W, H, 3, 0); diff --git a/src/fl_plastic.cxx b/src/fl_plastic.cxx index 5030ac389..9553c8e08 100644 --- a/src/fl_plastic.cxx +++ b/src/fl_plastic.cxx @@ -31,7 +31,8 @@ #include <FL/Fl_Scheme.H> #include <FL/fl_draw.H> -#include <cassert> +#include <assert.h> +#include <stdlib.h> // Globals |
