Thanks. I did do that befor but thought you meant different. I ran the 
following:

/export/home/amandeep/gccgo-obj/./gcc/gccgo 
-B/export/home/amandeep/gccgo-obj/./gcc/ 
-B/usr/gnu/sparc-sun-solaris2.10/bin/ -B/usr/gnu/sparc-sun-solaris2.10/lib/ 
-isystem /usr/gnu/sparc-sun-solaris2.10/include -isystem 
/usr/gnu/sparc-sun-solaris2.10/sys-include -O2 -g -I . -c -fgo-pkgpath=fmt 
/export/home/amandeep/gccgo-src/libgo/go/fmt/doc.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/format.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/print.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go  -fPIC -o .libs/fmt.o

and got:

Reading specs from /export/home/amandeep/gccgo-obj/./gcc/specs
COLLECT_GCC=/export/home/amandeep/gccgo-obj/./gcc/gccgo
Target: sparc-sun-solaris2.10
Configured with: /export/home/amandeep/gccgo-src/configure 
--prefix=/usr/gnu --enable-languages=go --with-as=/opt/csw/gnu/as 
--with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld 
--with-gmp-include=/opt/csw/include --with-gmp-lib=/opt/csw/lib 
--with-mpfr=/opt/csw --with-mpfr-include=/opt/csw/include 
--with-mpfr-lib=/opt/csw/lib --with-mpc=/opt/csw --with-isl=/opt/csw 
--with-isl-include=/opt/csw/include --with-isl-lib=/opt/csw/lib 
--with-build-time-tools=/opt/csw/gnu --enable-multilib --enable-shared 
--enable-static --disable-nls --disable-libquadmath --disable-libssp 
--disable-lto --disable-libgomp
Thread model: posix
gcc version 8.2.1 20180814 (GCC) 
COLLECT_GCC_OPTIONS='-B' '/export/home/amandeep/gccgo-obj/./gcc/' '-B' 
'/usr/gnu/sparc-sun-solaris2.10/bin/' '-B' 
'/usr/gnu/sparc-sun-solaris2.10/lib/' '-isystem' 
'/usr/gnu/sparc-sun-solaris2.10/include' '-isystem' 
'/usr/gnu/sparc-sun-solaris2.10/sys-include' '-v' '-O2' '-g' '-I' '.' '-c' 
'-fgo-pkgpath=fmt' '-fPIC' '-o' '.libs/fmt.o' '-shared-libgcc' '-mcpu=v9'
 /export/home/amandeep/gccgo-obj/./gcc/go1 
/export/home/amandeep/gccgo-src/libgo/go/fmt/doc.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/format.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/print.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go -quiet -dumpbase 
doc.go -mcpu=v9 -auxbase-strip .libs/fmt.o -g -O2 -version -fgo-pkgpath=fmt 
-fPIC -I . -L/export/home/amandeep/gccgo-obj/./gcc -o /var/tmp//ccmxS20e.s
GNU Go (GCC) version 8.2.1 20180814 (sparc-sun-solaris2.10)
        compiled by GNU C version 8.2.1 20180814, GMP version 6.1.2, MPFR 
version 4.0.0, MPC version 1.0.2, isl version csw-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Go (GCC) version 8.2.1 20180814 (sparc-sun-solaris2.10)
        compiled by GNU C version 8.2.1 20180814, GMP version 6.1.2, MPFR 
version 4.0.0, MPC version 1.0.2, isl version csw-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
/export/home/amandeep/gccgo-src/libgo/go/fmt/format.go:8:9: error: import 
file 'strconv' not found
  "strconv"
         ^
/export/home/amandeep/gccgo-src/libgo/go/fmt/format.go:9:14: error: import 
file 'unicode/utf8' not found
  "unicode/utf8"
              ^
/export/home/amandeep/gccgo-src/libgo/go/fmt/print.go:8:8: error: import 
file 'errors' not found
  "errors"
        ^
/export/home/amandeep/gccgo-src/libgo/go/fmt/print.go:9:4: error: import 
file 'io' not found
  "io"

*.... and many more like this before ending as follows:*

/export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go:688:52: error: 
expected integer, floating, complex, or string type
   s.errorString("unsigned integer overflow on token " + tok)
                                                    ^
gccgo: internal compiler error: Segmentation Fault signal terminated 
program go1
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.

Before running this, I have already exported the paths as I did in the 
script in the first post. These are below:

export PATH=/opt/csw/bin:/usr/sbin:$PATH:/usr/sfw/bin:/usr/ccs/bin
export LD_OPTIONS='-R/opt/csw/lib'
export M4=/opt/csw/bin/gm4

As suggested, next I ran:

/export/home/amandeep/gccgo-obj/./gcc/go1 
/export/home/amandeep/gccgo-src/libgo/go/fmt/doc.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/format.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/print.go 
/export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go -quiet -dumpbase 
doc.go -mcpu=v9 -auxbase-strip .libs/fmt.o -g -O2 -version -fgo-pkgpath=fmt 
-fPIC -I . -L/export/home/amandeep/gccgo-obj/./gcc -o /var/tmp//ccmxS20e.s

and I got:

GNU Go (GCC) version 8.2.1 20180814 (sparc-sun-solaris2.10)
        compiled by GNU C version 8.2.1 20180814, GMP version 6.1.2, MPFR 
version 4.0.0, MPC version 1.0.2, isl version csw-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Go (GCC) version 8.2.1 20180814 (sparc-sun-solaris2.10)
        compiled by GNU C version 8.2.1 20180814, GMP version 6.1.2, MPFR 
version 4.0.0, MPC version 1.0.2, isl version csw-0.18-GMP

GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
/export/home/amandeep/gccgo-src/libgo/go/fmt/format.go:8:9: error: import 
file 'strconv' not found
  "strconv"
         ^
/export/home/amandeep/gccgo-src/libgo/go/fmt/format.go:9:14: error: import 
file 'unicode/utf8' not found
  "unicode/utf8"
              ^
... and many more before ending into ...

/export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go:688:52: error: 
expected integer, floating, complex, or string type
   s.errorString("unsigned integer overflow on token " + tok)
                                                    ^
Segmentation Fault (core dumped)

I tried analyzing the core dumped. so I did: gdb 
/export/home/amandeep/gccgo-obj/./gcc/go1 ./core  and below is how the 
promt looks:

GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc-sun-solaris2.10".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /export/home/amandeep/gccgo-obj/./gcc/go1...done.

warning: Couldn't find general-purpose registers in core file.

warning: Wrong size fpregset in core file.
[Thread debugging using libthread_db enabled]
[New Thread 1 (LWP 1)]

warning: Couldn't find general-purpose registers in core file.

warning: Couldn't find general-purpose registers in core file.
Error in re-setting breakpoint -1: PC register is not available
Error in re-setting breakpoint -2: PC register is not available
Error in re-setting breakpoint -3: PC register is not available
Error in re-setting breakpoint -4: PC register is not available
Error in re-setting breakpoint -5: PC register is not available
Core was generated by `/export/home/amandeep/gccgo-obj/./gcc/go1 
/export/home/amandeep/gccgo-src/libgo'.

warning: Couldn't find general-purpose registers in core file.

warning: Wrong size fpregset in core file.
PC not available
#-1 <unavailable> in ?? ()
(gdb) bt
#-1 <unavailable> in ?? ()
#0  <unavailable> in ?? ()
frame.c:472: internal-error: get_frame_id: Assertion `fi->this_id.p' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Quit this debugging session? (y or n) n
frame.c:472: internal-error: get_frame_id: Assertion `fi->this_id.p' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
Create a core file of GDB? (y or n) y
Command aborted.

Have I steps mentioned correctly? Any suggestions on the next steps?

On Thursday, August 23, 2018 at 1:37:33 PM UTC-7, Ian Lance Taylor wrote:
>
> On Thu, Aug 23, 2018 at 1:24 AM, Amandeep Gautam 
> <amandee...@gmail.com <javascript:>> wrote: 
> > Hi Ian, 
> >   I ran the following after changing directory to 
> > /export/home/amandeep/gccgo-obj/sparc-sun-solaris2.10/libgo/: 
> > 
> > files=`echo /export/home/amandeep/gccgo-src/libgo/go/fmt/doc.go 
> > /export/home/amandeep/gccgo-src/libgo/go/fmt/format.go 
> > /export/home/amandeep/gccgo-src/libgo/go/fmt/print.go 
> > /export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go errors.gox io.gox 
> > math.gox os.gox reflect.gox strconv.gox sync.gox unicode/utf8.gox | sed 
> -e 
> > 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; /bin/bash ./libtool --tag GO 
> > --mode=compile --verbose /export/home/amandeep/gccgo-obj/./gcc/gccgo 
> > -B/export/home/amandeep/gccgo-obj/./gcc/ 
> > -B/usr/gnu/sparc-sun-solaris2.10/bin/ 
> -B/usr/gnu/sparc-sun-solaris2.10/lib/ 
> > -isystem /usr/gnu/sparc-sun-solaris2.10/include -isystem 
> > /usr/gnu/sparc-sun-solaris2.10/sys-include       -O2 -g -I . -c 
> > -fgo-pkgpath=`echo fmt.lo | sed -e 's/.lo$//' -e 
> > 's|golang_org|vendor/golang_org|'`  -o fmt.lo $files 
> > 
> > I still get the same compilation error: 
> > 
> > go1: internal compiler error: Segmentation Fault 
> > 0x6b9757 crash_signal 
> >         /export/home/amandeep/gccgo-src/gcc/toplev.c:325 
> > Please submit a full bug report, 
> > with preprocessed source if appropriate. 
> > Please include the complete backtrace with any bug report. 
> > See <https://gcc.gnu.org/bugs/> for instructions. 
> > 
> > and did not get any more output using the verbose option. What should 
> have 
> > been done differently? 
>
> Don't use that command, use the command that that prints out: the line 
> that starts with "libtool: compile:". 
>
> Ian 
>
>
> > On Monday, August 20, 2018 at 6:41:54 PM UTC-7, Ian Lance Taylor wrote: 
> >> 
> >> On Sun, Aug 19, 2018 at 9:39 PM, Amandeep Gautam 
> >> <amandee...@gmail.com> wrote: 
> >> 
> >> > gmake[3]: Entering directory 
> >> > '/export/home/amandeep/gccgo-obj/sparc-sun-solaris2.10/libgo' 
> >> > gmake[4]: Entering directory 
> >> > '/export/home/amandeep/gccgo-obj/sparc-sun-solaris2.10/libgo' 
> >> > /opt/csw/bin/gmkdir -p .; files=`echo 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/doc.go 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/format.go 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/print.go 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go errors.gox 
> io.gox 
> >> > math.gox os.gox reflect.gox strconv.gox sync.gox unicode/utf8.gox | 
> sed 
> >> > -e 
> >> > 's/[^ ]*\.gox//g' -e 's/[^ ]*\.dep//'`; /bin/bash ./libtool --tag GO 
> >> > --mode=compile /export/home/amandeep/gccgo-obj/./gcc/gccgo 
> >> > -B/export/home/amandeep/gccgo-obj/./gcc/ 
> >> > -B/usr/gnu/sparc-sun-solaris2.10/bin/ 
> >> > -B/usr/gnu/sparc-sun-solaris2.10/lib/ 
> >> > -isystem /usr/gnu/sparc-sun-solaris2.10/include -isystem 
> >> > /usr/gnu/sparc-sun-solaris2.10/sys-include       -O2 -g -I . -c 
> >> > -fgo-pkgpath=`echo fmt.lo | sed -e 's/.lo$//' -e 
> >> > 's|golang_org|vendor/golang_org|'`  -o fmt.lo $files 
> >> > libtool: compile:  /export/home/amandeep/gccgo-obj/./gcc/gccgo 
> >> > -B/export/home/amandeep/gccgo-obj/./gcc/ 
> >> > -B/usr/gnu/sparc-sun-solaris2.10/bin/ 
> >> > -B/usr/gnu/sparc-sun-solaris2.10/lib/ 
> >> > -isystem /usr/gnu/sparc-sun-solaris2.10/include -isystem 
> >> > /usr/gnu/sparc-sun-solaris2.10/sys-include -O2 -g -I . -c 
> >> > -fgo-pkgpath=fmt 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/doc.go 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/format.go 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/print.go 
> >> > /export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go  -fPIC -o 
> >> > .libs/fmt.o 
> >> > go1: internal compiler error: Segmentation Fault 
> >> > 0x6b9757 crash_signal 
> >> >         /export/home/amandeep/gccgo-src/gcc/toplev.c:325 
> >> > Please submit a full bug report, 
> >> > with preprocessed source if appropriate. 
> >> > Please include the complete backtrace with any bug report. 
> >> > See <https://gcc.gnu.org/bugs/> for instructions. 
> >> > gmake[4]: *** [Makefile:3324: fmt.lo] Error 1 
> >> 
> >> 
> >> Thanks.  Unfortunately, I don't know what could be causing this. 
> >> Everything looks fine, except that the compiler is crashing.  I'm not 
> >> seeing this on Solaris 11.  I think you will have to debug the 
> >> compiler.  To see more about what is happening, run the "compile:" 
> >> command by itself.  It should crash in the same way.  Then run it with 
> >> the -v option to see how the go1 program is being run.  Running the 
> >> go1 program with those arguments should crash.  That is what you need 
> >> to debug; presumably there is a NULL pointer dereference or something. 
> >> 
> >> Ian 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "golang-nuts" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to golang-nuts...@googlegroups.com <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to