- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
I am using ifort v8 to compile a f90 code that outputs directly to a web page. This apparently requires static linking which gives the warning: "Using 'getpwuid' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking". When I run the code it fails with the message: "/usr/lib/libc.so.1: bad ELF interpreter..." Is there a way around this problem?? or, How can I compile the code so that it can write to the web page? Thank you. Claudio Mendoza.
Link kopiert
4 Antworten
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
The message about getpwuid() commonly occurs with a static link, and it is not necessarily meaningful. Evidently, in your case, it is telling the truth, at least to the extent that your application is still looking for libc.so.1.
Possibly, the .so which is found at run time is not the right one; for example, if you used the 64-bit compiler, and it is attempting to run with the 32-bit library. Do you have the same problem when using -i-static in place of -static ?
Sometimes, it is necessary to capture the ld link string which is passed by ifort -# and modify it to get a working static link. If yours is such a case, I would suggest filing a problem report on premier.intel.com.
Possibly, the .so which is found at run time is not the right one; for example, if you used the 64-bit compiler, and it is attempting to run with the 32-bit library. Do you have the same problem when using -i-static in place of -static ?
Sometimes, it is necessary to capture the ld link string which is passed by ifort -# and modify it to get a working static link. If yours is such a case, I would suggest filing a problem report on premier.intel.com.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Thanks for your kind reply. If I do as suggested I get the message
"ifort -i-static -o decay_fit decay_fit.o num_rec.o wapr_743.o
/usr/bin/ld: cannot find -lm" which refers to C math library.
"ifort -i-static -o decay_fit decay_fit.o num_rec.o wapr_743.o
/usr/bin/ld: cannot find -lm" which refers to C math library.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
"cannot find -lm" would mean that libmath is missing from the paths which your Intel compiler inherits from gcc. This could mean that your gcc/glibc installation is incomplete, or that it has been changed since you installed an Intel 8.1 or earlier compiler.
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Well...I have found a way round it that DOES NOT need to compile with the static option. The PHP script calls a shell-script that calls the f90 executable rather than directly calling the latter. That is all. It involves changing things around but it works fine! Thanks for your attention.
Antworten
Themen-Optionen
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite