Ian Lance Taylor <i...@google.com> writes: > Rainer Orth <r...@cebitec.uni-bielefeld.de> writes: > >> Unfortunately, the >> >> /vol/gcc/src/hg/trunk/local/libgo/syscalls/exec.go:11:14: error: imported >> and not used: unsafe >> >> error remains. I've no idea what triggers it. > > Bother. Neither do I. I just looked through the code and it all looks > fine. The reference to unsafe.Pointer will be parsed by > Parse::operand. On one of the lines which uses unsafe.Pointer, it will > see "unsafe", see that it is a package, and call package->set_used(). > That will set the flag which is later tested by Gogo::clear_file_scope > to prevent the warning. > > I tried compiling the set of files which will be compiled on Solaris, > but still couldn't recreate the problem.
the problem turned out to be obvious once you ignore most of the error message ;-( The spurious import is in sysinfo.go, which unconditionally imports the package, but only uses in some cases. For now, I've cheated and simply commented the `import "unsafe"' in mksysinfo.sh. I've not checked if you can emit that last if it has actually been used anywere, or need a more involved scheme. Apart from the (already fixed) go.* dejagnu errors, I noticed another problem: the libgo net test now fails on Solaris, but only with Sun ld: Undefined first referenced symbol in file getaddrinfo _gotest_.o (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1) freeaddrinfo _gotest_.o (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1) gai_strerror _gotest_.o (symbol belongs to implicit dependency /lib/amd64/libsocket.so.1) ld: fatal: symbol referencing errors. No output written to a.out collect2: error: ld returned 1 exit status FAIL: net It seems like the test wants to be linked with -lsocket directly. It wasn't run before by default (though I'm pretty sure it worked if one included it). The latest merge has lost support for GCCGO_RUN_ALL_TESTS. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University