Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 772727
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T18:50:52+00:00 2026-05-14T18:50:52+00:00

I’m trying to build a debug version of rtl140.bpl to make debugging apps with

  • 0

I’m trying to build a debug version of rtl140.bpl to make debugging apps with runtime packages easier. I built the DPK and ran DCC32 on it, and it gets a ways in, then dies.

C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\source\Win32\rtl\sys\Variants.pas(1072) Fatal: F2092 Program or unit ‘Variants’ recursively uses itself

But looking at Variants.pas, I can’t see how. It only uses SysUtils and Types in the interface section, and neither of those use Variants, or use anything that uses Variants.

Does anyone have any idea why this is breaking?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T18:50:53+00:00Added an answer on May 14, 2026 at 6:50 pm

    This is one of the main reasons why we (the RAD Studio team) do not recommend rebuilding the core rtl package. It needs to be done very carefully and the units need to be listed in the contains section in a specific order.

    Variants is a bit of a “bastard” unit. The compiler has specific knowledge of it such that when it sees the use of the Variant type, it will automatically add Variants to the uses list in order to ensure the actual RTL support for the Variant type is present. System.pas defers most all variant operations to the Variants unit, but since System cannot use any other units other than SysInit (which is also a very special unit), the compiler has to get involved.

    At this time, I don’t have any specific suggestions to make this work, other than try to rearrange the contains list in the .dpk and try again. Here’s the contains list from the rtl.dpk that we used to build that package:

    Variants in 'sys\Variants.pas',
    VarUtils in 'sys\VarUtils.pas',
    SysConst in 'sys\SysConst.pas',
    SysUtils in 'sys\SysUtils.pas',
    SyncObjs in 'common\SyncObjs.pas',
    Types in 'sys\Types.pas',
    VCLCom in 'common\VCLCom.pas',
    ComConst in 'common\ComConst.pas',
    ComObj in 'common\ComObj.pas',
    ComObjWrapper in 'common\ComObjWrapper.pas',
    RTLConsts in 'common\RTLConsts.pas',
    Contnrs in 'common\Contnrs.pas',
    ConvUtils in 'common\ConvUtils.pas',
    DateUtils in 'common\DateUtils.pas',
    IniFiles in 'common\IniFiles.pas',
    Masks in 'common\Masks.pas',
    Math in 'common\Math.pas',
    Registry in 'common\Registry.pas',
    StdConvs in 'common\StdConvs.pas',
    StdVCL in 'common\StdVCL.pas',
    StrUtils in 'common\StrUtils.pas',
    TypInfo in 'common\TypInfo.pas',
    VarConv in 'common\VarConv.pas',
    VarCmplx in 'common\VarCmplx.pas',
    Classes in 'common\Classes.pas',
    MaskUtils in 'common\MaskUtils.pas',
    HelpIntfs in 'common\HelpIntfs.pas',
    ScktComp in 'common\ScktComp.pas',
    AccCtrl in 'win\AccCtrl.pas',
    AclAPI in 'win\AclAPI.pas',
    ActiveX in 'win\ActiveX.pas',
    ComSvcs in 'win\ComSvcs.pas',
    ADOInt in 'win\ADOInt.pas',
    AspTlb in 'win\AspTlb.pas',
    COMAdmin in 'win\COMAdmin.pas',
    CommCtrl in 'win\CommCtrl.pas',
    CommDlg in 'win\CommDlg.pas',
    Cpl in 'win\Cpl.pas',
    DDEml in 'win\DDEml.pas',
    Dlgs in 'win\Dlgs.pas',
    DwmApi in 'win\DwmApi.pas',
    FlatSB in 'win\FlatSB.pas',
    ImageHlp in 'win\ImageHlp.pas',
    Imm in 'win\Imm.pas',
    Isapi in 'win\Isapi.pas',
    Isapi2 in 'win\Isapi2.pas',
    LZExpand in 'win\LZExpand.pas',
    Mapi in 'win\Mapi.pas',
    Messages in 'win\Messages.pas',
    MMSystem in 'win\MMSystem.pas',
    msxml in 'win\msxml.pas',
    Mtx in 'win\Mtx.pas',
    MultiMon in 'win\MultiMon.pas',
    Nb30 in 'win\Nb30.pas',
    Ns30Fix in 'win\Ns30Fix.pas',
    Ns35Fix in 'win\Ns35Fix.pas',
    Ns36Fix in 'win\Ns36Fix.pas',
    Nsapi in 'win\Nsapi.pas',
    ObjComAuto in 'common\ObjComAuto.pas',
    ObjAuto in 'common\ObjAuto.pas',
    OleDB in 'win\OleDB.pas',
    OleDlg in 'win\OleDlg.pas',
    OpenGL in 'win\OpenGL.pas',
    oleacc in 'win\oleacc.pas',
    Penwin in 'win\Penwin.pas',
    PsAPI in 'win\PsAPI.pas',
    RegStr in 'win\RegStr.pas',
    RichEdit in 'win\RichEdit.pas',
    ShellAPI in 'win\ShellAPI.pas',
    SHFolder in 'win\SHFolder.pas',
    ShlObj in 'win\ShlObj.pas',
    ShLwApi in 'win\ShLwApi.pas',
    StrHlpr in 'sys\StrHlpr.pas',
    TlHelp32 in 'win\TlHelp32.pas',
    UrlMon in 'win\UrlMon.pas',
    UxTheme in 'win\UxTheme.pas',
    VarHlpr in 'sys\VarHlpr.pas',
    WideStrings in 'common\WideStrings.pas',
    WideStrUtils in 'common\WideStrUtils.pas',
    windows in 'win\windows.pas',
    winInet in 'win\winInet.pas',
    Winsafer in 'win\Winsafer.pas',
    WinSock in 'win\WinSock.pas',
    winSpool in 'win\winSpool.pas',
    winSvc in 'win\winSvc.pas',
    CorError in 'win\CorError.pas',
    CorHdr in 'win\CorHdr.pas',
    Cor in 'win\Cor.pas',
    DXTypes in 'win\DXTypes.pas',
    DXFile in 'win\DXFile.pas',
    DxDiag in 'win\DxDiag.pas',
    D3DX8 in 'win\D3DX8.pas',
    D3DX9 in 'win\D3DX9.pas',
    Direct3D in 'win\Direct3D.pas',
    Direct3D8 in 'win\Direct3D8.pas',
    DX7toDX8 in 'win\DX7toDX8.pas',
    Direct3D9 in 'win\Direct3D9.pas',
    DirectDraw in 'win\DirectDraw.pas',
    DirectShow9 in 'win\DirectShow9.pas',
    DirectInput in 'win\DirectInput.pas',
    DirectSound in 'win\DirectSound.pas',
    DirectPlay8 in 'win\DirectPlay8.pas',
    DirectMusic in 'win\DirectMusic.pas',
    WMF9 in 'win\WMF9.pas',
    ZLibConst in 'common\ZLibConst.pas',
    ZLib in 'common\ZLib.pas',
    Character in 'common\Character.pas',
    Generics.Defaults in 'common\Generics.Defaults.pas',
    Generics.Collections in 'common\Generics.Collections.pas',
    Rtti in 'common\Rtti.pas',
    TimeSpan in 'common\TimeSpan.pas',
    Diagnostics in 'common\Diagnostics.pas',
    AnsiStrings in 'common\AnsiStrings.pas',
    TpcShrd in 'win\TpcShrd.pas',
    RtsCom in 'win\RtsCom.pas',
    MsInkAut in 'win\MsInkAut.pas',
    MsInkAut15 in 'win\MsInkAut15.pas',
    Manipulations in 'win\Manipulations.pas',
    IOUtils in 'common\IOUtils.pas',
    D2D1 in 'win\D2D1.pas',
    DxgiFormat in 'win\DxgiFormat.pas',
    Wincodec in 'win\Wincodec.pas',
    KnownFolders in 'win\KnownFolders.pas',
    ObjectArray in 'win\ObjectArray.pas',
    PropSys in 'win\PropSys.pas',
    PropKey in 'win\PropKey.pas',
    StructuredQuery in 'win\StructuredQuery.pas',
    StructuredQueryCondition in 'win\StructuredQueryCondition.pas'; 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.