mpiled,
> helloworld.go
> > with the following options and it compiled a 64 bit exectable:
> >
> > CC=/home/amandeep/workspace/mygcc.sh
> > GCCGO=/home/amandeep/workspace/mygccgo.sh CGO_CFLAGS='-m64'
> > CGO_LDFLAGS='-m64' GOARCH=sparc64 CGO_ENABLED=1 go build
Hi Ian,
Setting GCCGO env variable helped. I basically compiled, helloworld.go
with the following options and it compiled a 64 bit exectable:
CC=/home/amandeep/workspace/mygcc.sh
GCCGO=/home/amandeep/workspace/mygccgo.sh CGO_CFLAGS='-m64'
CGO_LDFLAGS='-m64' GOARCH=sparc64 CGO_ENABLED=1 go
Actually, I now understand what you meant. And even that does not work:
amandeep@s113ldom1:/opt/go_pkgs/src/github.com/golang/glog$ sudo
GOPATH=/opt/go_pkgs CC='/home/amandeep/workspace/mygcc.sh'
CGO_CFLAGS='-m64' CGO_LDFLAGS='-m64' GOARCH=sparc64 CGO_ENABLED=1 go
install -x -gccgoflags=-m64
for _buildid.o but
even after that running ar rcD $WORK/b001/_pkg_.a $WORK/b001/_go_.o
$WORK/b001/_buildid.o produces a 32-bit archive. Also, running
buildid gives some error about 32 byte hash. Please see:
amandeep@s113ldom1:~/workspace$
/usr/gnu/libexec/gcc/sparc-sun-solaris2.11/8.2.1/buildid -w
nopes...doesn't work either. I tried both variations...with and without
GOARCH=sparc64 flag. Following is the output with sparc64 flag:
amandeep@s113ldom1:/opt/go_pkgs/src/github.com/golang/glog$ sudo
GOPATH=/opt/go_pkgs CC='gcc -m64' CGO_CFLAGS='-m64' CGO_LDFLAGS='-m64'
GOARCH=sparc64
Seems like even that does not seem to work. Please see:
amandeep@s113ldom1:/opt/go_pkgs/src/github.com/golang/glog$ sudo
GOPATH=/opt/go_pkgs CGO_CFLAGS='-m64' CGO_LDFLAGS='-m64' go install -x
-gccgoflags=-m64
WORK=/tmp/go-build357879094
mkdir -p $WORK/b001/
cd $WORK
/usr/gnu/bin/gccgo -fgo
Hi,
I am trying to compile a 64bit executable using gccgo on Solaris 11/10.
Following is what I have tried:
CGO_LDFLAGS='-m64' go build hello_world.go
GOARCH=sparc64 CGO_LDFLAGS='-m64' go build hello_world.go
Below is the output of the first command:
amandeep@s113ldom1:~/workspace
Hello Ian,
Since you mention about 32-bit SPARC, I did a little testing. It seems
that gccgo is compiling 32-bit binary by default:
-bash-4.3$ go build abcd.go
-bash-4.3$ file abcd
abcd: ELF 32-bit MSB executable SPARC32PLUS Version 1, V8+
Required, dynamically linked, not stripped
gt; The decoding of unwind sections for machine type Sparc is not
> currently
> >> > supported.
> >> >
> >> > Symbol table '.symtab' contains 18 entries:
> >> >Num:Value Size TypeBind Vis Ndx Name
> >> >
12: 0 SECTION LOCAL DEFAULT 16
> > 13: 20 FUNCGLOBAL DEFAULT1 testc
> > 14: 0 NOTYPE GLOBAL DEFAULT UND printf
> > 15: 000016 OBJECT GLOBAL DEFAULT3 __cgodebug_floats
> > 16: 0010
0180814 -mcpu=v9 -gdwarf-2 -g -O2
<10> DW_AT_language: 12 (ANSI C99)
<11> DW_AT_comp_dir: (indirect string, offset: 0x10b):
/export/home/amandeep
<15> DW_AT_low_pc : 0x0
<19> DW_AT_high_pc : 0x14
<1d>
It would be the same. Please see below.
-bash-3.2$ gcc --version
gcc (GCC) 8.2.1 20180814
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
On
WORK=/tmp/go-build151901300
mkdir -p $WORK/b001/
cd $WORK
/usr/gnu/bin/gccgo -fsplit-stack -c -x c - || true
cd /export/home/amandeep
CGO_LDFLAGS='"-g" "-O2"'
/usr/gnu/libexec/gcc/sparc-sun-solaris2.10/8.2.1/cgo -objdir $WORK/b001/
-imp
t;sparc"
GOBIN=""
GOCACHE="/export/home/amandeep/.cache/go-build"
GOEXE=""
GOHOSTARCH="sparc"
GOHOSTOS="solaris"
GOOS="solaris"
GOPATH="/export/home/amandeep/go"
GORACE=""
GOROOT="/usr/gnu"
GOTMPDIR=&quo
to /opt/csw/lib/libmpc.so.3 and
that is how it was reaching to the buggy libmpfr. I changed the symlink for
mpc/mpfr/gmp libs to point to the libs I have installed and it worked.
On Saturday, August 25, 2018 at 10:25:39 AM UTC-7, Ian Lance Taylor wrote:
>
> On Fri, Aug 24, 2018 at 11:48 PM, Am
libmpfr.so.4 from the /opt/csw directory. I am guessing
that I am not configuring something correctly. Can you please look.
Output from GBD:
-bash-3.2$ gdb /export/home/amandeep/gccgo-obj/./gcc/go1
GNU gdb (GDB) 7.7
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3
Running inside the gdb worked. Seems like a problem with libmpfr. Will try
compiling it from source.
Following is the end of the GDB output:
/export/home/amandeep/gccgo-src/libgo/go/fmt/scan.go:658:43: error:
expected integer, floating, complex, or string type
s.errorString("integer ove
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
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
I have been trying to install GCCGO on Solaris 10 with the following
script:
dir=/export/home/amandeep
srcdir=$dir/gccgo-src
objdir=$dir/gccgo-obj
prefix=/usr/gnu
# Create Directory
mkdir -p $objdir
sudo mkdir -p $prefix
# Exports
export PATH=/opt/csw/bin:/usr/sbin:$PATH:/usr/sfw/bin:/usr
Hi,
I installed gccgo on Solaris 11.3 using: sudo /opt/csw/bin/pkgutil -y -i
gcc5core
Below is the output of go-5.5 env:
amandeep@s113ldom1:~$ go-5.5 env
GOARCH="sparc"
GOBIN=""
GOCHAR=""
GOEXE=""
GOHOSTARCH="sparc"
GOHOSTOS="solaris&qu
you may be using the word "parse"
> in the opposite of it its common meaning. However, if you want to pass a
> HTML fragment through a HTML template and have it not be escaped, look at
> the template.HTML type: https://golang.org/pkg/html/template/#HTML
>
> //jb
>
>
Hello,
I am working on a SAAS based project for which I need to send emails to
different clients on different events.
I am using email templates which use tokens (in format {{.TOKENNAME}}) that
are made dynamic while sending emails. Now these token are parsed by using
"html/template"
I am writing a process monitoring solution in go for AIX. I would like to
signal the child process when the parent dies so that it does not become
orphaned. In linux, one can set PdeathSig
(https://golang.org/pkg/syscall/#SysProcAttr) and Go will take care of the
rest. However this attribute
I am sending emails in one of my projects through command line. The project
back end is written in Golang. I am using following code to send emails:
package utils
import(
"bytes"
"html/template"
"os/exec"
"fmt"
)
type EmailRequest struct{
Is there a equivalent of telldir in golang which can page reading of a
directory.
Just using filepath.walk would be inefficient for large file systems.
>From one of the answers to this question
https://stackoverflow.com/questions/39583522/how-do-i-use-seekdir-telldir-in-golang
it looks like
I am trying to write a grpc server in go but am unable get the generated
client and server stub in the file generated by plugin.
Here is the paste of the file generated: https://pastebin.com/kfi99MxK
>From what I have researched, it is because of faulty protobuf installation
but I am not sure
I am using precompiled binaries for AIX. But will keep your suggestion in
mind.
For now it was fixed by installing ca certificates.
On Thursday, December 21, 2017 at 3:12:50 PM UTC-8, Ian Lance Taylor wrote:
>
> On Thu, Dec 21, 2017 at 1:43 PM,
> wrote:
> >
> >
ol `json:"single_use_per_user,omitempty"
> bson:"single_use_per_user,omitempty"`
> }
>
>
> the bson/json Un/marshaller will then omit the values that are nil
> pointers, so now yo ucan tell the difference between a false checkbox, and
> a REST POST that d
Hi
I am working on a Coupon form in which I have some optional fields.
*Introduction:*
All the form field values are received as JSON and mapped into a Golang
structure. In the structure, I have added an "omitempty" flag with every
field. So only those form values are mapped which have
30 matches
Mail list logo