View Issue Details

IDProjectCategoryView StatusLast Update
0037168FPCCompilerpublic2020-06-06 14:38
ReporterDan Cross Assigned ToFlorian  
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionwon't fix 
Product Version3.0.4 
Summary0037168: OpenBSD port for FPC is marked broken
DescriptionThe OpenBSD port for FPC has been marked "BROKEN" by the OpenBSD maintainers. From https://cvsweb.openbsd.org/ports/lang/fpc/Makefile one sees the following commit message for v1.19 of the port's Makefile, committed Jan 28, 2020:

```
Mark BROKEN. Instead of going through the libc stub, Free Pascal
issues system calls from the main program. This is no longer allowed
starting with sys/kern/exec_elf.c rev 1.154.
```
Steps To ReproduceInstall OpenBSD, install the ports collection, attempt to install fpc from ports.
Additional InformationApparently, based on the commit message, OpenBSD no longer supports issuing system calls directly, but (effectively) requires going through the shims in libc. The solution would seem to be to, on OpenBSD, issue system calls by emitting function calls to well-known names in the compiler, and then linking against libc.
TagsNo tags attached.
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Florian

2020-06-02 22:09

administrator   ~0123193

Don't bet on getting this fixed.

Marco van de Voort

2020-06-02 23:38

manager   ~0123194

I think we can close it, since there is -dFPC_USE_LIBC, if there are problems, specific issues can be filed.

Note that the smartest avenue would be to file a bug with OpenBSD to make the same exception for FPC as they did for go:


            /* Permit system calls in specific main-programs */
            if (names & ELF_NOTE_NAME_GO) {

NoName

2020-06-03 00:10

reporter   ~0123195

Wouldn't it be needed that FPC defines FPC_USE_LIBC as default for OpenBSD now?!

Marco van de Voort

2020-06-03 10:50

manager   ~0123198

Last edited: 2020-06-04 21:48

View 3 revisions

If it is confirmed to work. Probably nobody ran it with openbsd the last decade or so.

I don't really believe that libc based working will bring much as long as the interfaces remain hidden in cryptic macro hidden C headers that are not machine translatable, which means that structures and constants won't automatically receive changes, while syscalls usually get a new number if the struct is redefined.

Issue History

Date Modified Username Field Change
2020-06-02 19:50 Dan Cross New Issue
2020-06-02 22:09 Florian Note Added: 0123193
2020-06-02 23:38 Marco van de Voort Note Added: 0123194
2020-06-03 00:10 NoName Note Added: 0123195
2020-06-03 10:50 Marco van de Voort Note Added: 0123198
2020-06-03 13:28 Marco van de Voort Note Edited: 0123198 View Revisions
2020-06-04 21:48 Marco van de Voort Note Edited: 0123198 View Revisions
2020-06-06 14:38 Florian Assigned To => Florian
2020-06-06 14:38 Florian Status new => resolved
2020-06-06 14:38 Florian Resolution open => won't fix
2020-06-06 14:38 Florian FPCTarget => -