Bug 48503 - http/cgi FAILs if libgcc_s.so.1 isn't in default ld.so.1 search path
Summary: http/cgi FAILs if libgcc_s.so.1 isn't in default ld.so.1 search path
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: go (show other bugs)
Version: 4.7.0
: P3 normal
Target Milestone: ---
Assignee: Ian Lance Taylor
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 18:04 UTC by Rainer Orth
Modified: 2011-04-22 18:24 UTC (History)
0 users

See Also:
Host: *-*-solaris2.*
Target: *-*-solaris2.*
Build: *-*-solaris2.*
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2011-04-07 18:04:20 UTC
As I'd mentioned before, the libgo http/cgi test fails on Solaris 2:

ld.so.1: a.out: fatal: libgcc_s.so.1: open failed: No such file or directory
--- FAIL: cgi.TestHostingOurselves (0.06 seconds)
	for key "env-SCRIPT_NAME" got ""; expected "/test.go"
	for key "env-SCRIPT_FILENAME" got ""; expected "./a.out"
	for key "env-REMOTE_ADDR" got ""; expected "1.2.3.4"
	for key "env-SERVER_NAME" got ""; expected "example.com"
	for key "env-REQUEST_URI" got ""; expected "/test.go?foo=bar&a=b"
	for key "env-REQUEST_METHOD" got ""; expected "GET"
	for key "env-REMOTE_HOST" got ""; expected "1.2.3.4"
	for key "param-a" got ""; expected "b"
	for key "test" got ""; expected "Hello CGI-in-CGI"
	for key "env-SERVER_PORT" got ""; expected "80"
	for key "env-QUERY_STRING" got ""; expected "foo=bar&a=b"
	for key "param-foo" got ""; expected "bar"
	for key "env-HTTP_HOST" got ""; expected "example.com"
	for key "env-SERVER_SOFTWARE" got ""; expected "go"
	for key "env-GATEWAY_INTERFACE" got ""; expected "CGI/1.1"
	got a Content-Type of ""; expected "text/html; charset=utf-8"
	got a X-Test-Header of ""; expected "X-Test-Value"
FAIL
FAIL: http/cgi

I don't have libgcc_s.so.1 in the runtime linker's default search patch, and
LD_LIBRARY_PATH (and all the rest of the environment) is cleared when this test
is executed, as can be seen with truss:

28130:  execve("a.out", 0xDE20ED80, 0xDE21AA80)  argc = 2
28130:   argv: ./a.out -test.run=TestBeChildCGIProcess
28130:   envp: SERVER_SOFTWARE=go SERVER_NAME=example.com
28130:    HTTP_HOST=example.com GATEWAY_INTERFACE=CGI/1.1
28130:    REQUEST_METHOD=GET QUERY_STRING=foo=bar&a=b
28130:    REQUEST_URI=/test.go?foo=bar&a=b PATH_INFO=
28130:    SCRIPT_NAME=/test.go SCRIPT_FILENAME=./a.out
28130:    REMOTE_ADDR=1.2.3.4 REMOTE_HOST=1.2.3.4 SERVER_PORT=80
Comment 1 ian@gcc.gnu.org 2011-04-22 18:23:50 UTC
Author: ian
Date: Fri Apr 22 18:23:47 2011
New Revision: 172864

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=172864
Log:
	PR go/48503
libgo: Bring over http/cgi environment inheritance patches.

Modified:
    trunk/libgo/go/http/cgi/host.go
Comment 2 Ian Lance Taylor 2011-04-22 18:24:55 UTC
Should be fixed.