Re: Can't build TclTLS 2.0b1

Liste des GroupesRevenir à cl tcl 
Sujet : Re: Can't build TclTLS 2.0b1
De : nospam.nurdglaw (at) *nospam* gmail.com (Alan Grunwald)
Groupes : comp.lang.tcl
Date : 08. Jul 2025, 14:03:27
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <104j517$3is7p$1@dont-email.me>
References : 1 2 3 4 5 6 7
User-Agent : Mozilla Thunderbird
On 08/07/2025 00:03, Brian wrote:
On 7/7/25 4:53 PM, Alan Grunwald wrote:
On 06/07/2025 20:35, Brian wrote:
On 7/6/25 12:35 PM, Alan Grunwald wrote:
On 06/07/2025 14:22, Alan Grunwald wrote:
On 06/07/2025 02:09, Brian wrote:
 
>
>
So the configure script worked exactly as you specified. You only provided the --with-openssl-includedir option, so only that path was overridden from the default. The default is a blank which means find it in the default paths.
>
However, I don't think that's your issue. The issue is you don't know where you installed OpenSSL. From your emails it could be the default one in /usr and your email today suggests it could be in /usr/local. You need to find where the openssl executable, ssl.h, and libssl.so are located, then use the 3 options to point to those locations. Make sure not to include /openssl in the include path since its in the #include already. My example provided the location where these are in OpenSUSE. The README.txt file has more info on all of the options.
>
I'd also suggest doing a 'make clean' and 'make distclean' to remove any temp files with old path config info. I also suggest using all of the TCL options to point to the TCL 9.0.2 directory so it doesn't accidentally find the TCL 8.6 install. The tcl.m4 file is configured to be very aggressive about using wherever is in the default paths.
>
>
Hi Brian,
>
I think I have two versions of OpenSSL installed -
>
I have two openssl executables - /usr/bin/openssl and /usr/local/bin/ openssl,
>
two copies of ssl.h -            /usr/local/include/openssl/ssl.h and / usr/include/openssl/ssl.h
>
and two copies of libssl.so -    /usr/lib/x86_64-linux-gnu/libssl.so and /usr/local/lib/libssl.so
>
Looking at the versions of the two openssl executables,
>
$ /usr/local/bin/openssl version
OpenSSL 1.1.1  11 Sep 2018
$ /usr/bin/openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
>
Checking the content of the two bio.h files that sit alongside the ssl.h files, only /usr/include/openssl/bio.h defines BIO_FLAGS_IN_EOF
>
FWIW /usr/local/bin appears before /usr/bin in my PATH.
>
$ ls -l /usr/bin/openssl /usr/local/bin/openssl /usr/lib/x86_64-linux- gnu/libssl.so /usr/local/lib/libssl.so /usr/local/include/openssl/ ssl.h /usr/include/openssl/ssl.h /usr/lib/x86_64-linux-gnu/libssl.so.3 / usr/local/lib/libssl.so.1.1
-rwxr-xr-x 1 root root 1001272 Feb  5 13:19 /usr/bin/openssl
-rw-r--r-- 1 root root  124376 Feb  5 13:19 /usr/include/openssl/ssl.h
lrwxrwxrwx 1 root root      11 Feb  5 13:19 /usr/lib/x86_64-linux-gnu/ libssl.so -> libssl.so.3
-rw-r--r-- 1 root root  667864 Feb  5 13:19 /usr/lib/x86_64-linux-gnu/ libssl.so.3
-rwxr-xr-x 1 root root  870432 Jan 16  2023 /usr/local/bin/openssl
-rw-r--r-- 1 root root  110319 Jan 16  2023 /usr/local/include/openssl/ ssl.h
lrwxrwxrwx 1 root root      13 Jan 16  2023 /usr/local/lib/libssl.so -> libssl.so.1.1
-rwxr-xr-x 1 root root  700296 Jan 16  2023 /usr/local/lib/libssl.so.1.1
>
What do you recommend I use as a configure command line, judging by the location of the various openssl files, I think the following is suitable, although I haven't addressed your concerns about getting the right Tcl installation.
>
./configure --enable-64bit --prefix=/opt.tcl9.0.2 --exec-prefix=/opt/ tcl9.0.2 --with-openssl-includedir=/usr/ --with-openssl-libdir=/usr/lib/ x86_64-linux-gnu --with-openssl-dir=/usr/bin
>
>
It's getting too late for me to trust myself to type this command in before tomorrow morning, but I am concerned that as far as I can make out, the changes you've recommended affect the *link* part of the process, but I am seeing problems with the *compile* steps.
>
Many thanks - I'll see what I see tomorrow :-)
>
Alan
>
 Yes, that's it. You have 2 versions and the ancient 1.1.1 version is in /usr/local, which appears before /usr in the path. So you need to override that. I seem to recall from the earlier discussion that may have been the first 1.1.1 release which is missing some things. Anyway, I would not use such an outdated and insecure version. I'd suggest the following for the configure options, though check if --libdir is correct for you. You want it to point to the location of the tclConfig.sh file.
 ./configure --enable-64bit --prefix=/opt/tcl9.0.2 --exec-prefix=/opt/tcl9.0.2 --libdir=/opt/tcl9.0.2/lib64/tcl --with-openssl-dir=/usr --with-openssl-includedir=/usr/include --with-openssl-libdir=/usr/lib/x86_64-linux-gnu
 
I went with
   $ ./configure --enable-64bit --prefix=/opt/tcl9.0.2 --exec-prefix=/opt/tcl9.0.2 --libdir=/opt/tcl9.0.2/lib --with-openssl-dir=/usr --with-openssl-includedir=/usr/include --with-openssl-libdir=/usr/lib/x86_64-linux-gnu
(Your prediction of where tclConfig.sh ended up was wide of the mark.)
Sadly this still made no difference and I still get compilation errors from tlsBIO.c saying that BIO_FLAGS_IN_EOF is undefined.
After reading the top answer to this question on StackOverflow
https://stackoverflow.com/questions/10343950/c-what-option-do-i-use-to-produce-a-listing-file
I tried executing
(cd Downloads/tcltls-2.0b1; gcc -DPACKAGE_NAME=\"tls\" -DPACKAGE_TARNAME=\"tls\" -DPACKAGE_VERSION=\"2.0b1\" -DPACKAGE_STRING=\"tls\ 2.0b1\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DBUILD_tls=/\*\*/ -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DTCL_THREADS=1 -DUSE_TCL_STUBS=1 -DUSE_TCLOO_STUBS=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -DHAVE_STDBOOL_H=1 -DTCL_WIDE_INT_IS_LONG=1 -DTCL_CFG_OPTIMIZED=1 -DUSE_TCL_STUBS=1 -DNO_SSL3=1 -D_FORTIFY_SOURCE=2 -fstack-protector-all -fno-strict-overflow -I/usr/include -Wno-deprecated-declarations -I/usr/include -I"/home/alan/Downloads/tcl9.0.2/generic"  -I.    -O2 -fomit-frame-pointer -DNDEBUG -Wall -fPIC -pipe -m64 -O2 -fomit-frame-pointer -DNDEBUG -Wall -fPIC  -c `echo ./generic/tlsBIO.c` -E -otlsBIO.lis)
(which is derived from the failing compilation command, with "-otlsBIO.c" replaced by "-E -otlsBIO.lis")
Poking around in the pre-processed generated source I found, around line 5047
# 31 "./generic/tlsInt.h" 2
# 1 "/usr/local/include/openssl/ssl.h" 1 3
# 15 "/usr/local/include/openssl/ssl.h" 3
Now, line 31 of tlsInt.h is
#include <openssl/ssl.h>
so I *think* I can understand the preprocessor output. What I am powerless to explain is why it then appears to pick up the old version of ssl.h; later in the prepreocessor output, it also appears to pick up the old version of bio.h which doesn't #define BIO_FLAGS_IN_EOF
(I'm also curious as to why configure has decided to point to my Tcl download location rather than the installation location.)
Alan

Date Sujet#  Auteur
4 Jul 25 * Can't build TclTLS 2.0b117Alan Grunwald
6 Jul 25 `* Re: Can't build TclTLS 2.0b116Brian
6 Jul 25  `* Re: Can't build TclTLS 2.0b115Alan Grunwald
6 Jul 25   `* Re: Can't build TclTLS 2.0b114Alan Grunwald
6 Jul 25    `* Re: Can't build TclTLS 2.0b113Brian
7 Jul 25     `* Re: Can't build TclTLS 2.0b112Alan Grunwald
8 Jul 25      `* Re: Can't build TclTLS 2.0b111Brian
8 Jul 25       `* Re: Can't build TclTLS 2.0b110Alan Grunwald
8 Jul 25        `* Re: Can't build TclTLS 2.0b19Ashok
8 Jul 25         `* Re: Can't build TclTLS 2.0b18Ralf Fassel
9 Jul 25          `* Re: Can't build TclTLS 2.0b17Brian
9 Jul 25           `* Re: Can't build TclTLS 2.0b16Ralf Fassel
9 Jul 25            `* Re: Can't build TclTLS 2.0b15Alan Grunwald
9 Jul 25             `* Re: Can't build TclTLS 2.0b14Ralf Fassel
9 Jul 25              +* Re: Can't build TclTLS 2.0b1 - SOLVED2Alan Grunwald
10 Jul 25              i`- Re: Can't build TclTLS 2.0b1 - SOLVED1Ralf Fassel
10 Jul 25              `- Re: Can't build TclTLS 2.0b11Christian Gollwitzer

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal