Sign in Join

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

Mailing lists / fpc-pascal / 2001-02

libc problem!

7 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

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

Udo Giacomozzi

Hello,

I made some cgi programs using free pascal. it works very fine. but now i'm moving to a new server (SuSE 7) and the programs don't work anymore (at leat not the one that use mysql). The following error is displayed:

./login: error in loading shared libraries: ./login: undefined symbol: __libc_init

I have searched in the message archive and found some similar threads, but in my case it does not help to upgrade the fpc compiler (using snapshot from 21th february.

BUT: On my local machine (SuSE 6.3) and on the older server (SuSE 6.1) the programs work.
I noticed also that on the new server there is only libc 6:

/lib/libc.so.6

whereas on the other machines (also my local one) there is libc 4 and 6:

/lib/libc.so.4 (symlink)
/lib/libc.so.4.7.6
/lib/libc.so.6

I also have read that the compiler detects the libc version. So is the libc version set at compile time? I alway compile the programs on my local machine and then upload them to the web server.

Maybe the compiler detects and uses libc v4 and that is not available on the new server,

What shall I do? I don't like much to change the web servers configuration (i mean, if it's possible NOT to install other libc versions).

Please help!

Thanks

Udo

Peter Vreman
to Udo Giacomozzi
Show quoted text 26 lines
I made some cgi programs using free pascal. it works very fine. but now i'm moving to a new server (SuSE 7) and the programs don't work anymore (at leat not the one that use mysql). The following error is displayed: ./login: error in loading shared libraries: ./login: undefined symbol: __libc_init I have searched in the message archive and found some similar threads, but in my case it does not help to upgrade the fpc compiler (using snapshot from 21th february. BUT: On my local machine (SuSE 6.3) and on the older server (SuSE 6.1) the programs work. I noticed also that on the new server there is only libc 6: /lib/libc.so.6 whereas on the other machines (also my local one) there is libc 4 and 6: /lib/libc.so.4 (symlink) /lib/libc.so.4.7.6 /lib/libc.so.6 I also have read that the compiler detects the libc version. So is the libc version set at compile time? I alway compile the programs on my local machine and then upload them to the web server.

At compiletime as an other startup module is necessary.

Show quoted text 9 lines
Maybe the compiler detects and uses libc v4 and that is not available on the new server, What shall I do? I don't like much to change the web servers configuration (i mean, if it's possible NOT to install other libc versions). Please help!

Try recompiling on the new server. And be sure that the libraries are the same on all machines, then you're really sure that things work on all machines.

Peter

Cyril LAMY
to Udo Giacomozzi: I made some cgi programs using free pascal. it works very fine. but now i'm moving to a…

Le jeu, 01 f�v 2001, vous avez ecrit :

Show quoted text 7 lines
Hello, I made some cgi programs using free pascal. it works very fine. but now i'm moving to a new server (SuSE 7) and the programs don't work anymore (at leat not the one that use mysql). The following error is displayed:

All cgis I have written in Freepascal (since version 0.9.x) run perfectly on my suse 7.0 (but i have to recompile them). My CGI works with get or post method and calls mysql unit fmethods.

I don't think that the problem is due to freepascal/suse 7.0...

Udo Giacomozzi
to Peter Vreman: At compiletime as an other startup module is necessary. Try recompiling on the new…

Hello Peter,

Thursday, February 01, 2001, 11:55:24 PM, you wrote:

PV> Try recompiling on the new server. And be sure that the libraries are the PV> same on all machines, then you're really sure that things work on all PV> machines.

I can't compile it on the new server, because I just own a account on it and haven't enough space to install the compiler and the programm sources. :(

Best regards, Udo
Udo Giacomozzi
to Cyril LAMY: Le jeu, 01 f�v 2001, vous avez ecrit : All cgis I have written in Freepascal (since…

Hello Cyril,

Friday, February 02, 2001, 9:10:27 AM, you wrote:

CL> Le jeu, 01 fév 2001, vous avez ecrit :

Show quoted text 6 lines
> Hello, > > I made some cgi programs using free pascal. it works very fine. but > now i'm moving to a new server (SuSE 7) and the programs don't work > anymore (at leat not the one that use mysql). The following error is > displayed:

CL> I don't think that the problem is due to freepascal/suse 7.0...

Well, I just think the problem is that I compile the program on one machine (SuSE 6.3 with libc 4) and use it on another machine (SuSE 7 with libc 6).
As far as I understood the program needs the same libraries that were on the compiling machine to run.

Best regards, Udo
Marco van de Voort
to Udo Giacomozzi: PV> Try recompiling on the new server. And be sure that the libraries are the PV> same on…
Show quoted text 9 lines
Thursday, February 01, 2001, 11:55:24 PM, you wrote: PV> Try recompiling on the new server. And be sure that the libraries are the PV> same on all machines, then you're really sure that things work on all PV> machines. I can't compile it on the new server, because I just own a account on it and haven't enough space to install the compiler and the programm sources. :(

Then you could try to link static on your own working machine. Try to pass -k-static to the compiler, or pass -s and postedit ppas.sh and link.res prior to linking (check man page LD for parameters)

Peter Vreman
Show quoted text 14 lines
>> Hello, >> >> I made some cgi programs using free pascal. it works very fine. but >> now i'm moving to a new server (SuSE 7) and the programs don't work >> anymore (at leat not the one that use mysql). The following error is >> displayed: CL> I don't think that the problem is due to freepascal/suse 7.0... Well, I just think the problem is that I compile the program on one machine (SuSE 6.3 with libc 4) and use it on another machine (SuSE 7 with libc 6). As far as I understood the program needs the same libraries that were on the compiling machine to run.

You can try to overwrite cprt0.o with cprt21.o.