Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared lib #184

Open
MasterVitronic opened this issue Apr 2, 2021 · 11 comments
Open

Shared lib #184

MasterVitronic opened this issue Apr 2, 2021 · 11 comments

Comments

@MasterVitronic
Copy link

Greetings, great job.
Any recommendations for building cfltk dynamically, currently build libcfltk.a, but would like a libcfltk.so instead
I tried with -DOPTION_BUILD_SHARED_LIBS=ON but it only works for fltk, cfltk stays the same.

@MoAlyousef
Copy link
Owner

Thank you :)

Can you can try the ˋ-DCFLTK_BUILD_SHARED` flag when configuring cmake.

@MasterVitronic
Copy link
Author

Any other recommendations you would like to give me, I have the following problem

cd /tmp/cfltk
root[/tmp/cfltk/bin]# cmake -B bin -S . \
-DCMAKE_BUILD_TYPE=Release \
-DOPTION_USE_SYSTEM_LIBPNG=OFF \
-DOPTION_USE_SYSTEM_LIBJPEG=OFF \
-DOPTION_USE_SYSTEM_ZLIB=OFF \
-DOPTION_USE_GL=OFF \
-DFLTK_BUILD_EXAMPLES=OFF \
-DFLTK_BUILD_TEST=OFF \
-DOPTION_USE_THREADS=ON \
-DOPTION_LARGE_FILE=ON \
-DOPTION_BUILD_HTML_DOCUMENTATION=OFF \
-DOPTION_BUILD_PDF_DOCUMENTATION=OFF \
-DCFLTK_BUILD_SHARED=ON \
-DOPTION_BUILD_SHARED_LIBS=ON
[ 49%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_table.cpp.o
[ 49%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_tree.cpp.o
[ 49%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_surface.cpp.o
[ 49%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_printer.cpp.o
[ 49%] Linking CXX shared library libcfltk.so
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: fltk/lib/libfltk.a(Fl.cxx.o): relocation R_X86_64_PC32 against symbol `_ZN2Fl6focus_E' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/cfltk.dir/build.make:402: libcfltk.so.0.16.0] Error 1
make[2]: Leaving directory '/tmp/cfltk/bin'
make[1]: *** [CMakeFiles/Makefile2:219: CMakeFiles/cfltk.dir/all] Error 2
make[1]: Leaving directory '/tmp/cfltk/bin'
make: *** [Makefile:130: all] Error 2

@MoAlyousef
Copy link
Owner

I have updated the CMakeLists.txt to add

set_target_properties(cfltk PROPERTIES POSITION_INDEPENDENT_CODE ON)

when building a shared library.

Can you try again after pulling the last changes?

@MasterVitronic
Copy link
Author

similar result with the last commit , could you replicate this and see if I am doing something wrong?

cmake -B bin -S . \
-DCMAKE_BUILD_TYPE=Release \
-DOPTION_USE_SYSTEM_LIBPNG=ON \
-DOPTION_USE_SYSTEM_LIBJPEG=ON \
-DOPTION_USE_SYSTEM_ZLIB=ON \
-DOPTION_USE_GL=OFF \
-DFLTK_BUILD_EXAMPLES=OFF \
-DFLTK_BUILD_TEST=OFF \
-DOPTION_USE_THREADS=ON \
-DOPTION_LARGE_FILE=ON \
-DOPTION_BUILD_HTML_DOCUMENTATION=OFF \
-DOPTION_BUILD_PDF_DOCUMENTATION=OFF \
-DCFLTK_BUILD_SHARED=ON \
-DOPTION_BUILD_SHARED_LIBS=ON
make[2]: Leaving directory '/tmp/cfltk/bin'
[ 97%] Built target fluid
[ 97%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_menu.cpp.o
[ 97%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_dialog.cpp.o
[ 97%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_valuator.cpp.o
[ 98%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_browser.cpp.o
[ 98%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_misc.cpp.o
[ 98%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_image.cpp.o
[ 98%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_draw.cpp.o
[ 99%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_table.cpp.o
[ 99%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_tree.cpp.o
[ 99%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_surface.cpp.o
[ 99%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_printer.cpp.o
[100%] Linking CXX shared library libcfltk.so
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lfltk_z
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lfltk_jpeg
/usr/lib/gcc/x86_64-alpine-linux-musl/9.2.0/../../../../x86_64-alpine-linux-musl/bin/ld: cannot find -lfltk_png
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/cfltk.dir/build.make:403: libcfltk.so.0.16.0] Error 1
make[2]: Leaving directory '/tmp/cfltk/bin'
make[1]: *** [CMakeFiles/Makefile2:147: CMakeFiles/cfltk.dir/all] Error 2
make[1]: Leaving directory '/tmp/cfltk/bin'
make: *** [Makefile:130: all] Error 2
root[/tmp/cfltk/bin]# 

@MoAlyousef
Copy link
Owner

Sure will do. But it’ll be when I get back to my dev machine after the weekend.

@MoAlyousef
Copy link
Owner

MoAlyousef commented Apr 3, 2021

I tried it on a VM, can you try the following invocation:

cmake -B bin -S . -DCMAKE_BUILD_TYPE=Release \
-DOPTION_USE_SYSTEM_LIBPNG=ON \
-DOPTION_USE_SYSTEM_LIBJPEG=ON \
-DOPTION_USE_SYSTEM_ZLIB=ON \
-DOPTION_USE_GL=OFF \
-DFLTK_BUILD_EXAMPLES=OFF \
-DFLTK_BUILD_TEST=OFF \
-DOPTION_USE_THREADS=ON \
-DOPTION_LARGE_FILE=ON \
-DOPTION_BUILD_HTML_DOCUMENTATION=OFF \
-DOPTION_BUILD_PDF_DOCUMENTATION=OFF \
-DCFLTK_BUILD_SHARED=ON \
-DCFLTK_LINK_IMAGES=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON

Notice the last 3 cmake flags, also the removal of -DOPTION_BUILD_SHARED_LIBS=ON
This builds libfltk as static but libcfltk as dynamic with all the symbols of libfltk, so libfltk is no longer needed.

@MasterVitronic
Copy link
Author

I compile without problem, but I don't link correctly, I haven't tested it yet, but this is what ldd shows me

vitronic [/tmp/CFLTK/bin]$ ls *.so*
libcfltk.so  libcfltk.so.0.16.0
vitronic [/tmp/CFLTK/bin]$ ldd libcfltk.so.0.16.0
	/lib/ld-musl-x86_64.so.1 (0x7febe8489000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x7febe80ec000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x7febe80d9000)
	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x7febe80d4000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x7febe80cc000)
	libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x7febe80c0000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x7febe80b4000)
	libXft.so.2 => /usr/lib/libXft.so.2 (0x7febe809f000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x7febe8062000)
	libc.musl-x86_64.so.1 => /lib/ld-musl-x86_64.so.1 (0x7febe8489000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x7febe803b000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x7febe7f89000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x7febe7f66000)
	libuuid.so.1 => /lib/libuuid.so.1 (0x7febe7f5d000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x7febe7f58000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x7febe7f50000)
	libbz2.so.1 => /usr/lib/libbz2.so.1 (0x7febe7f41000)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x7febe7f11000)
	libz.so.1 => /lib/libz.so.1 (0x7febe7ef7000)
	libbsd.so.0 => /usr/lib/libbsd.so.0 (0x7febe7ee1000)
Error relocating libcfltk.so.0.16.0: _ZN12Fl_BMP_ImageC1EPKc: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog8textsizeEi: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog4showEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog4loadEPKc: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog8textsizeEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN12Fl_PNG_ImageC1EPKc: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_DialogD1Ev: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN12Fl_PNG_ImageC1EPKcPKhi: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN19Fl_SVG_File_Surface4fileEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog7visibleEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN13Fl_JPEG_ImageC1EPKcPKh: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN12Fl_SVG_ImageC1EPKcS1_: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog6resizeEiiii: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog4hideEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN12Fl_GIF_ImageC1EPKc: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog1xEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN19Fl_SVG_File_SurfaceC1EiiP8_IO_FILEPFiS1_E: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog8positionEii: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN12Fl_BMP_ImageC1EPKcPKh: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN12Fl_PNM_ImageC1EPKc: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN13Fl_JPEG_ImageC1EPKc: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN12Fl_GIF_ImageC1EPKcPKh: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog5valueEPKc: symbol not found
Error relocating libcfltk.so.0.16.0: _Z18fl_register_imagesv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog1hEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog1wEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_DialogC1Ev: symbol not found
Error relocating libcfltk.so.0.16.0: _ZNK14Fl_Help_Dialog5valueEv: symbol not found
Error relocating libcfltk.so.0.16.0: _ZN14Fl_Help_Dialog1yEv: symbol not found

Needless to say I am very grateful for your attention, I will keep trying and I will keep you informed.

@MoAlyousef
Copy link
Owner

Hmm It seems shared libcfltk won't work with system image libs. I'll need to investigate further.

cmake -B bin -S . -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_SYSTEM_LIBPNG=OFF -DOPTION_USE_SYSTEM_LIBJPEG=OFF -DOPTION_USE_SYSTEM_ZLIB=OFF -DOPTION_USE_GL=OFF -DFLTK_BUILD_EXAMPLES=OFF -DFLTK_BUILD_TEST=OFF -DOPTION_USE_THREADS=ON -DOPTION_LARGE_FILE=ON -DOPTION_BUILD_HTML_DOCUMENTATION=OFF -DOPTION_BUILD_PDF_DOCUMENTATION=OFF -DCFLTK_BUILD_SHARED=ON -DCFLTK_LINK_IMAGES=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON

@AlexanderZhirov
Copy link

When building a dynamic library, I get the error of not having a PNG library:

Build log $ cmake -B . -S ../cfltk/ \ -DCMAKE_BUILD_TYPE=Release \ -DOPTION_USE_SYSTEM_LIBJPEG=OFF \ -DOPTION_USE_SYSTEM_ZLIB=OFF \ -DOPTION_USE_GL=OFF \ -DFLTK_BUILD_EXAMPLES=OFF \ -DFLTK_BUILD_TEST=OFF \ -DOPTION_USE_THREADS=ON \ -DOPTION_LARGE_FILE=ON \ -DOPTION_BUILD_HTML_DOCUMENTATION=OFF \ -DOPTION_BUILD_PDF_DOCUMENTATION=OFF \ -DCFLTK_BUILD_SHARED=ON

-- The C compiler identification is GNU 12.1.1
-- The CXX compiler identification is GNU 12.1.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of short
-- Check size of short - done
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of long long
-- Check size of long long - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Looking for POSIX compatible scandir
-- POSIX compatible scandir - found
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- Found ZLIB: /usr/lib/libz.so (found version "1.2.11")
-- Found PNG: /usr/lib/libpng.so (found version "1.6.37")
-- Looking for png.h
-- Looking for png.h - found
-- Found X11: /usr/local/include
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so
-- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so - found
-- Looking for gethostbyname
-- Looking for gethostbyname - found
-- Looking for connect
-- Looking for connect - found
-- Looking for remove
-- Looking for remove - found
-- Looking for shmat
-- Looking for shmat - found
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE

-- Configuration Summary for FLTK 1.4.0 generated by CMake 3.23.1 --

-- The following OPTIONAL packages have been found:

  • ZLIB
  • PNG

-- The following OPTIONAL packages have not been found:

  • Doxygen

-- Static libraries will be built in /home/alexander/programming/c/build_cfltk/fltk/lib
-- Shared libraries will not be built (set OPTION_BUILD_SHARED_LIBS=ON to build)
-- Example programs will not be built (set FLTK_BUILD_EXAMPLES=ON to build)
-- Image Libraries: JPEG = Builtin
-- PNG = System
-- ZLIB = Builtin
-- Use Wayland: No
-- Use Pango: No
-- Use Xft: Yes
-- Cairo support: No

-- End of Configuration Summary --

-- Configuring done
-- Generating done
-- Build files have been written to: /home/alexander/programming/c/build_cfltk
~/programming/c/build_cfltk 
$ cmake --build . -- -j4
[ 0%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/adler32.c.o
[ 1%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jmemnobs.c.o
[ 2%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/compress.c.o
[ 3%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl.cxx.o
[ 3%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jaricom.c.o
[ 3%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcomapi.c.o
[ 4%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jutils.c.o
[ 4%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jerror.c.o
[ 4%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/crc32.c.o
[ 4%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jmemmgr.c.o
[ 4%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcapimin.c.o
[ 5%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/deflate.c.o
[ 5%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcapistd.c.o
[ 6%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/gzclose.c.o
[ 6%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcarith.c.o
[ 6%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Adjuster.cxx.o
[ 6%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/gzlib.c.o
[ 6%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Bitmap.cxx.o
[ 6%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jctrans.c.o
[ 7%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcparam.c.o
[ 8%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Browser.cxx.o
[ 8%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdatadst.c.o
[ 8%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcinit.c.o
[ 9%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcmaster.c.o
[ 9%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcmarker.c.o
[ 9%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/gzread.c.o
[ 10%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/gzwrite.c.o
[ 10%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/inflate.c.o
[ 10%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/infback.c.o
[ 10%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcmainct.c.o
[ 11%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcprepct.c.o
[ 11%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Browser_.cxx.o
[ 11%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jccoefct.c.o
[ 12%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/inftrees.c.o
[ 12%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jccolor.c.o
[ 12%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/inffast.c.o
[ 13%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcsample.c.o
[ 13%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/trees.c.o
[ 14%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/uncompr.c.o
[ 14%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Browser_load.cxx.o
[ 14%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jchuff.c.o
[ 15%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Box.cxx.o
[ 15%] Building C object fltk/zlib/CMakeFiles/fltk_z.dir/zutil.c.o
[ 15%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Button.cxx.o
[ 15%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Chart.cxx.o
[ 15%] Linking C static library ../lib/libfltk_z.a
[ 16%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Check_Browser.cxx.o
[ 16%] Built target fltk_z
[ 16%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Check_Button.cxx.o
[ 16%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Choice.cxx.o
[ 17%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Clock.cxx.o
[ 17%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Color_Chooser.cxx.o
[ 17%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Copy_Surface.cxx.o
[ 17%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jcdctmgr.c.o
[ 18%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Counter.cxx.o
[ 19%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jfdctfst.c.o
[ 19%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jfdctflt.c.o
[ 19%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jfdctint.c.o
[ 19%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Device.cxx.o
[ 20%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdapimin.c.o
[ 20%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Dial.cxx.o
[ 20%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdapistd.c.o
[ 20%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Double_Window.cxx.o
[ 20%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdarith.c.o
[ 21%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_File_Browser.cxx.o
[ 21%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_File_Chooser.cxx.o
[ 21%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdtrans.c.o
[ 22%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdatasrc.c.o
[ 22%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdmaster.c.o
[ 22%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_File_Chooser2.cxx.o
[ 23%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_File_Icon.cxx.o
[ 23%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdinput.c.o
[ 23%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_File_Input.cxx.o
[ 23%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Graphics_Driver.cxx.o
[ 24%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Group.cxx.o
[ 24%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Help_View.cxx.o
[ 24%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Image.cxx.o
[ 25%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdmarker.c.o
[ 26%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Image_Surface.cxx.o
[ 26%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdhuff.c.o
[ 26%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Input.cxx.o
[ 26%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdmainct.c.o
[ 27%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdcoefct.c.o
[ 27%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Input_.cxx.o
[ 27%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdpostct.c.o
[ 28%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Input_Choice.cxx.o
[ 28%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jddctmgr.c.o
[ 28%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Light_Button.cxx.o
[ 29%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jidctfst.c.o
[ 29%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jidctflt.c.o
[ 29%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Menu.cxx.o
[ 29%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jidctint.c.o
[ 30%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Menu_.cxx.o
[ 30%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Menu_Bar.cxx.o
[ 30%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Menu_Button.cxx.o
[ 31%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Menu_Window.cxx.o
[ 31%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Menu_add.cxx.o
[ 31%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Menu_global.cxx.o
[ 31%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Message.cxx.o
[ 32%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Multi_Label.cxx.o
[ 32%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Native_File_Chooser.cxx.o
[ 32%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Overlay_Window.cxx.o
[ 33%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Pack.cxx.o
[ 33%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Paged_Device.cxx.o
[ 33%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Pixmap.cxx.o
[ 34%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Positioner.cxx.o
[ 34%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Preferences.cxx.o
[ 34%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Printer.cxx.o
[ 35%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Progress.cxx.o
[ 35%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Repeat_Button.cxx.o
[ 36%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdsample.c.o
[ 36%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Return_Button.cxx.o
[ 37%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Roller.cxx.o
[ 37%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdcolor.c.o
[ 37%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jquant1.c.o
[ 37%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Round_Button.cxx.o
[ 38%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jquant2.c.o
[ 38%] Building C object fltk/jpeg/CMakeFiles/fltk_jpeg.dir/jdmerge.c.o
[ 38%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Screen_Driver.cxx.o
[ 39%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Scroll.cxx.o
[ 39%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Scrollbar.cxx.o
[ 39%] Linking C static library ../lib/libfltk_jpeg.a
[ 39%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Shared_Image.cxx.o
[ 39%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Simple_Terminal.cxx.o
[ 40%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Single_Window.cxx.o
[ 40%] Built target fltk_jpeg
[ 40%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Slider.cxx.o
[ 40%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Spinner.cxx.o
[ 41%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_String.cxx.o
[ 41%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Sys_Menu_Bar.cxx.o
[ 41%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_System_Driver.cxx.o
[ 42%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Table.cxx.o
[ 42%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Table_Row.cxx.o
[ 42%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tabs.cxx.o
[ 43%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Text_Buffer.cxx.o
[ 43%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Text_Display.cxx.o
[ 43%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Text_Editor.cxx.o
/home/alexander/programming/c/cfltk/fltk/src/Fl_Text_Display.cxx: В конструкторе «Fl_Text_Display::Fl_Text_Display(int, int, int, int, const char*)»:
/home/alexander/programming/c/cfltk/fltk/src/Fl_Text_Display.cxx:122:57: предупреждение: «void* __builtin_memset(void*, int, long unsigned int)» writing between 4 and 8589934584 bytes into a region of size 0 overflows the destination [-Wstringop-overflow=]
122 | for (int i=1; i<mNVisibleLines; i++) mLineStarts[i] = -1;
| ~~~~~~~~~~~~~~~^~~~
/home/alexander/programming/c/cfltk/fltk/src/Fl_Text_Display.cxx:120:39: замечание: at offset 4 into destination object of size 4 allocated by «operator new []»
120 | mLineStarts = new int[mNVisibleLines];
| ^
[ 44%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tile.cxx.o
[ 44%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tiled_Image.cxx.o
[ 44%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Timeout.cxx.o
[ 45%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tooltip.cxx.o
[ 45%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tree.cxx.o
[ 45%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tree_Item_Array.cxx.o
[ 46%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tree_Item.cxx.o
[ 46%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Tree_Prefs.cxx.o
[ 46%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Valuator.cxx.o
[ 46%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Value_Input.cxx.o
[ 47%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Value_Output.cxx.o
[ 47%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Value_Slider.cxx.o
[ 47%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Widget.cxx.o
[ 48%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Widget_Surface.cxx.o
[ 48%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Window.cxx.o
[ 48%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Window_Driver.cxx.o
[ 49%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Window_fullscreen.cxx.o
[ 49%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Window_hotspot.cxx.o
[ 49%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Window_iconize.cxx.o
[ 50%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Wizard.cxx.o
[ 50%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_XBM_Image.cxx.o
[ 50%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_XPM_Image.cxx.o
[ 51%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_abort.cxx.o
[ 51%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_add_idle.cxx.o
[ 51%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_arg.cxx.o
[ 52%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_compose.cxx.o
[ 52%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_display.cxx.o
[ 52%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_get_system_colors.cxx.o
[ 53%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_grab.cxx.o
[ 53%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_lock.cxx.o
[ 53%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_own_colormap.cxx.o
[ 53%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_visual.cxx.o
[ 54%] Building CXX object fltk/src/CMakeFiles/fltk.dir/filename_absolute.cxx.o
[ 54%] Building CXX object fltk/src/CMakeFiles/fltk.dir/filename_expand.cxx.o
[ 54%] Building CXX object fltk/src/CMakeFiles/fltk.dir/filename_ext.cxx.o
[ 55%] Building CXX object fltk/src/CMakeFiles/fltk.dir/filename_isdir.cxx.o
[ 55%] Building CXX object fltk/src/CMakeFiles/fltk.dir/filename_list.cxx.o
[ 55%] Building CXX object fltk/src/CMakeFiles/fltk.dir/filename_match.cxx.o
[ 56%] Building CXX object fltk/src/CMakeFiles/fltk.dir/filename_setext.cxx.o
[ 56%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_arc.cxx.o
[ 56%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_ask.cxx.o
[ 57%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_boxtype.cxx.o
[ 57%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_color.cxx.o
[ 57%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_cursor.cxx.o
[ 58%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_curve.cxx.o
[ 58%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_diamond_box.cxx.o
[ 58%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_draw.cxx.o
[ 59%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_draw_pixmap.cxx.o
[ 59%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_encoding_latin1.cxx.o
[ 59%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_encoding_mac_roman.cxx.o
[ 59%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_engraved_label.cxx.o
[ 60%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_file_dir.cxx.o
[ 60%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_font.cxx.o
[ 60%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_gleam.cxx.o
[ 61%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_gtk.cxx.o
[ 61%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_labeltype.cxx.o
[ 61%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_open_uri.cxx.o
[ 62%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_oval_box.cxx.o
[ 62%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_overlay.cxx.o
[ 62%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_plastic.cxx.o
[ 63%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_read_image.cxx.o
[ 63%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_rect.cxx.o
[ 63%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_round_box.cxx.o
[ 64%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_rounded_box.cxx.o
[ 64%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_set_font.cxx.o
[ 64%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_scroll_area.cxx.o
[ 65%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_shadow_box.cxx.o
[ 65%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_shortcut.cxx.o
[ 65%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_show_colormap.cxx.o
[ 66%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_string_functions.cxx.o
[ 66%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_symbols.cxx.o
[ 66%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_utf8.cxx.o
[ 66%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_vertex.cxx.o
[ 67%] Building CXX object fltk/src/CMakeFiles/fltk.dir/print_button.cxx.o
[ 67%] Building CXX object fltk/src/CMakeFiles/fltk.dir/screen_xywh.cxx.o
[ 67%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Posix/Fl_Posix_Printer_Driver.cxx.o
[ 68%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/X11/Fl_X11_Screen_Driver.cxx.o
[ 68%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/X11/Fl_X11_Window_Driver.cxx.o
[ 68%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Posix/Fl_Posix_System_Driver.cxx.o
[ 69%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Unix/Fl_Unix_System_Driver.cxx.o
[ 69%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/X11/Fl_X11_System_Driver.cxx.o
[ 69%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx.o
[ 70%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx.o
[ 70%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx.o
[ 70%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx.o
[ 71%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx.o
[ 71%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx.o
[ 71%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx.o
[ 72%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx.o
[ 72%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx.o
[ 72%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/X11/fl_X11_platform_init.cxx.o
[ 73%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_x.cxx.o
[ 73%] Building CXX object fltk/src/CMakeFiles/fltk.dir/fl_dnd_x.cxx.o
[ 73%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Native_File_Chooser_FLTK.cxx.o
[ 73%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Native_File_Chooser_GTK.cxx.o
[ 74%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_get_key.cxx.o
[ 74%] Building CXX object fltk/src/CMakeFiles/fltk.dir/Fl_Native_File_Chooser_Kdialog.cxx.o
[ 74%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/Xlib/Fl_Xlib_Graphics_Driver_font_xft.cxx.o
[ 75%] Building C object fltk/src/CMakeFiles/fltk.dir/flstring.c.o
[ 75%] Building C object fltk/src/CMakeFiles/fltk.dir/numericsort.c.o
[ 75%] Building C object fltk/src/CMakeFiles/fltk.dir/vsnprintf.c.o
[ 76%] Building C object fltk/src/CMakeFiles/fltk.dir/xutf8/is_right2left.c.o
[ 76%] Building C object fltk/src/CMakeFiles/fltk.dir/xutf8/is_spacing.c.o
[ 76%] Building C object fltk/src/CMakeFiles/fltk.dir/xutf8/case.c.o
[ 77%] Building C object fltk/src/CMakeFiles/fltk.dir/xutf8/keysym2Ucs.c.o
[ 77%] Building C object fltk/src/CMakeFiles/fltk.dir/scandir_posix.c.o
[ 77%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/PostScript/Fl_PostScript.cxx.o
[ 78%] Building CXX object fltk/src/CMakeFiles/fltk.dir/drivers/PostScript/Fl_PostScript_image.cxx.o
[ 78%] Linking CXX static library ../lib/libfltk.a
[ 78%] Built target fltk
[ 79%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/fl_write_png.cxx.o
[ 79%] Building CXX object fltk/src/CMakeFiles/fltk_forms.dir/forms_compatibility.cxx.o
[ 79%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/fl_images_core.cxx.o
[ 80%] Building CXX object fltk/src/CMakeFiles/fltk_forms.dir/forms_bitmap.cxx.o
[ 80%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_BMP_Image.cxx.o
[ 80%] Building CXX object fltk/src/CMakeFiles/fltk_forms.dir/forms_free.cxx.o
[ 80%] Building CXX object fltk/src/CMakeFiles/fltk_forms.dir/forms_fselect.cxx.o
[ 80%] Building CXX object fltk/src/CMakeFiles/fltk_forms.dir/forms_pixmap.cxx.o
[ 81%] Building CXX object fltk/src/CMakeFiles/fltk_forms.dir/forms_timer.cxx.o
[ 81%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_File_Icon2.cxx.o
[ 82%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_GIF_Image.cxx.o
[ 82%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_Help_Dialog.cxx.o
[ 82%] Linking CXX static library ../lib/libfltk_forms.a
[ 82%] Built target fltk_forms
[ 82%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_JPEG_Image.cxx.o
[ 83%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_PNG_Image.cxx.o
[ 83%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_PNM_Image.cxx.o
[ 83%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_Image_Reader.cxx.o
[ 84%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/Fl_SVG_Image.cxx.o
[ 84%] Building CXX object fltk/src/CMakeFiles/fltk_images.dir/drivers/SVG/Fl_SVG_File_Surface.cxx.o
[ 84%] Linking CXX static library ../lib/libfltk_images.a
[ 84%] Built target fltk_images
[ 84%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_new.cpp.o
[ 84%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_lock.cpp.o
[ 84%] Building CXX object CMakeFiles/cfltk.dir/src/cfl.cpp.o
[ 85%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/CodeEditor.cxx.o
[ 86%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_window.cpp.o
[ 86%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_button.cpp.o
[ 86%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/StyleParse.cxx.o
[ 86%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_widget.cpp.o
[ 86%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Fl_Function_Type.cxx.o
[ 87%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_group.cpp.o
[ 88%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Fl_Group_Type.cxx.o
[ 88%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Fl_Menu_Type.cxx.o
[ 88%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_text.cpp.o
[ 88%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_box.cpp.o
[ 89%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_input.cpp.o
[ 89%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Fl_Type.cxx.o
[ 89%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Fl_Widget_Type.cxx.o
[ 90%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Fl_Window_Type.cxx.o
[ 90%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_menu.cpp.o
[ 90%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Fluid_Image.cxx.o
[ 90%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/Shortcut_Button.cxx.o
[ 90%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_dialog.cpp.o
[ 91%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_valuator.cpp.o
[ 91%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_browser.cpp.o
[ 91%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_misc.cpp.o
[ 92%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/about_panel.cxx.o
[ 92%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/align_widget.cxx.o
[ 92%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/alignment_panel.cxx.o
[ 93%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/code.cxx.o
[ 93%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/factory.cxx.o
[ 94%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_image.cpp.o
[ 94%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_draw.cpp.o
[ 94%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_table.cpp.o
[ 94%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/file.cxx.o
[ 95%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_tree.cpp.o
[ 96%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/fluid.cxx.o
[ 96%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_surface.cpp.o
[ 96%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_font.cpp.o
[ 96%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_utils.cpp.o
[ 97%] Building CXX object CMakeFiles/cfltk.dir/FL_FLex/FL_Flex.cpp.o
[ 97%] Building CXX object CMakeFiles/cfltk.dir/src/cfl_printer.cpp.o
[ 97%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/function_panel.cxx.o
[ 97%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/pixmaps.cxx.o
[ 98%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/shell_command.cxx.o
[ 98%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/template_panel.cxx.o
[ 98%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/undo.cxx.o
[ 99%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/widget_browser.cxx.o
[ 99%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/widget_panel.cxx.o
[ 99%] Building CXX object fltk/fluid/CMakeFiles/fluid.dir/ExternalCodeEditor_UNIX.cxx.o
[ 99%] Linking CXX shared library libcfltk.so
[100%] Linking CXX executable ../bin/fluid
/usr/bin/ld: невозможно найти -lfltk_png: Нет такого файла или каталога
collect2: ошибка: выполнение ld завершилось с кодом возврата 1
gmake[2]: *** [CMakeFiles/cfltk.dir/build.make:481: libcfltk.so.1.3.10] Ошибка 1
gmake[1]: *** [CMakeFiles/Makefile2:177: CMakeFiles/cfltk.dir/all] Ошибка 2
gmake[1]: *** Ожидание завершения заданий…
[100%] Built target fluid
gmake: *** [Makefile:136: all] Ошибка 2

@AlexanderZhirov
Copy link

When building a dynamic library, I get the error of not having a PNG library:

I'm sorry, my inattention:

 -- Shared libraries will not be built (set OPTION_BUILD_SHARED_LIBS=ON to build)

@MoAlyousef
Copy link
Owner

If you don't need fltk image support, make sure you have libpng-dev is installed.
Make sure you also use a recent version of cfltk and fltk, since there was an issue reported in FLTK regarding png linking.
Also try with this:

cmake -B bin -S . -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_SYSTEM_LIBPNG=ON -DOPTION_USE_SYSTEM_LIBJPEG=ON -DOPTION_USE_SYSTEM_ZLIB=ON -DOPTION_USE_GL=OFF -DFLTK_BUILD_EXAMPLES=OFF -DFLTK_BUILD_TEST=OFF -DOPTION_USE_THREADS=ON -DOPTION_LARGE_FILE=ON -DOPTION_BUILD_HTML_DOCUMENTATION=OFF -DOPTION_BUILD_PDF_DOCUMENTATION=OFF -DCFLTK_BUILD_SHARED=ON -DCFLTK_LINK_IMAGES=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON

To get built-in image support:

cmake -B bin -S . -DCMAKE_BUILD_TYPE=Release -DOPTION_USE_SYSTEM_LIBPNG=OFF -DOPTION_USE_SYSTEM_LIBJPEG=OFF -DOPTION_USE_SYSTEM_ZLIB=OFF -DOPTION_USE_GL=OFF -DFLTK_BUILD_EXAMPLES=OFF -DFLTK_BUILD_TEST=OFF -DOPTION_USE_THREADS=ON -DOPTION_LARGE_FILE=ON -DOPTION_BUILD_HTML_DOCUMENTATION=OFF -DOPTION_BUILD_PDF_DOCUMENTATION=OFF -DCFLTK_BUILD_SHARED=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants