Open viragmali opened 5 years ago
Sorry for the delayed response.
I have difficulty finding the cause of error because it's not reproduced on my environment.
It seems you attach the last part of log of make. Could you attach all logs of make after make clean USE_PGXS=1? Also, could you try go 1.12.9, which is the latest version of go?
Sorry, I reproduced this issue using go1.10. Could you try go1.10.4 or more?
Getting below error while compling code
Postgres and go verions also mentioned
root@ceadat-virtual-machine:~# sudo -u postgres psql could not change directory to "/root": Permission denied psql (9.6.15) Type "help" for help. postgres=# \q
root@ceadat-virtual-machine:~# go version go version go1.11 linux/amd64
root@ceadat-virtual-machine:~/influxdb_fdw# make USE_PGXS=1 with_llvm=no gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fPIC -pie -fno-omit-frame-pointer -fPIC -shared -o influxdb_fdw.so option.o deparse.o influxdb_query.o influxdb_fdw.o query.a -L/usr/lib/x86_64-linux-gnu -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -L/usr/lib/llvm-6.0/lib -L/usr/lib/x86_64-linux-gnu/mit-krb5 -Wl,--as-needed /usr/bin/ld: query.a(go.o): relocation R_X86_64_TPOFF32 against `runtime.tlsg' can not be used when making a shared object; recompile with -fPIC query.a: error adding symbols: Bad value collect2: error: ld returned 1 exit status /usr/lib/postgresql/11/lib/pgxs/src/makefiles/../../src/Makefile.shlib:309: recipe for target 'influxdb_fdw.so' failed make: *** [influxdb_fdw.so] Error 1