My CGI Scripts Can't find libstdc++.so.5
From: Larry Lindstrom (larryl_at_aracnet.com)
Date: 09/02/03
- Next message: Replicant: "Re: Turning off network Link status on Solaris"
- Previous message: Devin L. Ganger: "Re: Solaris 9 FTPD and IPFilterd"
- Next in thread: Anthony Mandic: "Re: My CGI Scripts Can't find libstdc++.so.5"
- Reply: Anthony Mandic: "Re: My CGI Scripts Can't find libstdc++.so.5"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 02 Sep 2003 13:34:29 -0700
Hi Experts:
Google's archives don't seem to address this.
Someone in the Apache config newsgroup told me this
has nothing to do with Apache and to bother you folks.
My development system and my web server are running
Intel Solaris 8 10/00, recently patched. My development
system has Sun's Forte C++, my web server has gcc 3.3.
I can build my C++ CGI scripts on my main development
machine using Sun's Forte. I can move those CGI files to
my web server and things run fine.
When I build any C++ CGI script on my web server, using
gcc, I get this in an error message in Apache's error_log:
... ld.so.1:
/export/home/user/webuser/public_html/cgi-bin/very_simple.cgi:
fatal: libstdc++.so.5:
open failed: No such file or directory,
referer...
I've tried this with LD_LIBRARY_PATH defined and
exported in the Apache startup script. Now I've built my
first crle config file to try to get something working.
Here is the current state of the Apache startup script:
# LD_LIBRARY_PATH=/usr/local/install_dir/gcc/3.3/lib
# export LD_LIBRARY_PATH
LD_CONFIG= \
/export/home/user/webuser/usr/utilities/crle_configs/gcc_libraries
export LD_CONFIG
WEB_BASE_DIR=/export/home/user/webuser/public_html/js_project
export WEB_BASE_DIR
/usr/local/install_dir/apache/2.0.47/bin/apachectl \
-d /usr/www/site.ppro-od -k start -DSSL
You can see where I commented out an attempt to use
LD_LIBRARY_PATH, which failed with the same error message.
And you can see where I'm defining a variable
WEB_BASE_DIR which the CGI scripts use. So I know this
mechanism does work to pass environmental variables.
You're wondering if I screwed up my first crle
configuration file? Does this indicate any problems?
$ crle -v -c
/export/home/user/webuser/usr/utilities/crle_configs/gcc_libraries
Configuration file [3]:
/export/home/user/webuser/usr/utilities/crle_configs/gcc_libraries
Default Library Path (ELF):
/usr/lib:/usr/local/install_dir/gcc/3.3/lib:/usr/local/lib:/usr/local/lib/LIB
Trusted Directories (ELF): /usr/lib/secure (system default)
Command line:
crle -c
/export/home/user/webuser/usr/utilities/crle_configs/gcc_libraries \
-l
/usr/lib:/usr/local/install_dir/gcc/3.3/lib:/usr/local/lib:/usr/local/lib/LIB
$
What's at /usr/local/install_dir/gcc/3.3/lib?
$ pwd
/usr/local/install_dir/gcc/3.3/lib
$ ls libstdc*
libstdc++.a libstdc++.so libstdc++.so.5
libstdc++.la libstdc++.so.3 libstdc++.so.5.0.4
$
It looks like libstdc++.so.5 is present.
When I su to "nobody" and try to run the simple CGI
script, first it fails, same error, then after I define
LD_CONFIG, it works fine. "Works fine" means it spits out
a "Content:" line, a blank line, and "Hello, world". So,
permissions shouldn't be a problem.
I'm new to crle, and I don't want to put anything in
the /var/whatever default file until I understand what I'm
doing. So I want to use a non-default crle config file.
How do I tell my gcc CGI scripts where to find
libstdc++.so.5?
Suggestions are appreciated.
Thanks
Larry
- Next message: Replicant: "Re: Turning off network Link status on Solaris"
- Previous message: Devin L. Ganger: "Re: Solaris 9 FTPD and IPFilterd"
- Next in thread: Anthony Mandic: "Re: My CGI Scripts Can't find libstdc++.so.5"
- Reply: Anthony Mandic: "Re: My CGI Scripts Can't find libstdc++.so.5"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|