Compile on CentOS 7

87 views
Skip to first unread message

Rodrigo Monteiro

unread,
Jun 11, 2019, 8:38:00 AM6/11/19
to Better Oracle functions support
Hi.
I'm trying to compile (https://github.com/orafce/orafce/archive/master.zip) from the source on a Linux CentOS 7 64 bits using PostgreSQL 8.2 (compiled as well).
The error is below:


[root@server orafce-master]# make
clang -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I. -I/opt/pgsql/include/server -I/opt/pgsql/include/internal -D_GNU_SOURCE   -c -o parse_keyword.o parse_keyword.c
parse_keyword.c:49:36: error: use of undeclared identifier 'ScanKeywords'
        keyword = ScanKeywordLookup(text, ScanKeywords, NumScanKeywords);
                                          ^
1 error generated.
make: ** [parse_keyword.o] Erro 1

Pavel Stehule

unread,
Jun 11, 2019, 8:46:41 AM6/11/19
to orafce-...@googlegroups.com
Hi

út 11. 6. 2019 v 14:38 odesílatel Rodrigo Monteiro <fal...@rodrigomonteiro.net> napsal:
Hi.
I'm trying to compile (https://github.com/orafce/orafce/archive/master.zip) from the source on a Linux CentOS 7 64 bits using PostgreSQL 8.2 (compiled as well).

It is really Postgres 8.2? This version doesn't supported by current release of orafce.

Release notes for orafce 3.1.2. 2015-07-12 - remove support for 8.2

So you have to use some older version 3.1.1 https://github.com/orafce/orafce/releases/tag/VERSION_3_1_1 or use some supported version of PostgreSQL

Support PostgreSQL 8.2 was ended 2011-12-05

Regards

Pavel



The error is below:


[root@server orafce-master]# make
clang -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I. -I/opt/pgsql/include/server -I/opt/pgsql/include/internal -D_GNU_SOURCE   -c -o parse_keyword.o parse_keyword.c
parse_keyword.c:49:36: error: use of undeclared identifier 'ScanKeywords'
        keyword = ScanKeywordLookup(text, ScanKeywords, NumScanKeywords);
                                          ^
1 error generated.
make: ** [parse_keyword.o] Erro 1

--
You received this message because you are subscribed to the Google Groups "Better Oracle functions support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orafce-genera...@googlegroups.com.
To post to this group, send email to orafce-...@googlegroups.com.
Visit this group at https://groups.google.com/group/orafce-general.
To view this discussion on the web visit https://groups.google.com/d/msgid/orafce-general/bedb470d-15a8-40f1-b457-9ec97dca3c17%40googlegroups.com.

Rodrigo Monteiro

unread,
Jun 11, 2019, 9:05:31 AM6/11/19
to Better Oracle functions support
Hi, thanks for the reply.


On Tuesday, June 11, 2019 at 9:46:41 AM UTC-3, Pavel Stehule wrote:
Hi

út 11. 6. 2019 v 14:38 odesílatel Rodrigo Monteiro <fal...@rodrigomonteiro.net> napsal:
Hi.
I'm trying to compile (https://github.com/orafce/orafce/archive/master.zip) from the source on a Linux CentOS 7 64 bits using PostgreSQL 8.2 (compiled as well).

It is really Postgres 8.2? This version doesn't supported by current release of orafce.

Yes.
 

Release notes for orafce 3.1.2. 2015-07-12 - remove support for 8.2

So you have to use some older version 3.1.1 https://github.com/orafce/orafce/releases/tag/VERSION_3_1_1 or use some supported version of PostgreSQL

Thanks for the info.
 

Support PostgreSQL 8.2 was ended 2011-12-05

Regards

Pavel



Now, I'm trying to compile on the 3.1.1 version.
These are the erros:


# make
if [ -f orafce-8.2.sql ] ; \
then \
cat orafce-common.sql orafce-varchar2-casts-8.2.sql orafce-8.2.sql > orafce.sql.in; \
else \
cat orafce-common.sql orafce-varchar2-casts.sql orafce-common-2.sql > orafce.sql.in; \
fi
sed 's,MODULE_PATHNAME,$libdir/orafce,g' orafce.sql.in >orafce.sql
clang -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I. -I/opt/pgsql/include/server -I/opt/pgsql/include/internal -D_GNU_SOURCE   -c -o convert.o convert.c
In file included from convert.c:11:
./builtins.h:44:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum orafce_listagg1_transfn(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:44:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum orafce_listagg1_transfn(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:45:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum orafce_listagg2_transfn(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:45:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum orafce_listagg2_transfn(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:46:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum orafce_listagg_finalfn(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT

./builtins.h:46:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum orafce_listagg_finalfn(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:47:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum orafce_median4_transfn(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:47:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum orafce_median4_transfn(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:48:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum orafce_median4_finalfn(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:48:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum orafce_median4_finalfn(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:49:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum orafce_median8_transfn(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:49:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum orafce_median8_transfn(PG_FUNCTION_ARGS);

./builtins.h:50:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum orafce_median8_finalfn(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:50:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum orafce_median8_finalfn(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:53:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum dbms_alert_register(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:53:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum dbms_alert_register(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:54:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum dbms_alert_remove(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
./builtins.h:54:25: error: expected ';' after top level declarator
extern PGDLLEXPORT Datum dbms_alert_remove(PG_FUNCTION_ARGS);
                        ^
                        ;
./builtins.h:55:8: error: unknown type name 'PGDLLIMPORT'
extern PGDLLEXPORT Datum dbms_alert_removeall(PG_FUNCTION_ARGS);
       ^
./builtins.h:37:21: note: expanded from macro 'PGDLLEXPORT'
#define PGDLLEXPORT     PGDLLIMPORT
                        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: ** [convert.o] Erro 1


I'll search for how to solve it, but it you guys know it please point me to the solution.

Thanks again!


 

The error is below:


[root@server orafce-master]# make
clang -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv -fpic -I. -I/opt/pgsql/include/server -I/opt/pgsql/include/internal -D_GNU_SOURCE   -c -o parse_keyword.o parse_keyword.c
parse_keyword.c:49:36: error: use of undeclared identifier 'ScanKeywords'
        keyword = ScanKeywordLookup(text, ScanKeywords, NumScanKeywords);
                                          ^
1 error generated.
make: ** [parse_keyword.o] Erro 1

--
You received this message because you are subscribed to the Google Groups "Better Oracle functions support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orafce-...@googlegroups.com.

Pavel Stehule

unread,
Jun 11, 2019, 10:18:08 AM6/11/19
to orafce-...@googlegroups.com


út 11. 6. 2019 v 15:05 odesílatel Rodrigo Monteiro <fal...@rodrigomonteiro.net> napsal:
Hi, thanks for the reply.

On Tuesday, June 11, 2019 at 9:46:41 AM UTC-3, Pavel Stehule wrote:
Hi

út 11. 6. 2019 v 14:38 odesílatel Rodrigo Monteiro <fal...@rodrigomonteiro.net> napsal:
Hi.
I'm trying to compile (https://github.com/orafce/orafce/archive/master.zip) from the source on a Linux CentOS 7 64 bits using PostgreSQL 8.2 (compiled as well).

It is really Postgres 8.2? This version doesn't supported by current release of orafce.

Yes.
 

Release notes for orafce 3.1.2. 2015-07-12 - remove support for 8.2

So you have to use some older version 3.1.1 https://github.com/orafce/orafce/releases/tag/VERSION_3_1_1 or use some supported version of PostgreSQL

Thanks for the info.
 

Support PostgreSQL 8.2 was ended 2011-12-05

Regards

Pavel



Now, I'm trying to compile on the 3.1.1 version.
These are the erros:

8.2 was last version without extensions, so we was pretty quick to leave this release.

I compiled 3.0.13 against 8.2 with patch

diff --git a/nvarchar2.c b/nvarchar2.c
index 5b58b67..ef6701c 100644
--- a/nvarchar2.c
+++ b/nvarchar2.c
@@ -160,7 +160,7 @@ nvarchar2recv(PG_FUNCTION_ARGS)
 Datum
 nvarchar2(PG_FUNCTION_ARGS)
 {
-   VarChar     *source = PG_GETARG_VARCHAR_PP(0);
+   VarChar     *source = PG_GETARG_VARCHAR_P(0);
    int32       typmod = PG_GETARG_INT32(1);
    bool        isExplicit = PG_GETARG_BOOL(2);
    int32       len,
diff --git a/varchar2.c b/varchar2.c
index 9fb9aaa..37b0d69 100644
--- a/varchar2.c
+++ b/varchar2.c
@@ -152,7 +152,7 @@ varchar2recv(PG_FUNCTION_ARGS)
 Datum
 varchar2(PG_FUNCTION_ARGS)
 {
-   VarChar     *source = PG_GETARG_VARCHAR_PP(0);
+   VarChar     *source = PG_GETARG_VARCHAR_P(0);
    int32       typmod = PG_GETARG_INT32(1);
    bool        isExplicit = PG_GETARG_BOOL(2);
    int32       len,

I have to modify orafce.sql.in (see attached file). Probably varchar2, nvarchar2 will not work correctly.

Regards

Pavel




To unsubscribe from this group and stop receiving emails from it, send an email to orafce-genera...@googlegroups.com.

To post to this group, send email to orafce-...@googlegroups.com.
Visit this group at https://groups.google.com/group/orafce-general.
orafce.sql.in

Rodrigo Monteiro

unread,
Jun 11, 2019, 10:35:46 AM6/11/19
to Better Oracle functions support
Hi.

Thanks a lot! Now it's compiled.
I'll try to use it.
Reply all
Reply to author
Forward
0 new messages