Sorry, sent this reply to Rick instead of the list by mistake! ---rony
-------- Forwarded Message -------- Subject: Re: [Oorexx-devel] Question ad CMakeLists.txt (ooRexx 5 version numbers in the library name on Unix (Linux and MacOS) breaks long established Rexx convention) Date: Sun, 26 Jul 2020 17:48:58 +0200 From: Rony G. Flatscher <rony.flatsc...@wu.ac.at> To: Rick McGuire <object.r...@gmail.com> Thank you for your follow-up information! Following your suggestion I defined a new API identifier "ORX_API_LEVEL" in "SYM_LINK_CREATE_TO ", adjusted 'set_target_properities' accordingly and 'SYM_LINK_CREATE_TO' in the enclosed diff/patch file. Tested on 64-bit Ubuntu. If there are no objections I would check-in those changes. ---rony On 26.07.2020 16:34, Rick McGuire wrote: > I just checked, the only new entry points in rexx.dll are internal use only > ones required by > different interpreter components. There are no new "official" APIs > introduced. The version can > reasonable left at the 4 level. > > Rick > > On Sun, Jul 26, 2020 at 10:31 AM Rick McGuire <object.r...@gmail.com > <mailto:object.r...@gmail.com>> wrote: > > I guess the real problem is that we are inappropriately tying the uses of > the library version > to the release version. The purpose here is to allow linking to a version > that contains the > entry points required by your program. The links to the older versions > are created because the > new version is upward compatible to the old version, so, for example, a > version 5 library will > work with programs linked to version 4 of the same library. A new release > of the interpreter > does not warrant automatically bumping the library version, unless the > library also contains > new entry points that implement new APIs. I had a similar problem with > the context APIs. The > API version is not tied to the interpreter release number, but is only > incremented when a new > API is added to a given context vector. The different context APIs > (thread, method, routine, > etc.) each carries its own version identifier. > > So what is needed here is an API level identifier. The past version was > not necessarily > broken, because I'm not sure any new entry points were introduced between > 4.0 and 4.2. I'd > have to go double check, but I'm not sure that any new ones are being > introduced in 5.0.0, > which would argue that it should be left a the 4 level. > > Rick > > On Sun, Jul 26, 2020 at 9:48 AM Rony G. Flatscher <rony.flatsc...@wu.ac.at > <mailto:rony.flatsc...@wu.ac.at>> wrote: > > On 26.07.2020 14:11, Rick McGuire wrote: > > The only reservation I have is that new APIs can get introduced in > minor releases as > well as major > > releases. As such, wouldn't it be better if "5.0" were used? A > library for a 5.1 release > might > > contain APIs that a 5.0 release does not. The old convention was > probably an error. > > It seems that you foresee situations with ooRexx that warrant at > least ORX_MINOR to be > used, even > worse, you view the old convention to be in error! > > In that case it would not make sense to simplify the so version > number for ooRexx 5.0 to > only use > ORX_MAJOR then and the question is whether it makes sense to change > the current setting of > ORX_VERSION at all then! > :) > > ---rony >
Index: CMakeLists.txt =================================================================== --- CMakeLists.txt (revision 12100) +++ CMakeLists.txt (working copy) @@ -64,6 +64,7 @@ #/*----------------------------------------------------------------------------*/ project (ooRexx) # The version of ooRexx to make +set (ORX_API_LEVEL 4) set (ORX_MAJOR 5) set (ORX_MINOR 0) set (ORX_MOD_LVL 0) @@ -87,7 +88,7 @@ # Unix: used in macro create_install_symlink() set(SYM_LINK_CREATE_FROM 3) # define lower bound -math(EXPR SYM_LINK_CREATE_TO "${ORX_MAJOR}-1") # define upper bound is dependent on ${ORX_MAJOR} +math(EXPR SYM_LINK_CREATE_TO "${ORX_API_LEVEL}-1") # define upper bound is dependent on ${ORX_MAJOR} # OOREXX_SHEBANG_PROGRAM default: @@ -668,7 +669,7 @@ install(TARGETS rexxapi RUNTIME DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core ARCHIVE DESTINATION ${INSTALL_INCLUDE_DIR} COMPONENT DevLib) -set_target_properties(rexxapi PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rexxapi PROPERTIES SOVERSION ${ORX_API_LEVEL}) create_install_symlink(rexxapi) #################### librexx.so ########################## @@ -953,7 +954,7 @@ install(TARGETS rexx RUNTIME DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core ARCHIVE DESTINATION ${INSTALL_INCLUDE_DIR} COMPONENT DevLib) -set_target_properties(rexx PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rexx PROPERTIES SOVERSION ${ORX_API_LEVEL}) create_install_symlink(rexx) #################### orexx (executable) ########################## @@ -1268,7 +1269,7 @@ target_link_libraries(rxmath rexx rexxapi ${platform_rxmath_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS rxmath RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(rxmath PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxmath PROPERTIES SOVERSION ${ORX_API_LEVEL}) create_install_symlink(rxmath) #################### librxsock.so ################ @@ -1286,7 +1287,7 @@ target_link_libraries(rxsock rexx rexxapi ${platform_rxsock_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS rxsock RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(rxsock PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxsock PROPERTIES SOVERSION ${ORX_API_LEVEL}) create_install_symlink(rxsock) @@ -1312,7 +1313,7 @@ target_link_libraries(rxregexp rexx rexxapi ${platform_rxregexp_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS rxregexp RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(rxregexp PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxregexp PROPERTIES SOVERSION ${ORX_API_LEVEL}) create_install_symlink(rxregexp) #################### libhostemu.so ################ @@ -1337,7 +1338,7 @@ target_link_libraries(hostemu rexx rexxapi ${platform_hostemu_libs} ${CMAKE_REQUIRED_LIBRARIES}) install(TARGETS hostemu RUNTIME COMPONENT Core DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) -set_target_properties(hostemu PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(hostemu PROPERTIES SOVERSION ${ORX_API_LEVEL}) create_install_symlink(hostemu) #################### librxunixsys.so ################ @@ -1358,7 +1359,7 @@ target_link_libraries(rxunixsys rexx rexxapi ${CMAKE_REQUIRED_LIBRARIES}) endif () -set_target_properties(rxunixsys PROPERTIES VERSION ${ORX_VERSION}) +set_target_properties(rxunixsys PROPERTIES SOVERSION ${ORX_API_LEVEL}) install(TARGETS rxunixsys RUNTIME DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) create_install_symlink(rxunixsys) @@ -1379,7 +1380,7 @@ target_link_libraries(orxncurses rexx rexxapi ncurses ${CMAKE_REQUIRED_LIBRARIES}) # Make sure ncurses.cls gets copied add_custom_target(ncurses_cls ALL DEPENDS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ncurses.cls) - set_target_properties(orxncurses PROPERTIES VERSION ${ORX_VERSION}) + set_target_properties(orxncurses PROPERTIES SOVERSION ${ORX_API_LEVEL}) install(TARGETS orxncurses RUNTIME DESTINATION ${INSTALL_LIB_DIR} LIBRARY DESTINATION ${INSTALL_LIB_DIR} COMPONENT Core) install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/ncurses.cls COMPONENT Core DESTINATION ${INSTALL_CLS_DIR})
_______________________________________________ Oorexx-devel mailing list Oorexx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/oorexx-devel