Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Wrong stub lib name on OpenBSD

Closed / Invalidd4147321e11a6bf08a5647db5fd5c17bac2264f7Created 4 years agoUpdated 4 years ago
Descriptionplain2023-04-15 11:21:07
Libraries on OpenBSD are now generated as libtcl.* when they should be libtclXY.*.
Where X and Y are the major and minor versions.
stu Ticket [d4147321e1]: 3 changes [History diff]2023-04-15 11:21:22
stu Ticket [d4147321e1]: 3 changes [History diff]2023-04-17 08:26:27
jan.nijtmanswiki2023-04-17 21:08:17

In tcl.m4, I see:

SHARED_LIB_SUFFIX='${TCL_TRIM_DOTS}.so${SHLIB_VERSION}'
So that looks OK. Which version?

stuplain2023-04-18 15:35:44
Title changed; only stub lib affected.
I can't find when this change happened. There's no mention in any commit messages.
The file with the problem is unix/configure.ac.
The change happened somewhere between these two commits: 40538213cde55fe4 and 7fe2ab82ec6c3ca8, so sometime between 2021-05-03 and 2023-01-24.

Here is a diff snippet from 8.6.13 to 9.0.0 showing the changes that are causing this problem.

Notice the comment wasn't changed to match the code. Sloppy.


 # Replace ${VERSION} with contents of ${TCL_VERSION}
 # double-eval to account for TCL_TRIM_DOTS.
 #
-eval "TCL_STUB_LIB_FILE=libtclstub${TCL_UNSHARED_LIB_SUFFIX}"
+eval "TCL_STUB_LIB_FILE=libtclstub.a"
 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
 eval "TCL_STUB_LIB_DIR=\"${libdir}\""
 
-if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
-    TCL_STUB_LIB_FLAG="-ltclstub${TCL_VERSION}"
-else
-    TCL_STUB_LIB_FLAG="-ltclstub`echo ${TCL_VERSION} | tr -d .`"
-fi
+TCL_STUB_LIB_FLAG="-ltclstub"
jan.nijtmanswiki2023-04-19 07:39:50

In that case, the stub library name change in 9.0 is intentional, and it's done for all platforms, not only OpenBSD.

See: https://core.tcl-lang.org/tips/doc/trunk/tip/628.md

Log in (anonymous is fine) to add a comment.