[fpc-devel] Fix for an annoying error

Bart bartjunk64 at gmail.com
Tue Nov 30 19:34:47 CET 2021


On Tue, Nov 30, 2021 at 8:33 AM J. Gareth Moreton via fpc-devel
<fpc-devel at lists.freepascal.org> wrote:

> For a while now I've had problems building the i386-win32 compiler under
> my 64-bit Windows system because one of the packages fails to build -
> this is because it thinks a statically-imported DLL (done through
> $linklib) is invalid. Technically it is, but this system DLL (for me, it
> is named COMMON.DLL and is in one of my system folders, so it's not
> something I can safely modify or replace) is for 64-bit Windows and is
> not recognised when building for 32-bit, and the only 'fix' is to
> comment out the culprit $linklib line in the package source.

I have had exactly the same problem on Win64 building 32-bit fpc.
The culprit was the file packages\oracle\src\oraoci.pp

As it turned out the common.dll was in the wrong folder (64-bit in a
32-bit folder or vice-versa).
Most likely by a buggy installer of sorts.
I have been fiddling with the system and found a way to remove that
dll, not even sure how I succeeded.

After disabling the dll and then removing it my Win10-64 just runs fine.
And compiling fpc (32-bit) was OK again.

Before I succeeded in that, I even wrote a simple program that altered
packages\oracle\src\oraoci.pp so it would build correctly and the
restore it after build (I was getting a bit desperate and frustrated).

-- 
Bart


More information about the fpc-devel mailing list