Re: cpan install DBI fails

[email protected] ("C.J. Collier") Sun, 30 Jun 2024 00:43:29 -0700
Newsgroups perl.dbi.users
Message-ID <CAJj0Ousr8r8w+Lzcc=d80ELfR=ULj6aCUKRqexBgke3NJ1koAw@mail.gmail.com>
--000000000000b10c65061c16a3c6
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi Dennis,

You should be able to get cpanm by

sudo apt-get install cpanminus

Does the version of DBI.pm you get from

sudo apt-get install libdbi-perl

Work for your needs?  You should just be able to install the system
package.

The build problems you're seeing from cpan are likely related to arm being
a less popular platform to build the module source on.

Can you share your full build log as an attached file?

C.J.



On Sat, Jun 29, 2024, 19:09 Dennis German <[email protected]>
wrote:

> Thank you very much for your prompt replies.
>
> 1) platforms:     (sorry details were in my original .original email)
>    1a)  My linux (mint)
>
>     1b) Raspberry Pi Linux dapi2 5.10.103+ #1529 Tue Mar 8 12:19:18 GMT
> *2022* armv6l GNU/Linux; cpan (v2.20)
>
> After the gcc *warnings:*
>
> chmod 755 blib/arch/auto/DBI/DBI.so
> chmod: cannot access '*blib/arch/auto/DBI/DBI.so': No such file* or
> directory
> make: *** [Makefile:655: blib/arch/auto/DBI/DBI.so] Error 1
>   TIMB/DBI-1.643.tar.gz
>   /usr/bin/make -- *NOT OK*
>
>     1b) hosted at goDaddy Linux p3plzcpnl505092.prod.phx3.secureserver.ne=
t
> 4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC 2024 x86_=
64
> x86_64 x86_64 GNU/Linux
>
>      After the gcc *warnings:*
>
> rm -f blib/arch/auto/DBI/DBI.so
> gcc  -lpthread -shared -Wl,-z,relro -Wl,-z,now
> -specs=3D/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib
> -fstack-protector-strong  DBI.o  -o blib/arch/auto/DBI/DBI.so  \
>     -lperl   \
>
>
> blib            (ODD?)
> ex
> lib
> t
> chmod 755 blib/arch/auto/DBI/DBI.so
> chmod: cannot access '*blib/arch/auto/DBI/DBI.so': No such file* or
> directory
> make: *** [Makefile:655: blib/arch/auto/DBI/DBI.so] Error 1
>   TIMB/DBI-1.643.tar.gz
>   /usr/bin/make PREFIX=3D/home/xgmkbck7ggwp/perl/usr
> PREFIX=3D/home/xgmkbck7ggwp/perl/usr -- *NOT OK*
>
> 1c) raspberry Pi
>
> *answer*:/home/dgerman > uname -a
> Linux answer 6.6.31+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.31-1+rpt1 (*2024*-05=
-29)
> armv7l GNU/Linux
> answer:/home/dgerman > cpan
> Loading internal logger. Log::Log4perl recommended for better logging
>
> Many addtional warning "notes'
>
> ending with
>
> rm -f blib/arch/auto/DBI/DBI.so
> arm-linux-gnueabihf-gcc  -shared -L/usr/local/lib
> -fstack-protector-strong  DBI.o  -o blib/arch/auto/DBI/DBI.so  \
>       \
>
> n 29 22:00 blib
> n 29 22:00 ex
> n 29 22:00 lib
> n 29 22:00 t
> chmod 755 blib/arch/auto/DBI/DBI.so
> /bin/chmod: cannot access 'blib/arch/auto/DBI/DBI.so': No such file or
> directory
> 'blib/arch/auto/DBI/DBI.so' could not be accessed
> make: *** [Makefile:657: blib/arch/auto/DBI/DBI.so] Error 1
>   TIMB/DBI-1.643.tar.gz
>   /usr/bin/make -- NOT OK
>
> These systems fail in the same manner
>
> 2) I don't find cpan*m.*
>
> 3) No tests were run
> On 6/29/24 18:48, James E Keenan wrote:
>
> On 6/29/24 18:22, C.J. Collier wrote:
>
>
> Can you tell us about your environment?  On what system are you attemptin=
g
> to install?  Why aren't you using cpanm or your system packages?
>
> On Sat, Jun 29, 2024, 15:16 Dennis German <[email protected]
> <mailto:[email protected]> <[email protected]>>
> wrote:
>
>
>
>     I am attempting to *
>     *
>
>     *cpan
>     install DBI*
>
>     results in:
>
>     ...
>     *In file included from Perl.xs:7:
>     Perl.xs: In function =E2=80=98dbi_get_state=E2=80=99:
>     DBIXS.h:498:32: *warning*: cast between incompatible function types
>     from =E2=80=98void (*)(PerlInterpreter *, CV *)=E2=80=99 {aka =E2=80=
=98void (*)(struct
>     interpreter *, struct cv *)=E2=80=99} to =E2=80=98dbistate_t ** (*)(P=
erlInterpreter
>     *)=E2=80=99 {aka =E2=80=98struct dbistate_st ** (*)(struct interprete=
r *)=E2=80=99}
>     [-Wcast-function-type]
>                   dbi_state_lval_p =3D
>     (_dbi_state_lval_t)CvXSUB(cv);               \
>                                      ^
>     DBIXS.h:506:27: note: in expansion of macro =E2=80=98_DBISTATE_DECLAR=
E_COMMON=E2=80=99
>       # define DBISTATE_DECLARE _DBISTATE_DECLARE_COMMON
>                                 ^~~~~~~~~~~~~~~~~~~~~~~~
>     Perl.xs:13:1: note: in expansion of macro =E2=80=98DBISTATE_DECLARE=
=E2=80=99
>       DBISTATE_DECLARE;
>       ^~~~~~~~~~~~~~~~
>     "/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp"
> -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap
>     '/home/xgmkbck7ggwp/.cpan/build/DBI-1.643-1/typemap'  DBI.xs > DBI.xs=
c
>     mv DBI.xsc DBI.c*
>
>     Is this a problem on my end?
>
>
> What you have posted simply appears to be warnings emitted by your
> C-compiler when 'cpan' is running its 'make' phase.
> Behind the scene, what 'cpan' is doing (to over-simplify) is saying:
>
> $ perl Makefile.PL
> $ make
> $ make test
> $ make install
>
> Those warnings are being emitted in the 2nd step above.
> They are places where the maintainers of DBI should be touching up the
> C-level code, but they do not prevent DBI from building.
> Did you see any strings with 'error:' in them being emitted during
> 'make'?  I
> f 'make' completes successfully, 'cpan' then invokes 'make test' and 'mak=
e
> install'.
> Did you get any test failures?
>
> HTH
> Jim Keenan
>
>

--000000000000b10c65061c16a3c6
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><div dir=3D"auto">Hi Dennis,</div><div dir=3D"auto">=
<br></div><div dir=3D"auto">You should be able to get cpanm by</div><div di=
r=3D"auto"><br></div><div dir=3D"auto">sudo apt-get install cpanminus</div>=
<div dir=3D"auto"><br></div>Does the version of DBI.pm you get from<div dir=
=3D"auto"><br></div><div dir=3D"auto">sudo apt-get install libdbi-perl</div=
><div dir=3D"auto"><br></div><div dir=3D"auto">Work for your needs?=C2=A0 Y=
ou should just be able to install the system package.=C2=A0</div><div dir=
=3D"auto"><br></div><div dir=3D"auto">The build problems you&#39;re seeing =
from cpan are likely related to arm being a less popular platform to build =
the module source on.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Ca=
n you share your full build log as an attached file?</div><div dir=3D"auto"=
><br></div><div dir=3D"auto">C.J.</div><div dir=3D"auto"><br></div><br><br>=
<div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sat, Ju=
n 29, 2024, 19:09 Dennis German &lt;<a href=3D"mailto:DGerman@real-world-sy=
stems.com">[email protected]</a>&gt; wrote:<br></div><blockquo=
te class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px =
solid rgb(204,204,204);padding-left:1ex"><u></u>

 =20
   =20
 =20
  <div>
    <p>Thank you very much for your prompt replies.</p>
    <p>1) platforms:=C2=A0=C2=A0=C2=A0=C2=A0 (sorry details were in my orig=
inal .original
      email)<br>
      =C2=A0=C2=A0 1a)=C2=A0 My linux (mint) <br>
    </p>
    <p>=C2=A0=C2=A0=C2=A0 1b) Raspberry Pi L<font face=3D"Courier New, Cour=
ier, monospace">inux dapi2 5.10.103+
        #1529 Tue Mar 8 12:19:18 GMT <b>2022</b> armv6l GNU/Linux; cpan
        (v2.20)</font></p>
    <p>After the gcc <b>warnings:</b><br>
    </p>
    <blockquote>
      <p><font face=3D"Courier New, Courier, monospace">chmod 755
          blib/arch/auto/DBI/DBI.so<br>
          chmod: cannot access &#39;<b>blib/arch/auto/DBI/DBI.so&#39;: No s=
uch
            file</b> or directory<br>
          make: *** [Makefile:655: blib/arch/auto/DBI/DBI.so] Error 1<br>
          =C2=A0 TIMB/DBI-1.643.tar.gz<br>
          =C2=A0 /usr/bin/make -- <b>NOT OK</b></font><br>
      </p>
    </blockquote>
    <p>=C2=A0=C2=A0=C2=A0 1b) hosted at goDaddy Linux
      <a href=3D"http://p3plzcpnl505092.prod.phx3.secureserver.net" target=
=3D"_blank" rel=3D"noreferrer">p3plzcpnl505092.prod.phx3.secureserver.net</=
a>
      4.18.0-513.18.1.lve.2.el8.x86_64 #1 SMP Sat Mar 30 15:36:11 UTC
      2024 x86_64 x86_64 x86_64 GNU/Linux</p>
    <p>=C2=A0=C2=A0=C2=A0=C2=A0 After the gcc <b>warnings:</b></p>
    <blockquote>
      <p><font face=3D"Courier New, Courier, monospace">rm -f
          blib/arch/auto/DBI/DBI.so<br>
          gcc=C2=A0 -lpthread -shared -Wl,-z,relro -Wl,-z,now
          -specs=3D/usr/lib/rpm/redhat/redhat-hardened-ld -L/usr/local/lib
          -fstack-protector-strong=C2=A0 DBI.o=C2=A0 -o blib/arch/auto/DBI/=
DBI.so=C2=A0
          \<br>
          =C2=A0=C2=A0=C2=A0 -lperl=C2=A0=C2=A0 \<br>
          =C2=A0 <br>
          <br>
          blib=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 </fo=
nt>(ODD?)<font face=3D"Courier New, Courier, monospace"><br>
          ex<br>
          lib<br>
          t<br>
          chmod 755 blib/arch/auto/DBI/DBI.so<br>
          chmod: cannot access &#39;<b>blib/arch/auto/DBI/DBI.so&#39;: No s=
uch
            file</b> or directory<br>
          make: *** [Makefile:655: blib/arch/auto/DBI/DBI.so] Error 1<br>
          =C2=A0 TIMB/DBI-1.643.tar.gz<br>
          =C2=A0 /usr/bin/make PREFIX=3D/home/xgmkbck7ggwp/perl/usr
          PREFIX=3D/home/xgmkbck7ggwp/perl/usr -- <b>NOT OK</b></font></p>
    </blockquote>
    <p>1c) raspberry Pi <br>
    </p>
    <blockquote>
      <p><font face=3D"Courier New, Courier, monospace"><b>answer</b>:/home=
/dgerman
          &gt; uname -a<br>
          Linux answer 6.6.31+rpt-rpi-v7 #1 SMP Raspbian 1:6.6.31-1+rpt1
          (<b>2024</b>-05-29) armv7l GNU/Linux<br>
          answer:/home/dgerman &gt; cpan<br>
          Loading internal logger. Log::Log4perl recommended for better
          logging</font></p>
    </blockquote>
    <p>Many addtional warning <font face=3D"Courier New, Courier, monospace=
">&quot;notes&#39; <br>
      </font></p>
    <p><font face=3D"monospace">ending with</font></p>
    <blockquote>
      <p><font face=3D"Courier New, Courier, monospace">rm -f
          blib/arch/auto/DBI/DBI.so<br>
          arm-linux-gnueabihf-gcc=C2=A0 -shared -L/usr/local/lib
          -fstack-protector-strong=C2=A0 DBI.o=C2=A0 -o blib/arch/auto/DBI/=
DBI.so=C2=A0
          \<br>
          =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 \<br>
          =C2=A0 <br>
          n 29 22:00 blib<br>
          n 29 22:00 ex<br>
          n 29 22:00 lib<br>
          n 29 22:00 t<br>
          chmod 755 blib/arch/auto/DBI/DBI.so<br>
          /bin/chmod: cannot access &#39;blib/arch/auto/DBI/DBI.so&#39;: No=
 such
          file or directory<br>
          &#39;blib/arch/auto/DBI/DBI.so&#39; could not be accessed<br>
          make: *** [Makefile:657: blib/arch/auto/DBI/DBI.so] Error 1<br>
          =C2=A0 TIMB/DBI-1.643.tar.gz<br>
          =C2=A0 /usr/bin/make -- NOT OK</font><br>
        <br>
      </p>
    </blockquote>
    <p>These systems fail in the same manner<br>
    </p>
    <p>2) I don&#39;t find cpan<b>m.</b></p>
    <p>3) No tests were run<br>
    </p>
    <div>On 6/29/24 18:48, James E Keenan wrote:<br>
    </div>
    <blockquote type=3D"cite">On
      6/29/24 18:22, C.J. Collier wrote:
      <br>
      <blockquote type=3D"cite"><br>
        Can you tell us about your environment?=C2=A0 On what system are yo=
u
        attempting to install?=C2=A0 Why aren&#39;t you using cpanm or your
        system packages?
        <br>
        <br>
        On Sat, Jun 29, 2024, 15:16 Dennis German
        &lt;<a href=3D"mailto:[email protected]" target=3D"_bl=
ank" rel=3D"noreferrer">[email protected]</a>
        <a href=3D"mailto:[email protected]" target=3D"_blank"=
 rel=3D"noreferrer">&lt;mailto:[email protected]&gt;</a>&gt; w=
rote:
        <br>
        <br>
        <br>
        <br>
        =C2=A0=C2=A0=C2=A0 I am attempting to *
        <br>
        =C2=A0=C2=A0=C2=A0 *
        <br>
        <br>
        =C2=A0=C2=A0=C2=A0 *cpan
        <br>
        =C2=A0=C2=A0=C2=A0 install DBI*
        <br>
        <br>
        =C2=A0=C2=A0=C2=A0 results in:
        <br>
        <br>
        =C2=A0=C2=A0=C2=A0 ...
        <br>
        =C2=A0=C2=A0=C2=A0 *In file included from Perl.xs:7:
        <br>
        =C2=A0=C2=A0=C2=A0 Perl.xs: In function =E2=80=98dbi_get_state=E2=
=80=99:
        <br>
        =C2=A0=C2=A0=C2=A0 DBIXS.h:498:32: <font size=3D"4"><b>warning</b><=
/font>: cast
        between incompatible function types
        <br>
        =C2=A0=C2=A0=C2=A0 from =E2=80=98void (*)(PerlInterpreter *, CV *)=
=E2=80=99 {aka =E2=80=98void
        (*)(struct
        <br>
        =C2=A0=C2=A0=C2=A0 interpreter *, struct cv *)=E2=80=99} to =E2=80=
=98dbistate_t **
        (*)(PerlInterpreter
        <br>
        =C2=A0=C2=A0=C2=A0 *)=E2=80=99 {aka =E2=80=98struct dbistate_st ** =
(*)(struct interpreter *)=E2=80=99}
        <br>
        =C2=A0=C2=A0=C2=A0 [-Wcast-function-type]
        <br>
        =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 dbi_state_lval_p =3D
        <br>
        =C2=A0=C2=A0=C2=A0 (_dbi_state_lval_t)CvXSUB(cv);=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 \
        <br>
        =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 ^
        <br>
        =C2=A0=C2=A0=C2=A0 DBIXS.h:506:27: note: in expansion of macro
        =E2=80=98_DBISTATE_DECLARE_COMMON=E2=80=99
        <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0# define DBISTATE_DECLARE _DBISTATE_=
DECLARE_COMMON
        <br>
        =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 ^~~~~~~~~~~~~~~~~~~~~~~~
        <br>
        =C2=A0=C2=A0=C2=A0 Perl.xs:13:1: note: in expansion of macro =E2=80=
=98DBISTATE_DECLARE=E2=80=99
        <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0DBISTATE_DECLARE;
        <br>
        =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0^~~~~~~~~~~~~~~~
        <br>
        =C2=A0=C2=A0=C2=A0 &quot;/usr/bin/perl&quot;
        &quot;/usr/share/perl5/vendor_perl/ExtUtils/xsubpp&quot; =C2=A0=C2=
=A0=C2=A0 -typemap
        &#39;/usr/share/perl5/ExtUtils/typemap&#39; -typemap
        <br>
        =C2=A0=C2=A0=C2=A0 &#39;/home/xgmkbck7ggwp/.cpan/build/DBI-1.643-1/=
typemap&#39;=C2=A0 DBI.xs
        &gt; DBI.xsc
        <br>
        =C2=A0=C2=A0=C2=A0 mv DBI.xsc DBI.c*
        <br>
        <br>
        =C2=A0=C2=A0=C2=A0 Is this a problem on my end?
        <br>
        <br>
      </blockquote>
      <br>
      What you have posted simply appears to be warnings emitted by your
      C-compiler when &#39;cpan&#39; is running its &#39;make&#39; phase.=
=C2=A0 <br>
      Behind the scene, what &#39;cpan&#39; is doing (to over-simplify) is
      saying:
      <br>
      <br>
      $ perl Makefile.PL
      <br>
      $ make
      <br>
      $ make test
      <br>
      $ make install
      <br>
      <br>
      Those warnings are being emitted in the 2nd step above.=C2=A0 <br>
      They are places where the maintainers of DBI should be touching up
      the C-level code, but they do not prevent DBI from building.=C2=A0 <b=
r>
      Did you see any strings with &#39;error:&#39; in them being emitted d=
uring
      &#39;make&#39;?=C2=A0 I<br>
      f &#39;make&#39; completes successfully, &#39;cpan&#39; then invokes =
&#39;make test&#39;
      and &#39;make install&#39;.=C2=A0<br>
      Did you get any test failures?
      <br>
      <br>
      HTH
      <br>
      Jim Keenan
      <br>
    </blockquote>
  </div>

</blockquote></div></div></div>

--000000000000b10c65061c16a3c6--