Sign in Join

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

Mailing lists / fpc-devel / 2003-03

Stable tree broken for FreeBSD? [maintenance ramblings]

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

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

Jeroen Ruigrok/asmodai

Hi,

using the fixes branch from this morning I try:

OS_TARGET=freebsd gmake all

which ends in:

ppc386 -dUNIX  -dNOMOUSE -dNOGPM -Xs -OG2p3 -n -Fi../inc -Fi../i386 -Fi../unix -FE. -di386 -dRELEASE -I../objpas ../unix/sysutils.pp
fina.inc(101,11) Error: Identifier not found DOS
fina.inc(101,15) Error: Illegal qualifier
fina.inc(101,22) Fatal: Syntax error, ; expected but ( found
gmake[4]: *** [sysutils.ppu] Error 1
gmake[4]: Leaving directory `/usr/home/asmodai/software/fpc/fpc-test/rtl/freebsd'

Which is logical, hasunix is not set, so fina.inc skips to the DOS part of the code.

I guess hasunix in the ifdef part of fina.inc checks the -dHASUNIX passed to fpc.

In rtl/freebsd/Makefile I don't get this:

ifeq ($(findstring 1.0.2,$(FPC_VERSION)),)
ifeq ($(findstring 1.0.4,$(FPC_VERSION)),)
override FPCOPT+=-Ur
endif
endif

1.0.4 has no -Ur, so I wonder, can this be stripped?

Furthermore, can:

SYSTEMUNIT=sysbsd
LINUXUNIT=linux
override FPCOPT+=-dUNIX -dNOMOUSE -dNOGPM
PRT0=prt0
OBJPASDIR=$(RTL)/objpas

be changed to:

SYSTEMUNIT=sysbsd
LINUXUNIT=linux
override FPCOPT+=-dHASUNIX -dUNIX -dNOMOUSE -dNOGPM PRT0=prt0
OBJPASDIR=$(RTL)/objpas

That at least allows me to compile rtl/freebsd. But I think something fundamental is not being set.

Also, why UNIX and HASUNIX? What is the difference between the two?

Jeroen Ruigrok van der Werven <asmodai(at)wxs.nl> / asmodai / a capoeirista PGP fingerprint: 2D92 980E 45FE 2C28 9DB7 9D88 97E6 839B 2EAC 625B http://www.tendra.org/ | http://www.in-nomine.org/~asmodai/diary/ He who has a why to live for can bear almost any how...

Reply by email

Peter Vreman
to Jeroen Ruigrok/asmodai
Show quoted text 22 lines
Hi, using the fixes branch from this morning I try: OS_TARGET=freebsd gmake all which ends in: ppc386 -dUNIX -dNOMOUSE -dNOGPM -Xs -OG2p3 -n -Fi../inc -Fi../i386 -Fi../unix -FE. -di386 -dRELEASE -I../objpas ../unix/sysutils.pp fina.inc(101,11) Error: Identifier not found DOS fina.inc(101,15) Error: Illegal qualifier fina.inc(101,22) Fatal: Syntax error, ; expected but ( found gmake[4]: *** [sysutils.ppu] Error 1 gmake[4]: Leaving directory `/usr/home/asmodai/software/fpc/fpc-test/rtl/freebsd' Which is logical, hasunix is not set, so fina.inc skips to the DOS part of the code. I guess hasunix in the ifdef part of fina.inc checks the -dHASUNIX passed to fpc.

There was a problem with the RTL that files from the main branch and fixes branch got mixed up. At least the HASUNIX is a main branch thing.

Show quoted text 9 lines
In rtl/freebsd/Makefile I don't get this: ifeq ($(findstring 1.0.2,$(FPC_VERSION)),) ifeq ($(findstring 1.0.4,$(FPC_VERSION)),) override FPCOPT+=-Ur endif endif 1.0.4 has no -Ur, so I wonder, can this be stripped?

No, it does exactly what you say: no -Ur for 1.0.4 and 1.0.2. See the info page of make for $(findstring x,y) information

Reply by email

Marco van de Voort
to Jeroen Ruigrok/asmodai: using the fixes branch from this morning I try: OS_TARGET=freebsd gmake all which ends in:
Show quoted text 15 lines
using the fixes branch from this morning I try: OS_TARGET=freebsd gmake all which ends in: ppc386 -dUNIX -dNOMOUSE -dNOGPM -Xs -OG2p3 -n -Fi../inc -Fi../i386 -Fi../unix -FE. -di386 -dRELEASE -I../objpas ../unix/sysutils.pp fina.inc(101,11) Error: Identifier not found DOS fina.inc(101,15) Error: Illegal qualifier fina.inc(101,22) Fatal: Syntax error, ; expected but ( found gmake[4]: *** [sysutils.ppu] Error 1 gmake[4]: Leaving directory `/usr/home/asmodai/software/fpc/fpc-test/rtl/freebsd' Which is logical, hasunix is not set, so fina.inc skips to the DOS part of the code.

See remarks of Peter. Simply fix the hasunix case locally. It will only break non-Unix unixy platforms (BeOS, QNX). I'll see if I can fix CVS tonight.

That at least allows me to compile rtl/freebsd. But I think something fundamental is not being set. Also, why UNIX and HASUNIX? What is the difference between the two?

Unix is a general define for the Unix (posix) architecture,

HASUNIX indicates that the platform has a "unix" unit, which contains some functionality from later POSIX revisions, and even some linuxisms, which are hard to port to some OSes.
E.g. BeOS and QNX don't have it.

In the development version, unit Unix will be cleaned up. A new unit (baseunix) has been created which uses a more Unix typing and is modelled more along POSIX lines.

A unit ctypes will be introduced that is close to <include/types.h>, so that all header translations are based on the same basetypes.

However unit "unix" still has to be cleaned up, to contain non-POSIX extensions only (or maybe only functionality from newer POSIXes).

I'm waiting with the removal/clean-up of unit Unix a bit for the 1.0.x branch to die (or get archived), at least so that the non-RTL and non-Compiler parts of the project aren't shared between the two branches anymore. Also the port to OpenBSD, bughunting and pkg testing for 1.0.8 got in the way.

Reply by email