laurenz / oracle_fdw

PostgreSQL Foreign Data Wrapper for Oracle
http://laurenz.github.io/oracle_fdw/
Other
492 stars 157 forks source link

oracle_fdw-ORACLE_FDW_2_5_0 not able to make #638

Closed khan602 closed 7 months ago

khan602 commented 8 months ago

Hi got following error, not able to find much information about this error:

pgsql-15/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o oracle_fdw.o oracle_fdw.c cc1: error: bad value (‘x86-64-v2’) for ‘-march=’ switch cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server bonnell atom silvermont slm knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2 native; did you mean ‘x86-64’?

please have a look and advise.

laurenz commented 8 months ago

Please tell me what exactly you did and show the complete output.

khan602 commented 8 months ago

downloaded (Release 2.5.0 source code from release 2.5.0 in the form of zip after unzipping run the make command and get the following out put with error: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fPIC -I"/usr/lib/oracle/11.2/client64/sdk/include" -I"/usr/lib/oracle/11.2/client64/oci/include" -I"/usr/lib/oracle/11.2/client64/rdbms/public" -I"/usr/lib/oracle/11.2/client64/" -I/usr/include/oracle/11.2/client64 -I. -I./ -I/usr/pgsql-15/include/server -I/usr/pgsql-15/include/internal -D_GNU_SOURCE -I/usr/include/libxml2 -I/usr/include -c -o oracle_fdw.o oracle_fdw.c cc1: error: bad value (‘x86-64-v2’) for ‘-march=’ switch cc1: note: valid arguments to ‘-march=’ switch are: nocona core2 nehalem corei7 westmere sandybridge corei7-avx ivybridge core-avx-i haswell core-avx2 broadwell skylake skylake-avx512 cannonlake icelake-client icelake-server bonnell atom silvermont slm knl knm x86-64 eden-x2 nano nano-1000 nano-2000 nano-3000 nano-x2 eden-x4 nano-x4 k8 k8-sse3 opteron opteron-sse3 athlon64 athlon64-sse3 athlon-fx amdfam10 barcelona bdver1 bdver2 bdver3 bdver4 znver1 btver1 btver2 native; did you mean ‘x86-64’? make: *** [: oracle_fdw.o] Error 1

please let me know if you need any further information, thx

laurenz commented 8 months ago

The PostgreSQL binaries that you build with were configured that way, but your gcc doesn't support it.

I am not sure what the cause is. Could it be that you are using an old version of gcc?

As a workaround, you can run the command that make executes manually and remove -march=x86-64-v2. That should produce a working executable.

khan602 commented 8 months ago

Hi, Sorry was busy, so i did the follwowing:

Edit /usr/pgsql-15/lib/pgxs/src/Makefile.global and change value -march=x86-64_v2 to -march=x86-64 and then everything fine, after that i have issue while creating extension then I saw your comment how to make available oracle libraires to Postgres and now I am working on this issue "ERROR: error connecting to Oracle: OCIEnvCreate failed to create environment handle"

DETAIL:

Thanks you so much for you help.

laurenz commented 8 months ago

That Oracle error message is one of these dreadful error messages that mean "something is wrong, but I won't tell you what". Something — often the environment variables — is configured wrongly.

Look at issue #307 and the many issues linked from there. Perhaps one of these can help you along.

laurenz commented 8 months ago

Could you find the cause of the problem?

laurenz commented 7 months ago

I'm closing this as "inactive".