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

Cannot link if built with OPTION_PRINT_SUPPORT=OFF #734

Closed
darealshinji opened this issue Jun 8, 2023 · 5 comments
Closed

Cannot link if built with OPTION_PRINT_SUPPORT=OFF #734

darealshinji opened this issue Jun 8, 2023 · 5 comments
Assignees
Labels
bug Something isn't working fixed The issue or PR was fixed. Platform: Wayland platform specific (Unix/Wayland) Platform: X11 platform specific (Unix/X11)) Prio 2 - Low documentation error or undocumented side-effect

Comments

@darealshinji
Copy link
Contributor

Describe the bug
I'm getting linking errors when I had build libfltk with "cmake -DOPTION_PRINT_SUPPORT=OFF":

/usr/bin/ld: /home/[...]/usr/lib/libfltk.a(Fl_Printer.cxx.o):(.data.rel.ro._ZTV25Fl_PostScript_File_Device[_ZTV25Fl_PostScript_File_Device]+0x10): undefined reference to `Fl_PostScript_File_Device::end_current()'
/usr/bin/ld: /home/[...]/usr/lib/libfltk.a(Fl_Printer.cxx.o):(.data.rel.ro._ZTV25Fl_PostScript_File_Device[_ZTV25Fl_PostScript_File_Device]+0x18): undefined reference to `Fl_PostScript_File_Device::set_current()'
collect2: error: ld returned 1 exit status

To Reproduce
I need to build fluid first since it requires print support and OpenGL.
After that I can build FLTK with most features disabled.

Expected behavior
Make it possible to build with "-DOPTION_PRINT_SUPPORT=OFF", since that is an option in cmake.

Screenshots
-

FLTK Version
1.4 master branch commit 7d7edcf

FLTK Configure / Build Options

 CMAKE_BUILD_TYPE                 Release
 CMAKE_INSTALL_PREFIX             /home/[...]/usr
 FLTK_BUILD_EXAMPLES              OFF
 FLTK_BUILD_FLTK_OPTIONS          OFF
 FLTK_BUILD_FLUID                 OFF
 FLTK_BUILD_TEST                  OFF
FLUID_PATH                       /home/[...]/fluid
OPTION_ARCHFLAGS                 -O3
OPTION_BUILD_SHARED_LIBS         OFF
OPTION_CAIRO                     OFF
 OPTION_CAIROEXT                  OFF
 OPTION_CREATE_LINKS              OFF
 OPTION_FILESYSTEM_SUPPORT        OFF
 OPTION_LARGE_FILE                OFF
 OPTION_OPTIM                     -O3
 OPTION_PRINT_SUPPORT             OFF
 OPTION_USE_CAIRO                 OFF
 OPTION_USE_GL                    OFF
 OPTION_USE_KDIALOG               OFF
 OPTION_USE_PANGO                 OFF
 OPTION_USE_SVG                   OFF
 OPTION_USE_SYSTEM_LIBJPEG        ON
 OPTION_USE_SYSTEM_LIBPNG         ON
 OPTION_USE_SYSTEM_ZLIB           ON
 OPTION_USE_THREADS               ON
 OPTION_USE_XFT                   ON
 OPTION_USE_XRENDER               ON

Operating System / Platform:
Linux: Ubuntu 23.04

Linux/Unix Runtime, if applicable:

  • X11

Additional context
-

@Albrecht-S Albrecht-S added bug Something isn't working Platform: X11 platform specific (Unix/X11)) Platform: Wayland platform specific (Unix/Wayland) Prio 2 - Low documentation error or undocumented side-effect labels Jun 12, 2023
@Albrecht-S
Copy link
Member

Confirmed: no matter whether I build with or without Wayland (note: Wayland-only not tested), the build fails when linking fluid, fltk-options, or any other test program. Example CMake and configure commands:

cmake -DOPTION_PRINT_SUPPORT=OFF ..
./configure --disable-print

Both fail with the same error message as reported by @darealshinji

@ManoloFLTK: can you please take a look? I'm not really familiar with this printing stuff and what to remove/disable (and what to keep) when print support is switched off. TIA.

@ManoloFLTK ManoloFLTK self-assigned this Jun 12, 2023
@ManoloFLTK ManoloFLTK added the fixed The issue or PR was fixed. label Jun 12, 2023
@ManoloFLTK
Copy link
Contributor

That should be fixed with the commit mentioned above. @darealshinji : Please, close issue if you confirm.

@darealshinji
Copy link
Contributor Author

darealshinji commented Jun 12, 2023

This works, thanks. Now I see that the same happens with SVG disabled:

/usr/bin/ld: CMakeFiles/fluid-lib.dir/Fluid_Image.cxx.o: in function `Fluid_Image::write_static(Fd_Code_Writer&, int)':
Fluid_Image.cxx:(.text._ZN11Fluid_Image12write_staticER14Fd_Code_Writeri+0x38e): undefined reference to `Fl_SVG_Image::resize(int, int)'
collect2: error: ld returned 1 exit status

Fluid indeed needs Fl_SVG_Image code at line ~220. However I'm closing this as the issue was solved.

@ManoloFLTK
Copy link
Contributor

@darealshinji Commit c606914 should also allow to build with SVG disabled.

@Albrecht-S
Copy link
Member

@ManoloFLTK Great solution(s), I wouldn't have had an idea where to look. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed The issue or PR was fixed. Platform: Wayland platform specific (Unix/Wayland) Platform: X11 platform specific (Unix/X11)) Prio 2 - Low documentation error or undocumented side-effect
Projects
None yet
Development

No branches or pull requests

3 participants