LEASE To: questions@freebsd.org Content-Type: multipart/alternative; boundary="00000000000099e5720618692a75" X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.61 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.61)[-0.611]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20230601]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ARC_NA(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; FREEMAIL_FROM(0.00)[gmail.com]; DKIM_TRACE(0.00)[gmail.com:+]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; PREVIOUSLY_DELIVERED(0.00)[questions@freebsd.org]; TO_DN_NONE(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; MID_RHS_MATCH_FROMTLD(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; MLMMJ_DEST(0.00)[questions@freebsd.org]; RCVD_COUNT_ONE(0.00)[1]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::232:from] X-Rspamd-Queue-Id: 4Vdwg738H9z4FCq --00000000000099e5720618692a75 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, May 14, 2024 at 3:01=E2=80=AFPM Yasuhiro Kimura = wrote: > From: Odhiambo Washington > Subject: Re: Installing Python2.7 in 14-RELEASE > Date: Tue, 14 May 2024 11:39:30 +0300 > > > I am using openssl from the ports. > > I checked the build log and saw: > > > > ``` > > #warning "Make sure new member of socket address initialized" > > ^ > > 1 warning generated. > > warning: openssl 0x00000000 is too old for _hashlib > > building dbm using ndbm > > > > Python build finished, but the necessary bits to build these modules > were not found: > > _bsddb _hashlib dl > > imageop linuxaudiodev spwd > > sunaudiodev > > To find the necessary bits, look in setup.py in detect_modules() for th= e > module's name. > > > > =3D=3D=3D> Staging for python27-2.7.18 > > =3D=3D=3D> python27-2.7.18 depends on file: /usr/local/lib/libcrypto.= so.12 - > found > > =3D=3D=3D> Generating temporary packing list > > install -s -m 555 python > /usr/ports/lang/python27/work/stage/usr/local/bin/python2.7 > > if test -f libpython2.7.so; then if test -n "" ; then install -s -m > 0644 /usr/ports/lang/python27/work/stage/usr/local/ > > bin; else install -s -m 0644 libpython2.7.so > /usr/ports/lang/python27/work/stage/usr/local/lib/libpython2.7.so.1; if > > test libpython2.7.so !=3D libpython27.so.1; then (cd > /usr/ports/lang/python27/work/stage/usr/local/lib; ln -sf > > libpython2.7.so.1 libpython2.7.so) fi fi; else true; fi > > warning: openssl 0x00000000 is too old for _hashlib > > ``` > > root@gw:/usr/ports/lang/python27 # /usr/local/bin/openssl version > > OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024) > > root@gw:/usr/ports/lang/python27 # ls -al /usr/local/bin/openssl > > -rwxr-xr-x 1 root wheel 828656 May 14 11:22 /usr/local/bin/openssl > > root@gw:/usr/ports/lang/python27 # ls -al /usr/bin/openssl > > -r-xr-xr-x 1 root wheel 970624 Nov 25 14:13 /usr/bin/openssl > > root@gw: /usr/ports/lang/python27 # /usr/bin/openssl version > > OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023) > > > > I have DEFAULT_VERSIONS+=3Dssl=3Dopenssl > > Please try following patch. > > diff --git a/lang/python27/Makefile b/lang/python27/Makefile > index 8aeab6d28008..245835f5be22 100644 > --- a/lang/python27/Makefile > +++ b/lang/python27/Makefile > @@ -120,7 +120,8 @@ post-patch: > # openssl/opensslv.h so setup.py just detects the string as 00000000 > # However care should be taken for the OSVERSION. If OpenSSL 3.0.9 > # lands later the OSVERSION string should be fixed accordingly > -.if ${OPSYS} =3D=3D FreeBSD && ${OSVERSION} >=3D 1400092 && (${SSL_DEFAU= LT} =3D=3D > base || ${SSL_DEFAULT:Mopenssl3*} ) > +.if ${OPSYS} =3D=3D FreeBSD && ${OSVERSION} >=3D 1400092 && (${SSL_DEFAU= LT} =3D=3D > base || \ > + ${SSL_DEFAULT} =3D=3D openssl || ${SSL_DEFAULT:Mopenssl3*} ) > @${REINPLACE_CMD} -e 's|00907000|00000000|' \ > ${WRKSRC}/setup.py > .endif > > Regards. > > --- > Yasuhiro Kimura Thank you. I applied this patch, but the installation still fails somehow: [snip] running install_scripts copying build/scripts-2.7/idle2.7 -> /usr/ports/lang/python27/work/stage/usr/local/bin copying build/scripts-2.7/pydoc2.7 -> /usr/ports/lang/python27/work/stage/usr/local/bin copying build/scripts-2.7/2to3-2.7 -> /usr/ports/lang/python27/work/stage/usr/local/bin changing mode of /usr/ports/lang/python27/work/stage/usr/local/bin/idle2.7 to 755 changing mode of /usr/ports/lang/python27/work/stage/usr/local/bin/pydoc2.7 to 755 changing mode of /usr/ports/lang/python27/work/stage/usr/local/bin/2to3-2.7 to 755 running install_egg_info Writing /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/Pyt= hon-2.7.18-py2.7.egg-info rm /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/_sy= sconfigdata.py* install -m 0644 ./Misc/python.man /usr/ports/lang/python27/work/stage/usr/local/share/man/man1/python2.7.1 if test "xno" !=3D "xno" ; then case no in upgrade) ensurepip=3D"--altinstall --upgrade --no-default-pip" ;; install|*) ensurepip=3D"--altinstall --no-default-pip" ;; esac; LD_LIBRARY_PATH=3D/usr/ports/lang/python27/work/Python-2.7.18 ./python -E = -m ensurepip $ensurepip --root=3D/usr/ports/lang/python27/work/stage/ ; fi for i in /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dynload/*.s= o; do /usr/bin/strip $i; done # Strip shared extensions install -m 0644 /usr/ports/lang/python27/work/Python-2.7.18/Tools/gdb/libpython.py /usr/ports/lang/python27/work/stage/usr/local/lib/libpython2.7.so.1-gdb.py =3D=3D=3D=3D> Compressing man pages (compress-man) *root@gw:/usr/ports/lang/python27 # find work/stage -name "_hashlib.so"work/stage/usr/local/lib/python2.7/lib-dynload/_hashlib.so* root@gw:/usr/ports/lang/python27 # make install =3D=3D=3D> Installing for python27-2.7.18 =3D=3D=3D> Checking if python27 is already installed =3D=3D=3D> Registering installation for python27-2.7.18 pkg-static: Unable to access file /usr/ports/lang/python27/work/stage//lib/python2.7/lib-dynload/_hashlib.so:= No such file or directory ^^^ why is it that usr/local is not showing here? *** Error code 1 Stop. make: stopped in /usr/ports/lang/python27 root@gw:/usr/ports/lang/python27 # --=20 Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 In an Internet failure case, the #1 suspect is a constant: DNS. "Oh, the cruft.", egrep -v '^$|^.*#' =C2=AF\_(=E3=83=84)_/=C2=AF :-) [How to ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html] --00000000000099e5720618692a75 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Tue, May 14, 2024 at 3:01=E2=80=AF= PM Yasuhiro Kimura <yasu@freebsd.org= > wrote:
= From: Odhiambo Washington <odhiambo@gmail.com>
Subject: Re: Installing Python2.7 in 14-RELEASE
Date: Tue, 14 May 2024 11:39:30 +0300

> I am using openssl from the ports.
> I checked the build log and saw:
>
> ```
> #warning "Make sure new member of socket address initialized"= ;
> =C2=A0^
> 1 warning generated.
> warning: openssl 0x00000000 is too old for _hashlib
> building dbm using ndbm
>
> Python build finished, but the necessary bits to build these modules w= ere not found:
> _bsddb =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 _hashlib =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 dl
> imageop =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0linuxaudiodev =C2=A0 = =C2=A0 =C2=A0spwd
> sunaudiodev
> To find the necessary bits, look in setup.py in detect_modules() for t= he module's name.
>
> =3D=3D=3D> =C2=A0Staging for python27-2.7.18
> =3D=3D=3D> =C2=A0 python27-2.7.18 depends on file: /usr/local/lib/l= ibcrypto.so.12 - found
> =3D=3D=3D> =C2=A0 Generating temporary packing list
> install =C2=A0-s -m 555 python /usr/ports/lang/python27/work/stage/usr= /local/bin/python2.7
> if test -f libpython2.7.so; then =C2=A0if test -n "" ; then= =C2=A0install =C2=A0-s -m 0644 =C2=A0/usr/ports/lang/python27/work/stage/u= sr/local/
> bin; =C2=A0else =C2=A0install =C2=A0-s -m 0644 libpython2.7.so /usr/p= orts/lang/python27/work/stage/usr/local/lib/libpython2.7.so.1; =C2=A0if
> test libpython2.7.so !=3D libpython27.so.1; then =C2=A0(cd /usr/ports= /lang/python27/work/stage/usr/local/lib; ln -sf
> libpython2.7.so.1 libpython2.7.so) =C2=A0fi =C2=A0fi; =C2=A0else true= ; =C2=A0fi
> warning: openssl 0x00000000 is too old for _hashlib
> ```
> root@gw:/usr/ports/lang/python27 # /usr/local/bin/openssl version
> OpenSSL 3.0.13 30 Jan 2024 (Library: OpenSSL 3.0.13 30 Jan 2024)
> root@gw:/usr/ports/lang/python27 # ls -al =C2=A0/usr/local/bin/openssl=
> -rwxr-xr-x =C2=A01 root wheel 828656 May 14 11:22 /usr/local/bin/opens= sl
> root@gw:/usr/ports/lang/python27 # ls -al /usr/bin/openssl
> -r-xr-xr-x =C2=A01 root wheel 970624 Nov 25 14:13 /usr/bin/openssl
> root@gw: /usr/ports/lang/python27=C2=A0 # /usr/bin/openssl version
> OpenSSL 3.0.12 24 Oct 2023 (Library: OpenSSL 3.0.12 24 Oct 2023)
>
> I have DEFAULT_VERSIONS+=3Dssl=3Dopenssl

Please try following patch.

diff --git a/lang/python27/Makefile b/lang/python27/Makefile
index 8aeab6d28008..245835f5be22 100644
--- a/lang/python27/Makefile
+++ b/lang/python27/Makefile
@@ -120,7 +120,8 @@ post-patch:
=C2=A0# openssl/opensslv.h so setup.py just detects the string as 00000000<= br> =C2=A0# However care should be taken for the OSVERSION. If OpenSSL 3.0.9 =C2=A0# lands later the OSVERSION string should be fixed accordingly
-.if ${OPSYS} =3D=3D FreeBSD && ${OSVERSION} >=3D 1400092 &&= amp; (${SSL_DEFAULT} =3D=3D base || ${SSL_DEFAULT:Mopenssl3*} )
+.if ${OPSYS} =3D=3D FreeBSD && ${OSVERSION} >=3D 1400092 &&= amp; (${SSL_DEFAULT} =3D=3D base || \
+=C2=A0 =C2=A0 =C2=A0 =C2=A0${SSL_DEFAULT} =3D=3D openssl || ${SSL_DEFAULT:= Mopenssl3*} )
=C2=A0 =C2=A0 =C2=A0 =C2=A0 @${REINPLACE_CMD} -e 's|00907000|00000000|&= #39; \
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ${WRKSRC}/setup.py<= br> =C2=A0.endif

Regards.

---
Yasuhiro Kimura

Thank you. I applied this = patch, but the installation still fails somehow:

[snip]<= /div>
running install_scripts
copying build/scripts-2.7/idle2.7 ->= ; /usr/ports/lang/python27/work/stage/usr/local/bin
copying build/script= s-2.7/pydoc2.7 -> /usr/ports/lang/python27/work/stage/usr/local/bin
c= opying build/scripts-2.7/2to3-2.7 -> /usr/ports/lang/python27/work/stage= /usr/local/bin
changing mode of /usr/ports/lang/python27/work/stage/usr/= local/bin/idle2.7 to 755
changing mode of /usr/ports/lang/python27/work/= stage/usr/local/bin/pydoc2.7 to 755
changing mode of /usr/ports/lang/pyt= hon27/work/stage/usr/local/bin/2to3-2.7 to 755
running install_egg_info<= br>Writing /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-= dynload/Python-2.7.18-py2.7.egg-info
rm /usr/ports/lang/python27/work/st= age/usr/local/lib/python2.7/lib-dynload/_sysconfigdata.py*
install =C2= =A0-m 0644 ./Misc/python.man =C2=A0/usr/ports/lang/python27/work/stage/usr/= local/share/man/man1/python2.7.1
if test "xno" !=3D "xno&= quot; =C2=A0; then =C2=A0case no in =C2=A0upgrade) ensurepip=3D"--alti= nstall --upgrade --no-default-pip" ;; =C2=A0install|*) ensurepip=3D&qu= ot;--altinstall --no-default-pip" ;; =C2=A0esac; =C2=A0LD_LIBRARY_PATH= =3D/usr/ports/lang/python27/work/Python-2.7.18 ./python -E -m ensurepip =C2= =A0$ensurepip --root=3D/usr/ports/lang/python27/work/stage/ ; =C2=A0fi
f= or i in /usr/ports/lang/python27/work/stage/usr/local/lib/python2.7/lib-dyn= load/*.so; do =C2=A0/usr/bin/strip $i; done =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Strip shared exten= sions
install =C2=A0-m 0644 /usr/ports/lang/python27/work/Python-2.7.18/= Tools/gdb/libpython.py =C2=A0/usr/ports/lang/python27/work/stage/usr/local/= lib/libpython2.7.so.1-gdb.py
=3D=3D=3D=3D> Compressing man pages (compress-man)
root@gw:/u= sr/ports/lang/python27 # =C2=A0find work/stage -name "_hashlib.so"= ;
work/stage/usr/local/lib/python2.7/lib-dynload/_hashlib.so

root= @gw:/usr/ports/lang/python27 # make install
=3D=3D=3D> =C2=A0Installi= ng for python27-2.7.18
=3D=3D=3D> =C2=A0Checking if python27 is alrea= dy installed
=3D=3D=3D> =C2=A0 Registering installation for python27-= 2.7.18
pkg-static: Unable to access file /usr/ports/lang/python27/work/s= tage//lib/python2.7/lib-dynload/_hashlib.so:No such file or directory
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0^^^ why is it that usr/local is not showing here?
*** Error= code 1

Stop.
make: stopped in /usr/ports/lang/python27
root@g= w:/usr/ports/lang/python27 #


--
<= /div> --00000000000099e5720618692a75--