STR #3531

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 Home  |  Articles & FAQs  |  Bugs & Features  |  Documentation  |  Download  |  Screenshots  ]

Return to Bugs & Features | Roadmap 1.3 ]

STR #3531

Application:FLTK Library
Status:1 - Closed w/Resolution
Priority:3 - Moderate, e.g. unable to compile the software
Scope:3 - Applies to all machines and operating systems
Subsystem:Config Files
Summary:abi-version.h not created/changed by ./configure
Created By:w1hkj
Assigned To:AlbrechtS
Fix Version:None
Update Notification:

Receive EMails Don't Receive EMails

Trouble Report Files:

Name/Time/Date Filename/Size top right image
#1 w1hkj
03:31 Nov 12, 2019
#2 AlbrechtS
05:01 Nov 12, 2019
bottom left image   bottom right image

Trouble Report Comments:

Name/Time/Date Text top right image
#1 w1hkj
03:31 Nov 12, 2019
All code generation dependent upon FLTK_ABI_VERSION fails to compile correctly.  Tested on Linux and OS-X.  
#2 AlbrechtS
05:01 Nov 12, 2019
Short version: thanks for the report, but I don't think that this is correct.

First of all, FLTK_ABI_VERSION is deprecated but still defined in FL/Enumerations.H. It should always be equal to FL_ABI_VERSION which you should use since 1.3.4/1.3.5 and later.

The posted abi-version.h file is correct and intentional if you don't specify an ABI version with configure. Again, there is code in FL/Enumerations.H that defines FL_API_VERSION, FL_ABI_VERSION, and FLTK_ABI_VERSION for backwards compatibility.

Note: do not include FL/abi-version.h directly in your code. You must include FL/Fl.H which will include FL/Enumerations.H and FL/abi-version.h indirectly. This is documented here:

Please see also README.abi-version.txt and attached small demo program abi-version.cxx.
#3 AlbrechtS
05:07 Nov 12, 2019
BTW, I also tested `./configure --with-abiversion=10304' and ran the demo program under Linux:

$ ./fltk-config --compile abi-version.cxx && ./abi-version
g++ -I. -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_THREAD_SAFE -D_REENTRANT -o 'abi-version' 'abi-version.cxx' ./lib/libfltk.a -lXrender -lXcursor -lXfixes -lXext -lXft -lfontconfig -lXinerama -lpthread -ldl -lm -lX11
FL_API_VERSION   = 10305
FL_ABI_VERSION   = 10304

Configured w/o abiversion:

FL_API_VERSION   = 10305
FL_ABI_VERSION   = 10300
#4 w1hkj
05:17 Nov 12, 2019
Thank you Albrecht.  I "rediscovered" the README.abi-version.txt after posting the STR.  I know that 1.4 deprecates the FLTK_ABI_VERSION, but I still think there is a problem with the way that all prior distributions are posted.  It is common for most end users to simply use "./configure && make && make install" when building an application and the dependent libraries.  Both the end-user-product maintainer and the user-builder must be informed that "./configure --with-abiversion=10305" is required or the end-user code may fail to compile.  Try creating an application that uses Fl_Tree wherein the enum FL_TREE-REASON_RESELECTED was a part of a boolean test:

enum Fl_Tree_Reason {
  FL_TREE_REASON_NONE=0,        ///< unknown reason
  FL_TREE_REASON_SELECTED,      ///< an item was selected
  FL_TREE_REASON_DESELECTED,    ///< an item was de-selected
#if FLTK_ABI_VERSION >= 10301
  FL_TREE_REASON_RESELECTED,    ///< an item was re-selected (e.g. double-clicked)
  FL_TREE_REASON_OPENED,        ///< an item was opened
  FL_TREE_REASON_CLOSED,        ///< an item was closed
  FL_TREE_REASON_DRAGGED        ///< an item was dragged into a new place

I know this can be resolved at the user code level.  But a more universal solution would be to default the FLTK_ABI_VERSION to the actual distribution version rather than a null string.
#5 AlbrechtS
05:39 Nov 12, 2019
Okay, thanks for your quick reply. I can see your problem.

But to preserve binary compatibility we need to configure with the default binary version 1.3.0 if nothing else is given on the command line. This is intended for building shared FLTK libs and also Unix/Linux and other distros to maintain binary compatibility among 1.3.x versions.

ABI features are *only* enabled if you *explicitly* invoke `./configure --with-abiversion=103xx'. Maybe this is not documented clearly enough, but this is not going to be changed for reasons mentioned above.

Your example with FL_TREE_REASON_RESELECTED doesn't seem to be documented correctly as ABI 1.3.1 feature which it should obviously be (unless I'm missing something). But since 1.3.x is at its end of development this will likely not be changed. Sorry.

Can we close this STR?

PS: if you'd like to discuss this or similar issues, fltk.coredev is the proper place. Thank you.!forum/fltkcoredev
#6 AlbrechtS
08:29 Nov 24, 2019
bottom left image   bottom right image

Return to Bugs & Features ]


Comments are owned by the poster. All other content is copyright 1998-2022 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to ''.