Package Never-build [xxx] needs to be recompiled / AGREE THE VIOLATION [Delphi Documentation]

I just upgraded to Delphi XE7. Now a package that honors XE perfectly no longer compiles.

I have package B which requires package A which has ImplicitBuild set to OFF. First, I compiled and installed package A. Then I tried to compile package B, but the compiler says:

[dcc32 fatal error] A.dpk (39): E2225 The never-generated package "A" must be recompiled.

[dcc32 Fatal Error] B.dpk (34): E2202 The required package "A" was not found.

Obviously, package A was found as the compiler knows its contents (it knows ImplicitBuild is OFF). Also, obviously I added the path for package A to Library Path.

If I remove the ImplicitBuild directive from package A, the compiler just says:

'The required package' A 'was not found.'

The process monitor shows an interesting entry:

C: \ Users \ trei \ Documents \ Embarcadero \ Studio \ 15.0 \ Imports \ A.dcp <- PATH NOT FOUND

C: \ Users \ Public \ Documents \ Embarcadero \ Studio \ 15.0 \ Bpl \ A.bpl <- VIOLATION OF VIOLATION

The folder '15 .0 'is missing in' C: \ Users \ trei \ Documents \ Embarcadero \ Studio \ '.

  • Why was A.dpk not found?
  • Why does Delphi want to recompile package A anyway?
  • Why is Delphi looking for a DCP file in the Import folder? DCP is stored in 'c: \ Users \ Public \ Documents \ Embarcadero \ Studio \ 15.0 \ Dcp \ A.dcp'

Fun fact:
There was a bug related to this post (bug # 109584), but it was flagged as fixed in XE4. http://qc.embarcadero.com/wc/qcmain.aspx?d=109584
Regression?

+2


source to share


1 answer


The PATH env variable must include the bpl folder. The setup usually adds this folder for you. If it doesn't, then Delphi won't find bpls because they are loaded as dlls. LoadLibrary

doesn't care about the package's output directory. But there is a limitation on the size of the path variable. So this might explain why this is missing from your fresh Delphi installation.

In the latest Delphi versions, you can go to Tools -> Options -> Environment Variables and add a user override path

instead of changing the env path: C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl;C:\Program Files (x86)\Embarcadero\Studio\15.0\bin;C:\Program Files (x86)\Embarcadero\Studio\15.0\bin64;C:\Users\Public\Documents\Embarcadero\Studio\15.0\Bpl\Win64;C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBaseXE3\win32_togo;C:\Users\Public\Documents\Embarcadero\InterBase\redist\InterBaseXE3\win64_togo;$(PATH)



The $ (PATH) at the end is used as a placeholder for the global PATH env var.

This reduces the size of the PATH env var, especially if you have many Delphi versions installed.

+3


source







All Articles