Sign in Join

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

Mailing lists / fpc-devel / 2015-10

compile problems with fpc: linking issue

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

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

Schneider

Folks:

I used fink to install fpc.

25% cat hello.p
program hello(output);
(* hello: tiny Pascal program *)
begin

   writeln(output,'hello');

end.
26% fpc hello.p
Free Pascal Compiler version 2.6.4 [2015/10/07] for x86_64 Copyright (c) 1993-2014 by Florian Klaempfl and others Target OS: Darwin for x86_64
Compiling hello.p
Assembling (pipe) hello.s
Linking hello
ld: warning: object file (hello.o) was built for newer OSX version (10.10) than being linked (10.5) ld: warning: object file (/sw/lib/fpc/2.6.4/units/x86_64-darwin/rtl/system.o) was built for newer OSX version (10.9) than being linked (10.5) 5 lines compiled, 0.1 sec
27%

Why is this happening? I'm on OS X 10.10.5.

Note: Since I just started, I'm not on the fpc list yet, so please include my email in responses.

Tom

Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
Gene Regulation and Chromosome Biology Laboratory
Molecular Information Theory Group
Frederick, Maryland 21702-1201

https://schneider.ncifcrf.gov (current link)
https://alum.mit.edu/www/toms (permanent link)

Reply by email

Jonas Maebe
to Schneider
Schneider wrote 8 lines
Folks: Linking hello ld: warning: object file (hello.o) was built for newer OSX version (10.10) than being linked (10.5) ld: warning: object file (/sw/lib/fpc/2.6.4/units/x86_64-darwin/rtl/system.o) was built for newer OSX version (10.9) than being linked (10.5) 5 lines compiled, 0.1 sec 27% Why is this happening? I'm on OS X 10.10.5.

It is due to Xcode 7, which encodes the target OS X version in every object file. If none is specified, it uses the host OS version (10.10 in your case).

Previous versions of Xcode did not encode this OS X version in object files (its assembler did not even have an option to do so). The linker, however, did support specifying the target OS X version, so FPC has used that option since a long time (and 10.4 is FPC's default target OS version for i386 binaries).

The warning is completely benign in case of FPC, because the compiler currently never uses OS-version-specific constructs in object files, and you can ignore it.

With FPC 3.0rc2 and later, the warning will be gone altogether.

Jonas

Reply by email

Schneider
to Jonas Maebe

Jonas:

Show quoted text 5 lines
The warning is completely benign in case of FPC, because the compiler currently never uses OS-version-specific constructs in object files, and you can ignore it. With FPC 3.0rc2 and later, the warning will be gone altogether.

Thanks for the explanation! Now for the next problem ...

Tom

Reply by email

Jonas Maebe
to Schneider

Schneider wrote on Fri, 09 Oct 2015:

Thanks for the explanation! Now for the next problem ...

If it's about errors when enabling the generation of debug information: use -gw rather than -g. That same change in Xcode 7 also removed support for the Stabs debugging format, which is the default for Darwin/i386 in FPC 2.6.4. That, too, will be solved in FPC 3.0rc2.

Jonas

Reply by email