View Issue Details

IDProjectCategoryView StatusLast Update
0031515FPCCompilerpublic2017-05-01 13:30
ReporterHeikoAssigned ToMarco van de Voort 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformDarwinOSMac OSOS Version10.11
Product Version3.0.1Product Build3.0.2 [2017/02/19] for x86_64 
Target VersionFixed in Version 
Summary0031515: wrong declaration of FPsysctl...
Descriptionsysctl.pp >

$ifdef FPC_USE_LIBC}
function FPsysctl (Name: pchar; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint; cdecl; external name 'sysctl';
function FPsysctlbyname (Name: pchar; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint; cdecl; external name 'sysctlbyname';
function FPsysctlnametomib (Name: pchar;mibp:pcint;sizep:psize_t):cint; cdecl; external name 'sysctltomib';
{$else}
function FPsysctl (Name: pchar; namelen:cuint; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint;
function FPsysctlbyname (Name: pchar; oldp:pointer;oldlenp:psize_t; newp:pointer;newlen:size_t):cint;
function FPsysctlnametomib (Name: pchar; mibp:pcint;sizep:psize_t):cint;
{$endif}

----

sysctl.h >

__BEGIN_DECLS
int sysctl(int *, u_int, void *, size_t *, void *, size_t);
int sysctlbyname(const char *, void *, size_t *, void *, size_t);
int sysctlnametomib(const char *, int *, size_t *);
__END_DECLS
Additional Informationsysctlnametomib wrong external name >

Undefined symbols for architecture x86_64:
  "_sysctltomib", referenced from:
      _LIBMMX_$$_GETBSDCORES in libmmx.o
ld: symbol(s) not found for architecture x86_64
An error occurred while linking

please see > function FPsysctlnametomib (Name: pchar;mibp:pcint;sizep:psize_t):cint; cdecl; external name 'sysctltomib';

TagsNo tags attached.
Fixed in Revision35548,35566
FPCOldBugId
FPCTarget
Attached Files

Relationships

related to 0031525 resolvedBart Broersma Lazarus Due to FPC 0031515, Lazarus does not build anymore on Darwin. 

Activities

Marco van de Voort

2017-03-09 16:19

manager   ~0098780

Fixed, thanks

Heiko

2017-03-09 18:21

reporter   ~0098782

I have seen an additional issue in fpsysctl.

function FPsysctl (Name: pchar; namelen:cuint; old...
Should better:
function FPsysctl (mib: pointer; len:cuint; old

Marco van de Voort

2017-03-11 17:23

manager   ~0098819

I changed the type of the "name" parameter to pcint, and left the parameter names as they were since they match the name in the FreeBSD man page.

Marco van de Voort

2017-05-01 13:30

manager   ~0100033

The external change was merged to fixes, the parameter type breaks lazarus and other code, so better leave that till next major version since it doesn't cause immediate problems.

Issue History

Date Modified Username Field Change
2017-03-09 15:43 Heiko New Issue
2017-03-09 16:19 Marco van de Voort Fixed in Revision => 35548
2017-03-09 16:19 Marco van de Voort Status new => resolved
2017-03-09 16:19 Marco van de Voort Resolution open => fixed
2017-03-09 16:19 Marco van de Voort Assigned To => Marco van de Voort
2017-03-09 16:19 Marco van de Voort Note Added: 0098780
2017-03-09 18:21 Heiko Note Added: 0098782
2017-03-09 18:21 Heiko Status resolved => feedback
2017-03-09 18:21 Heiko Resolution fixed => reopened
2017-03-11 17:23 Marco van de Voort Fixed in Revision 35548 => 35548,35566
2017-03-11 17:23 Marco van de Voort Note Added: 0098819
2017-03-11 17:23 Marco van de Voort Status feedback => resolved
2017-03-11 17:23 Marco van de Voort Resolution reopened => fixed
2017-03-13 15:55 Juha Manninen Relationship added related to 0031525
2017-05-01 13:30 Marco van de Voort Note Added: 0100033