Обсуждение: compiling libpq.dll with Borland C++, is it possible?

Поиск
Список
Период
Сортировка

compiling libpq.dll with Borland C++, is it possible?

От
Tony Caduto
Дата:
Hi,
I am trying to compile my own copy of libpq.dll using bcc32.exe, the
docs say it is possible, but I get a error when it tries to compile dirent.c
Has anyone been able to do this?


C:\postgresql-8.3.5\src\interfaces\libpq>make -N -DCFG=Release /f bcc32.mak
MAKE Version 5.3  Copyright (c) 1987, 2008 CodeGear
Building the Win32 DLL and Static Library...

Configuration "Release"

        bcc32.exe @MAKE0014.@@@
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
..\..\port\dirent.c:
Error E2451 ..\..\port\dirent.c 35: Undefined symbol
'INVALID_FILE_ATTRIBUTES' in function opendir
Error E2451 ..\..\port\dirent.c 52: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 53: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 59: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 60: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 60: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 61: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 61: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 62: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 64: Undefined symbol 'dirname' in
function opendir
Error E2451 ..\..\port\dirent.c 65: Undefined symbol 'handle' in
function opendir
Error E2451 ..\..\port\dirent.c 66: Undefined symbol 'ret' in function
opendir
Error E2451 ..\..\port\dirent.c 67: Undefined symbol 'ret' in function
opendir
Error E2451 ..\..\port\dirent.c 77: Undefined symbol 'handle' in
function readdir
Error E2451 ..\..\port\dirent.c 79: Undefined symbol 'handle' in
function readdir
Error E2451 ..\..\port\dirent.c 79: Undefined symbol 'dirname' in
function readdir
Error E2451 ..\..\port\dirent.c 80: Undefined symbol 'handle' in
function readdir
Error E2451 ..\..\port\dirent.c 88: Undefined symbol 'handle' in
function readdir
Error E2451 ..\..\port\dirent.c 100: Undefined symbol 'ret' in function
readdir
Error E2451 ..\..\port\dirent.c 102: Undefined symbol 'ret' in function
readdir
Error E2451 ..\..\port\dirent.c 102: Undefined symbol 'ret' in function
readdir
Error E2451 ..\..\port\dirent.c 103: Undefined symbol 'ret' in function
readdir
Error E2451 ..\..\port\dirent.c 109: Undefined symbol 'handle' in
function closedir
Error E2451 ..\..\port\dirent.c 110: Undefined symbol 'handle' in
function closedir
Error E2451 ..\..\port\dirent.c 111: Undefined symbol 'dirname' in
function closedir
Error E2228 ..\..\port\dirent.c 111: Too many error or warning messages
in function closedir
*** 26 errors in Compile ***

** error 1 ** deleting ".\Release\dirent.obj"

Re: compiling libpq.dll with Borland C++, is it possible?

От
Bruce Momjian
Дата:
Tony Caduto wrote:
> Hi,
> I am trying to compile my own copy of libpq.dll using bcc32.exe, the
> docs say it is possible, but I get a error when it tries to compile dirent.c
> Has anyone been able to do this?

Oh, that's a shame.  We usually get feedback once per major release from
Borland CC users and adjust things so they work, but then at some later
point things can break and there are no Borland CC users around to do
testing.

Looking at the errors I see a 'DIR' structure being defined:

    DIR        *d;

and the errors are in referencing fields in the structure:

    d->dirname = malloc(strlen(dirname) + 4);

So would you check to see what fields are defined in your DIR structure.

Also, I don't see this file as being changed for a few years so I am
confused why the compile is failing for you and not for previous Borland
CC users.

---------------------------------------------------------------------------


>
>
> C:\postgresql-8.3.5\src\interfaces\libpq>make -N -DCFG=Release /f bcc32.mak
> MAKE Version 5.3  Copyright (c) 1987, 2008 CodeGear
> Building the Win32 DLL and Static Library...
>
> Configuration "Release"
>
>         bcc32.exe @MAKE0014.@@@
> Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
> ..\..\port\dirent.c:
> Error E2451 ..\..\port\dirent.c 35: Undefined symbol
> 'INVALID_FILE_ATTRIBUTES' in function opendir
> Error E2451 ..\..\port\dirent.c 52: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 53: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 59: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 60: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 60: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 61: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 61: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 62: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 64: Undefined symbol 'dirname' in
> function opendir
> Error E2451 ..\..\port\dirent.c 65: Undefined symbol 'handle' in
> function opendir
> Error E2451 ..\..\port\dirent.c 66: Undefined symbol 'ret' in function
> opendir
> Error E2451 ..\..\port\dirent.c 67: Undefined symbol 'ret' in function
> opendir
> Error E2451 ..\..\port\dirent.c 77: Undefined symbol 'handle' in
> function readdir
> Error E2451 ..\..\port\dirent.c 79: Undefined symbol 'handle' in
> function readdir
> Error E2451 ..\..\port\dirent.c 79: Undefined symbol 'dirname' in
> function readdir
> Error E2451 ..\..\port\dirent.c 80: Undefined symbol 'handle' in
> function readdir
> Error E2451 ..\..\port\dirent.c 88: Undefined symbol 'handle' in
> function readdir
> Error E2451 ..\..\port\dirent.c 100: Undefined symbol 'ret' in function
> readdir
> Error E2451 ..\..\port\dirent.c 102: Undefined symbol 'ret' in function
> readdir
> Error E2451 ..\..\port\dirent.c 102: Undefined symbol 'ret' in function
> readdir
> Error E2451 ..\..\port\dirent.c 103: Undefined symbol 'ret' in function
> readdir
> Error E2451 ..\..\port\dirent.c 109: Undefined symbol 'handle' in
> function closedir
> Error E2451 ..\..\port\dirent.c 110: Undefined symbol 'handle' in
> function closedir
> Error E2451 ..\..\port\dirent.c 111: Undefined symbol 'dirname' in
> function closedir
> Error E2228 ..\..\port\dirent.c 111: Too many error or warning messages
> in function closedir
> *** 26 errors in Compile ***
>
> ** error 1 ** deleting ".\Release\dirent.obj"
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +

Re: compiling libpq.dll with Borland C++, is it possible?

От
Alvaro Herrera
Дата:
Tony Caduto wrote:
> Hi,
> I am trying to compile my own copy of libpq.dll using bcc32.exe, the
> docs say it is possible, but I get a error when it tries to compile
> dirent.c

How hard would it be to set up a buildfarm member that exercises the
Borland compiler?  If it only compiles client code, maybe it's possible
to compile the rest of the stuff with MSVC or mingw.

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.

Re: compiling libpq.dll with Borland C++, is it possible?

От
Magnus Hagander
Дата:
Alvaro Herrera wrote:
> Tony Caduto wrote:
>> Hi,
>> I am trying to compile my own copy of libpq.dll using bcc32.exe, the
>> docs say it is possible, but I get a error when it tries to compile
>> dirent.c
>
> How hard would it be to set up a buildfarm member that exercises the
> Borland compiler?  If it only compiles client code, maybe it's possible
> to compile the rest of the stuff with MSVC or mingw.

It's a completely separate environment. Like the standalone "win32.mak"
build system for msvc, it's not included in the buildfarm at all. So
it'd take a lot of work, I think.

//Magnus

Re: compiling libpq.dll with Borland C++, is it possible?

От
Martin Gainty
Дата:
think you'll have to contact phillipe kahn for that library

any library that says 'runtime' comes from the OS

anything else you'll have to <re>create from whatever any packages that come with the OS' compiler

Martin Gainty
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.




> Date: Fri, 21 Nov 2008 21:22:11 +0100
> From: magnus@hagander.net
> To: alvherre@commandprompt.com
> CC: tony_caduto@amsoftwaredesign.com; pgsql-general@postgresql.org
> Subject: Re: [GENERAL] compiling libpq.dll with Borland C++, is it possible?
>
> Alvaro Herrera wrote:
> > Tony Caduto wrote:
> >> Hi,
> >> I am trying to compile my own copy of libpq.dll using bcc32.exe, the
> >> docs say it is possible, but I get a error when it tries to compile
> >> dirent.c
> >
> > How hard would it be to set up a buildfarm member that exercises the
> > Borland compiler? If it only compiles client code, maybe it's possible
> > to compile the rest of the stuff with MSVC or mingw.
>
> It's a completely separate environment. Like the standalone "win32.mak"
> build system for msvc, it's not included in the buildfarm at all. So
> it'd take a lot of work, I think.
>
> //Magnus
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general


Get more done, have more fun, and stay more connected with Windows Mobile®. See how.