Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiler error #8

Open
viragmali opened this issue Aug 9, 2019 · 2 comments
Open

compiler error #8

viragmali opened this issue Aug 9, 2019 · 2 comments

Comments

@viragmali
Copy link

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

@mochizk
Copy link
Contributor

mochizk commented Aug 26, 2019

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?

@mochizk
Copy link
Contributor

mochizk commented Aug 26, 2019

Sorry, I reproduced this issue using go1.10. Could you try go1.10.4 or more?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants