Sign in Join

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

Mailing lists / fpc-devel / 2005-10

fpc-2.0.0 generating SYSV .o files on FreeBSD

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

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

Renato Botelho

I'm having problems with fpc on FreeBSD and would to know if you have seen this.

My intention is compile a delphi project to generate a library (.so) file to use inside firebird database. But I always have problems, the .so file is generated aparently correctly, like you can see here:

libgalleudf2.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), stripped

But, the .o files is generated as SYSV instead FreeBSD, look:

galleudf2.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped
u_conjunto.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped

Have you ever seen something like this? Or have any idea how to fix this?

Thanks

Renato Botelho

Reply by email

Marco van de Voort
to Renato Botelho
Show quoted text 19 lines
I'm having problems with fpc on FreeBSD and would to know if you have seen this. My intention is compile a delphi project to generate a library (.so) file to use inside firebird database. But I always have problems, the .so file is generated aparently correctly, like you can see here: libgalleudf2.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD), stripped But, the .o files is generated as SYSV instead FreeBSD, look: galleudf2.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped u_conjunto.o: ELF 32-bit LSB relocatable, Intel 80386, version 1 (SYSV), not stripped Have you ever seen something like this? Or have any idea how to fix this?

I suspect the FPC runtime is not initialised. Currently, the ways to link FPC code into foreign programs (IOW with non FPC implementing the main program and calling the linker) are not fully explored yet, contrary to the opposite way.

Probably need a call to FPC_INITIALIZE somewhere. Tips that could lead you to the solution:
- compare FPC startupcode (cprt0.as) to glibc (/usr/crt0.o) startupcode, and make sure the differences are also done for the .so
- compile a hello world FPC program that "uses cmem" (and thus uses glibc), and check the main program for library initializing calls.

Reply by email