Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2025-06

cnetdb.pp Compile Error on both trunk and stable (MacOSX aarch64)

2 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Ring

When trying to build fpc (with fpcupdeluxe) I get the following error for both Trunk and Stable(!!) version of fpc:

Compiling ./fcl-net/src/cnetdb.pp

cnetdb.pp(240,2) Error: User defined: fatal 'Please consult the netdb.h
file for your system to determine the order of ai_addr and ai_canonname'
cnetdb.pp(320,1) Fatal: There were 1 errors compiling module, stopping

Fatal: Compilation aborted

problem is that none of the defines matches:

{$if defined(LINUX) or defined(OPENBSD)}
{$define FIRST_ADDR_THEN_CANONNAME}
{$endif}
{$if defined(FREEBSD) or defined(NETBSD) or defined(DRAGONFLY) or
defined(SOLARIS) or defined(ANDROID)}
{$define FIRST_CANONNAME_THEN_ADDR}
{$endif}
{$if not defined(FIRST_CANONNAME_THEN_ADDR) and not
defined(FIRST_ADDR_THEN_CANONNAME)}
{$error fatal 'Please consult the netdb.h file for your system to
determine the order of ai_addr and ai_canonname'}
{$endif}

Any help appreciated,

Michael

Reply by email

Jonas Maebe
to Michael Ring
Michael Ring wrote 26 lines
When trying to build fpc (with fpcupdeluxe) I get the following error for both Trunk and Stable(!!) version of fpc: Compiling ./fcl-net/src/cnetdb.pp cnetdb.pp(240,2) Error: User defined: fatal 'Please consult the netdb.h file for your system to determine the order of ai_addr and ai_canonname' cnetdb.pp(320,1) Fatal: There were 1 errors compiling module, stopping Fatal: Compilation aborted problem is that none of the defines matches: {$if defined(LINUX) or defined(OPENBSD)} {$define FIRST_ADDR_THEN_CANONNAME} {$endif} {$if defined(FREEBSD) or defined(NETBSD) or defined(DRAGONFLY) or defined(SOLARIS) or defined(ANDROID)} {$define FIRST_CANONNAME_THEN_ADDR} {$endif} {$if not defined(FIRST_CANONNAME_THEN_ADDR) and not defined(FIRST_ADDR_THEN_CANONNAME)} {$error fatal 'Please consult the netdb.h file for your system to determine the order of ai_addr and ai_canonname'} {$endif}

cnetdb is not enabled for Darwin in the official source/repo. So that sounds like a bad/incomplete patch that fpcupdeluxe applies.

Jonas

Reply by email