waddlesplash / xlibe

An Xlib compatibility layer implemented on top of the Haiku API, in order to run X11 applications on Haiku without an X server.
MIT License
91 stars 3 forks source link

missing XQLength ? #14

Closed eblanca closed 1 year ago

eblanca commented 1 year ago

I'm trying to build the latest development snapshot for fltk-1.4 (on X11, not wayland). The process goes ok until the linker complains it can't find XQLength.

Welcome to the Haiku shell.

~> cd svn/fltk-1.4.x-20230505-89a2b1a7/
~/svn/fltk-1.4.x-20230505-89a2b1a7> ls
ANNOUNCEMENT     config.guess      examples            fltk.xpm          Makefile                README.experimental.txt  test
autogen.sh       config.sub        FL                  fluid             makeinclude.in          README.IDE.txt           util
cairo            configh.cmake.in  fl_config.cmake.in  forms.h           misc                    README.macOS.md          zlib
CHANGES_1.0.txt  configh.in        fl_config.in        GL                nanosvg                 README.md
CHANGES_1.1.txt  configure         fltk_version.dat    install-sh        png                     README.txt
CHANGES_1.3.txt  configure.ac      fltk-config.in      jpeg              public                  README.Unix.txt
CHANGES.txt      COPYING           fltk-options        lib               README.abi-version.txt  README.Wayland.txt
CMake            CREDITS.txt       fltk.list.in        libdecor          README.Cairo.txt        README.Windows.txt
CMakeLists.txt   documentation     fltk.spec.in        mac_endianness.h  README.CMake.txt        src
~/svn/fltk-1.4.x-20230505-89a2b1a7> ./configure 
checking build system type... x86_64-unknown-haiku
checking host system type... x86_64-unknown-haiku
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for pkg-config... /bin/pkg-config
checking for a BSD-compatible install... /bin/install -c
checking for nroff... no
checking for groff... no
checking for doxygen... no
checking for ranlib... ranlib
checking for ar... /bin/ar
checking for windres... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking whether byte ordering is bigendian... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/stdtypes.h usability... no
checking sys/stdtypes.h presence... no
checking for sys/stdtypes.h... no
checking whether we have the POSIX compatible scandir() prototype... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for strings.h... (cached) yes
checking for strcasecmp... yes
checking for strlcat... yes
checking for strlcpy... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for localeconv... yes
checking for library containing pow... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for long long int... yes
checking for library containing dlsym... none required
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking alsa/asoundlib.h usability... no
checking alsa/asoundlib.h presence... no
checking for alsa/asoundlib.h... no
checking for jpeg_CreateCompress in -ljpeg... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for gzgets in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_read_info in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking libpng/png.h usability... no
checking libpng/png.h presence... no
checking for libpng/png.h... no
checking for png_get_valid in -lpng... yes
checking for png_set_tRNS_to_alpha in -lpng... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create using -lpthreads... no
checking for pthread_create using -lpthread... yes
checking for pthread_create using -pthread... yes
checking whether we have PTHREAD_MUTEX_RECURSIVE... yes
checking for X... no
configure: WARNING: These packages 'wayland-client>=1.18 wayland-protocols>=1.15 wayland-cursor xkbcommon  pangocairo' are required to build FLTK for wayland.
configure: WARNING: At least one of them is missing.
configure: WARNING: Continuing with --disable-wayland
configure: error: Configure could not find required X11 libraries, aborting.
~/svn/fltk-1.4.x-20230505-89a2b1a7> ./configure 
checking build system type... x86_64-unknown-haiku
checking host system type... x86_64-unknown-haiku
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for pkg-config... /bin/pkg-config
checking for a BSD-compatible install... /bin/install -c
checking for nroff... no
checking for groff... no
checking for doxygen... no
checking for ranlib... ranlib
checking for ar... /bin/ar
checking for windres... no
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking size of short... 2
checking size of int... 4
checking size of long... 8
checking whether byte ordering is bigendian... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking sys/stdtypes.h usability... no
checking sys/stdtypes.h presence... no
checking for sys/stdtypes.h... no
checking whether we have the POSIX compatible scandir() prototype... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking for strings.h... (cached) yes
checking for strcasecmp... yes
checking for strlcat... yes
checking for strlcpy... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for localeconv... yes
checking for library containing pow... none required
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for long long int... yes
checking for library containing dlsym... none required
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking alsa/asoundlib.h usability... no
checking alsa/asoundlib.h presence... no
checking for alsa/asoundlib.h... no
checking for jpeg_CreateCompress in -ljpeg... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for gzgets in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for png_read_info in -lpng... yes
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking libpng/png.h usability... no
checking libpng/png.h presence... no
checking for libpng/png.h... no
checking for png_get_valid in -lpng... yes
checking for png_set_tRNS_to_alpha in -lpng... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pthread_create using -lpthreads... no
checking for pthread_create using -lpthread... yes
checking for pthread_create using -pthread... yes
checking whether we have PTHREAD_MUTEX_RECURSIVE... yes
checking for X... libraries , headers 
configure: WARNING: These packages 'wayland-client>=1.18 wayland-protocols>=1.15 wayland-cursor xkbcommon  pangocairo' are required to build FLTK for wayland.
configure: WARNING: At least one of them is missing.
configure: WARNING: Continuing with --disable-wayland
checking for gethostbyname... no
checking for gethostbyname in -lnsl... no
checking for gethostbyname in -lbsd... no
checking for connect... no
checking for connect in -lsocket... no
checking for remove... yes
checking for shmat... no
checking for shmat in -lipc... no
checking for IceConnectionNumber in -lICE... no
checking for library containing dlopen... none required
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for glXMakeCurrent in -lGL... no
checking for glXMakeCurrent in -lMesaGL... no
./configure: line 8456: ,: command not found
checking for glXGetProcAddressARB in -lGL... no
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking for XineramaIsActive in -lXinerama... no
Package xft was not found in the pkg-config search path.
Perhaps you should add the directory containing `xft.pc'
to the PKG_CONFIG_PATH environment variable
No package 'xft' found
checking for FcPatternCreate in -lfontconfig... yes
checking X11/Xft/Xft.h usability... no
checking X11/Xft/Xft.h presence... no
checking for X11/Xft/Xft.h... no
configure: WARNING: could not find the required Xft headers and/or libraries.
configure: please install Xft headers and libraries or use 'configure --disable-xft'.
checking for X11/extensions/Xfixes.h... no
checking for X11/Xcursor/Xcursor.h... no
checking for X11/extensions/Xrender.h... no
checking for X11/Xregion.h... no
checking if GCC supports -fno-exceptions... yes
checking if GCC supports -fno-strict-aliasing... yes
checking if ld supports -no-undefined... yes
checking if ld supports -Bsymbolic-functions... yes
checking if toolchain supports sections... yes

Configuration Summary
-------------------------------------------------------------------------
    Directories: prefix=/usr/local
                 bindir=${exec_prefix}/bin
                 datadir=${datarootdir}
                 datarootdir=${prefix}/share
                 exec_prefix=${prefix}
                 includedir=${prefix}/include
                 libdir=${exec_prefix}/lib
                 mandir=${datarootdir}/man
Cross-compiling: no
       Graphics: X11
Image Libraries: JPEG=System
                 PNG=System
                 ZLIB=System
    Large Files: YES
         OpenGL: NO
        Threads: YES
configure: creating ./config.status
config.status: creating makeinclude
config.status: creating fltk.list
config.status: creating fltk-config
config.status: creating fltk.spec
config.status: creating FL/Makefile
config.status: creating config.h
config.status: creating FL/fl_config.h
~/svn/fltk-1.4.x-20230505-89a2b1a7> make
=== making src ===
Compiling Fl.cxx...
Compiling Fl_Adjuster.cxx...
Compiling Fl_Bitmap.cxx...
Compiling Fl_Browser.cxx...
Compiling Fl_Browser_.cxx...
Compiling Fl_Browser_load.cxx...
Compiling Fl_Box.cxx...
Compiling Fl_Button.cxx...
Compiling Fl_Cairo.cxx...
Compiling Fl_Chart.cxx...
Compiling Fl_Check_Browser.cxx...
Compiling Fl_Check_Button.cxx...
Compiling Fl_Choice.cxx...
Compiling Fl_Clock.cxx...
Compiling Fl_Color_Chooser.cxx...
Compiling Fl_Copy_Surface.cxx...
Compiling Fl_Counter.cxx...
Compiling Fl_Dial.cxx...
Compiling Fl_Device.cxx...
Compiling Fl_Double_Window.cxx...
Compiling Fl_File_Browser.cxx...
Compiling Fl_File_Chooser.cxx...
Compiling Fl_File_Chooser2.cxx...
Compiling Fl_File_Icon.cxx...
Compiling Fl_File_Input.cxx...
Compiling Fl_Flex.cxx...
Compiling Fl_Graphics_Driver.cxx...
Compiling Fl_Group.cxx...
Compiling Fl_Help_View.cxx...
Compiling Fl_Image.cxx...
Compiling Fl_Image_Surface.cxx...
Compiling Fl_Input.cxx...
Compiling Fl_Input_.cxx...
Compiling Fl_Input_Choice.cxx...
Compiling Fl_Int_Vector.cxx...
Compiling Fl_Light_Button.cxx...
Compiling Fl_Menu.cxx...
Compiling Fl_Menu_.cxx...
Compiling Fl_Menu_Bar.cxx...
Compiling Fl_Menu_Button.cxx...
Compiling Fl_Menu_Window.cxx...
Compiling Fl_Menu_add.cxx...
Compiling Fl_Menu_global.cxx...
Compiling Fl_Message.cxx...
Compiling Fl_Multi_Label.cxx...
Compiling Fl_Native_File_Chooser.cxx...
Compiling Fl_Overlay_Window.cxx...
Compiling Fl_Pack.cxx...
Compiling Fl_Paged_Device.cxx...
Compiling Fl_Pixmap.cxx...
Compiling Fl_Positioner.cxx...
Compiling Fl_Preferences.cxx...
Compiling Fl_Printer.cxx...
Compiling Fl_Progress.cxx...
Compiling Fl_Repeat_Button.cxx...
Compiling Fl_Return_Button.cxx...
Compiling Fl_Roller.cxx...
Compiling Fl_Round_Button.cxx...
Compiling Fl_Screen_Driver.cxx...
Compiling Fl_Scheme.cxx...
Compiling Fl_Scheme_Choice.cxx...
Compiling Fl_Scroll.cxx...
Compiling Fl_Scrollbar.cxx...
Compiling Fl_Shared_Image.cxx...
Compiling Fl_Shortcut_Button.cxx...
Compiling Fl_Simple_Terminal.cxx...
Compiling Fl_Single_Window.cxx...
Compiling Fl_Slider.cxx...
Compiling Fl_Spinner.cxx...
Compiling Fl_String.cxx...
Compiling Fl_Sys_Menu_Bar.cxx...
Compiling Fl_System_Driver.cxx...
Compiling Fl_Table.cxx...
Compiling Fl_Table_Row.cxx...
Compiling Fl_Tabs.cxx...
Compiling Fl_Text_Buffer.cxx...
Compiling Fl_Text_Display.cxx...
Compiling Fl_Text_Editor.cxx...
Compiling Fl_Tile.cxx...
Compiling Fl_Tiled_Image.cxx...
Compiling Fl_Timeout.cxx...
Compiling Fl_Tree.cxx...
Compiling Fl_Tree_Item.cxx...
Compiling Fl_Tree_Item_Array.cxx...
Compiling Fl_Tree_Prefs.cxx...
Compiling Fl_Tooltip.cxx...
Compiling Fl_Valuator.cxx...
Compiling Fl_Value_Input.cxx...
Compiling Fl_Value_Output.cxx...
Compiling Fl_Value_Slider.cxx...
Compiling Fl_Widget.cxx...
Compiling Fl_Widget_Surface.cxx...
Compiling Fl_Window.cxx...
Compiling Fl_Window_Driver.cxx...
Compiling Fl_Window_fullscreen.cxx...
Compiling Fl_Window_hotspot.cxx...
Compiling Fl_Window_iconize.cxx...
Compiling Fl_Wizard.cxx...
Compiling Fl_XBM_Image.cxx...
Compiling Fl_XPM_Image.cxx...
Compiling Fl_abort.cxx...
Compiling Fl_add_idle.cxx...
Compiling Fl_arg.cxx...
Compiling Fl_compose.cxx...
Compiling Fl_display.cxx...
Compiling Fl_get_system_colors.cxx...
Compiling Fl_grab.cxx...
Compiling Fl_lock.cxx...
Compiling Fl_own_colormap.cxx...
Compiling Fl_visual.cxx...
Compiling filename_absolute.cxx...
Compiling filename_expand.cxx...
Compiling filename_ext.cxx...
Compiling filename_isdir.cxx...
Compiling filename_list.cxx...
Compiling filename_match.cxx...
Compiling filename_setext.cxx...
Compiling fl_arc.cxx...
Compiling fl_ask.cxx...
Compiling fl_boxtype.cxx...
Compiling fl_color.cxx...
Compiling fl_contrast.cxx...
Compiling fl_cursor.cxx...
Compiling fl_curve.cxx...
Compiling fl_diamond_box.cxx...
Compiling fl_draw.cxx...
Compiling fl_draw_arrow.cxx...
Compiling fl_draw_pixmap.cxx...
Compiling fl_encoding_latin1.cxx...
Compiling fl_encoding_mac_roman.cxx...
Compiling fl_engraved_label.cxx...
Compiling fl_file_dir.cxx...
Compiling fl_font.cxx...
Compiling fl_gleam.cxx...
Compiling fl_gtk.cxx...
Compiling fl_labeltype.cxx...
Compiling fl_open_uri.cxx...
Compiling fl_oval_box.cxx...
Compiling fl_overlay.cxx...
Compiling fl_oxy.cxx...
Compiling fl_plastic.cxx...
Compiling fl_read_image.cxx...
Compiling fl_rect.cxx...
Compiling fl_round_box.cxx...
Compiling fl_rounded_box.cxx...
Compiling fl_set_font.cxx...
Compiling fl_scroll_area.cxx...
Compiling fl_shadow_box.cxx...
Compiling fl_shortcut.cxx...
Compiling fl_show_colormap.cxx...
Compiling fl_string_functions.cxx...
Compiling fl_symbols.cxx...
Compiling fl_utf8.cxx...
Compiling fl_vertex.cxx...
Compiling print_button.cxx...
Compiling screen_xywh.cxx...
Compiling drivers/PostScript/Fl_PostScript.cxx...
Compiling drivers/PostScript/Fl_PostScript_image.cxx...
Compiling drivers/Xlib/Fl_Xlib_Copy_Surface_Driver.cxx...
Compiling drivers/Xlib/Fl_Xlib_Image_Surface_Driver.cxx...
Compiling drivers/X11/Fl_X11_Window_Driver.cxx...
Compiling drivers/X11/Fl_X11_Screen_Driver.cxx...
Compiling drivers/Posix/Fl_Posix_System_Driver.cxx...
Compiling drivers/Unix/Fl_Unix_System_Driver.cxx...
Compiling drivers/Unix/Fl_Unix_Screen_Driver.cxx...
Compiling drivers/Posix/Fl_Posix_Printer_Driver.cxx...
Compiling drivers/X11/fl_X11_platform_init.cxx...
Compiling Fl_x.cxx...
Compiling fl_dnd_x.cxx...
Compiling Fl_Native_File_Chooser_FLTK.cxx...
Compiling Fl_Native_File_Chooser_GTK.cxx...
Compiling Fl_Native_File_Chooser_Kdialog.cxx...
Compiling Fl_Native_File_Chooser_Zenity.cxx...
Compiling Fl_get_key.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_arci.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_color.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_image.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_line_style.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_rect.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_vertex.cxx...
Compiling drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx...
In function 'const char* find_best_font(const char*, int)':
cc1plus: warning: function may return address of local variable [-Wreturn-local-addr]
drivers/Xlib/Fl_Xlib_Graphics_Driver_font_x.cxx:463:8: note: declared here
  463 |   char namebuffer[1024];        // holds scalable font name
      |        ^~~~~~~~~~
Compiling fl_call_main.c...
Compiling flstring.c...
Compiling numericsort.c...
Compiling vsnprintf.c...
Compiling xutf8/keysym2Ucs.c...
Compiling scandir_posix.c...
Compiling xutf8/utf8Utils.c...
Compiling xutf8/utf8Wrap.c...
Compiling xutf8/case.c...
Compiling xutf8/is_right2left.c...
Compiling xutf8/is_spacing.c...
/bin/ar cr ../lib/libfltk.a ...
Compiling forms_compatibility.cxx...
Compiling forms_bitmap.cxx...
Compiling forms_free.cxx...
Compiling forms_fselect.cxx...
Compiling forms_pixmap.cxx...
Compiling forms_timer.cxx...
/bin/ar cr ../lib/libfltk_forms.a ...
Compiling fl_images_core.cxx...
Compiling fl_write_png.cxx...
Compiling Fl_BMP_Image.cxx...
Compiling Fl_File_Icon2.cxx...
Compiling Fl_GIF_Image.cxx...
Compiling Fl_Anim_GIF_Image.cxx...
Compiling Fl_Help_Dialog.cxx...
Compiling Fl_ICO_Image.cxx...
Compiling Fl_JPEG_Image.cxx...
Compiling Fl_PNG_Image.cxx...
Compiling Fl_PNM_Image.cxx...
Compiling Fl_Image_Reader.cxx...
Compiling Fl_SVG_Image.cxx...
Compiling drivers/SVG/Fl_SVG_File_Surface.cxx...
/bin/ar cr ../lib/libfltk_images.a ...
=== making fluid ===
Compiling CodeEditor.cxx...
Compiling StyleParse.cxx...
Compiling Fd_Snap_Action.cxx...
Compiling Fl_Function_Type.cxx...
Compiling Fl_Group_Type.cxx...
Compiling Fl_Menu_Type.cxx...
Compiling Fl_Type.cxx...
Compiling Fl_Widget_Type.cxx...
Compiling Fl_Window_Type.cxx...
Compiling Fluid_Image.cxx...
Compiling about_panel.cxx...
Compiling align_widget.cxx...
Compiling alignment_panel.cxx...
Compiling code.cxx...
Compiling custom_widgets.cxx...
Compiling factory.cxx...
Compiling file.cxx...
Compiling fluid.cxx...
Compiling function_panel.cxx...
Compiling pixmaps.cxx...
Compiling shell_command.cxx...
Compiling template_panel.cxx...
Compiling undo.cxx...
Compiling widget_browser.cxx...
Compiling widget_panel.cxx...
Compiling ExternalCodeEditor_UNIX.cxx...
Linking fluid...
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: ../lib/libfltk.a(Fl_x.o): in function `Fl_X11_Screen_Driver::poll_or_select_with_delay(double)':
Fl_x.cxx:(.text._ZN20Fl_X11_Screen_Driver25poll_or_select_with_delayEd+0x22): undefined reference to `XQLength'
/boot/system/develop/tools/bin/../lib/gcc/x86_64-unknown-haiku/11.2.0/../../../../x86_64-unknown-haiku/bin/ld: ../lib/libfltk.a(Fl_x.o): in function `Fl_X11_Screen_Driver::poll_or_select()':
Fl_x.cxx:(.text._ZN20Fl_X11_Screen_Driver14poll_or_selectEv+0x15): undefined reference to `XQLength'
collect2: error: ld returned 1 exit status
Makefile:66: recipe for target 'fluid' failed
make[1]: *** [fluid] Error 1
Makefile:22: recipe for target 'all' failed
make: *** [all] Error 1
~/svn/fltk-1.4.x-20230505-89a2b1a7>

(even though the issue comes when building fluid, which is not mandatory for the whole library, I can't see into configure any ways to disable it) I can find XQLength definition inside Xlib.h , but unlike other functions listed there, nowhere in the code its implementation.

waddlesplash commented 1 year ago

Appears to be a macro function. I can look into this next week.

waddlesplash commented 1 year ago

Fixed. Also fixed a crash on FLTK startup. There are a number of redrawing glitches, however, which need to be fixed.