Changeset 45b2abd3 for general


Ignore:
Timestamp:
03/16/2024 12:58:58 PM (2 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
lazarus, trunk
Children:
c1325868
Parents:
a4da374
git-author:
Xi Ruoyao <xry111@…> (03/15/2024 02:54:40 PM)
git-committer:
Xi Ruoyao <xry111@…> (03/16/2024 12:58:58 PM)
Message:

rust: Add sqlite as recommended and allow building cargo with system sqlite

Just observed when cargo was built we were spending minutes building a
bundled copy of sqlite. Let's stop it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • general/prog/rust.xml

    ra4da374 r45b2abd3  
    171171    <bridgehead renderas="sect4">Recommended</bridgehead>
    172172    <para role="recommended">
    173       <xref linkend="libssh2"/> and
     173      <xref linkend="libssh2"/>,
    174174      <xref linkend="llvm"/>
    175175      (built with -DLLVM_LINK_LLVM_DYLIB=ON so that rust can link to
    176       system LLVM instead of building its shipped version)
     176      system LLVM instead of building its shipped version), and
     177      <xref linkend="sqlite"/>
    177178    </para>
    178179
     
    363364
    364365<screen><userinput>{ [ ! -e /usr/include/libssh2.h ] ||
    365   export LIBSSH2_SYS_USE_PKG_CONFIG=1; } &amp;&amp;
     366  export LIBSSH2_SYS_USE_PKG_CONFIG=1; }    &amp;&amp;
     367{ [ ! -e /usr/include/sqlite3.h ] ||
     368  export LIBSQLITE3_SYS_USE_PKG_CONFIG=1; } &amp;&amp;
    366369python3 x.py build</userinput></screen>
    367370
     
    450453        If <command>sudo</command> or <command>su</command> is invoked for
    451454        switching to the &root; user, ensure
    452         <envar>LIBSSH2_SYS_USE_PKG_CONFIG</envar> is correctly passed or the
    453         following command may completely rebuild this package.  For
    454         <command>sudo</command>, use the
    455         <option>--preserve-env=LIBSSH2_SYS_USE_PKG_CONFIG</option> option.
    456         For <command>su</command>, do <emphasis>not</emphasis> use the
    457         <option>-</option> or <option>--login</option> options.
     455        <envar>LIBSSH2_SYS_USE_PKG_CONFIG</envar> and
     456        <envar>LIBSQLITE3_SYS_USE_PKG_CONFIG</envar> are correctly passed or
     457        the following command may rebuild <command>cargo</command> with
     458        shipped copies of libssh2 and sqlite.  For <command>sudo</command>,
     459        use the
     460        <option>--preserve-env=LIB{SSH2,SQLITE3}_SYS_USE_PKG_CONFIG</option>
     461        option.  For <command>su</command>, do <emphasis>not</emphasis> use
     462        the <option>-</option> or <option>--login</option> options.
    458463      </para>
    459464    </note>
     
    481486
    482487    <para>
    483       Finally, unset the <envar>LIBSSH2_SYS_USE_PKG_CONFIG</envar> variable:
    484     </para>
    485 
    486 <screen><userinput>unset LIBSSH2_SYS_USE_PKG_CONFIG</userinput></screen>
     488      Finally, unset the exported environment variables:
     489    </para>
     490
     491<screen><userinput>unset LIB{SSH2,SQLITE3}_SYS_USE_PKG_CONFIG</userinput></screen>
    487492
    488493  </sect2>
     
    548553      <command>export LIBSSH2_SYS_USE_PKG_CONFIG=1</command>: Allow
    549554      <command>cargo</command> to link to system libssh2.
     555    </para>
     556
     557    <!-- src/tools/cargo/Cargo.toml is specifying "bundled" as the
     558         upstream is suggesting to avoid issues building for Windoge.
     559         We don't care about Windoge so override this if we have
     560         system sqlite3.  -->
     561    <para>
     562      <command>export LIBSQLITE3_SYS_USE_PKG_CONFIG</command>: Allow
     563      <command>cargo</command> to link to system sqlite.
    550564    </para>
    551565
Note: See TracChangeset for help on using the changeset viewer.