Home » Developer & Programmer » Precompilers, OCI & OCCI » does proc precompile gtk libraries? (Instant client PROC, Linux)
|
|
Re: does proc precompile gtk libraries? [message #563932 is a reply to message #563924] |
Sat, 18 August 2012 08:38 |
|
thein
Messages: 9 Registered: February 2012
|
Junior Member |
|
|
System default option values taken from: /usr/lib/oracle/11.2/client64/precomp/admin/pcscfg.cfg
PCC-F-02066, CMD-LINE: Could not find or could not open system config file
Syntax error at line 159, column 23, file /usr/include/glib-2.0/glib/gmessages.h:
Error at line 159, column 23 in file /usr/include/glib-2.0/glib/gmessages.h
#define g_error(format...) G_STMT_START { \
......................1
PCC-S-02014, Encountered the symbol "..." when expecting one of the following:
, )
The symbol ")" was substituted for "..." to continue.
Syntax error at line 292, column 50, file /usr/include/glib-2.0/glib/gtestutils.h:
Error at line 292, column 50 in file /usr/include/glib-2.0/glib/gtestutils.h
GLogLevelFlags log_level,
.................................................1
PCC-S-02201, Encountered the symbol "GLogLevelFlags" when expecting one of the f
ollowing:
|
|
|
|
Re: does proc precompile gtk libraries? [message #563939 is a reply to message #563937] |
Sat, 18 August 2012 10:31 |
|
thein
Messages: 9 Registered: February 2012
|
Junior Member |
|
|
#/bin/make
###############################################################################
# Make file for PROC demos
###############################################################################
# Usage :
# For compiling proc demos
# make -f demo_proc_ic.mk
#
# For precompiling, compiling & linking the procdemo.pc file
# make -f demo_proc_ic.mk build EXE=procdemo OBJS=procdemo.o
#
# In general, for any proc program
# make -f demo_proc_ic.mk build EXE=<exename> OBJS="<list of dependent objs>"
#
# To make use of any PROC options during precompilation,
# make -f demo_proc_ic.mk build PROCFLAGS="<list of proc options>"
# EXE=<exename> OBJS="<list of dependent objs>"
#
# NOTES:
# 1. Please change "cc/CC" and the "InstantClient directories" to point to
# appropiate locations on your machine before using this makefile.
#
###############################################################################
CC=/usr/bin/gcc
cc=/usr/bin/gcc
# InstantClient Directories.
ICLIBHOME=$(RPM_BUILD_ROOT)/usr/lib/oracle/11.2/client64/lib/
MKLINK=ln -s
REMOVE=rm -rf
CLNCACHE=cleancache
CACHEDIR=SunWS_cachea
MAKE=make
MAKEFILE=demo_proc_ic.mk
PROCDEMO=procdemo
PROC=$(RPM_BUILD_ROOT)/usr/lib/oracle/11.2/client64/bin/proc
SO_EXT=.so
I_SYM=-I
CCINCLUDES= $(I_SYM)$(RPM_BUILD_ROOT)/usr/include/oracle/11.2/client64
GTKFLAGS=-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gdk-pixbuf-2.0
GTKLIBS=-lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangocairo-1.0 -lfontconfig -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXfixes -lpango-1.0 -lcairo -lX11 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0
# Pre-compiler Flags.
PRECOMP_INCLUDE=$(I_SYM). $(SYS_INCLUDE)
PRECOMPPUBH=$(RPM_BUILD_ROOT)/usr/include/oracle/11.2/client64
GTKINC=/usr/include/gtk-2.0,/usr/lib/gtk-2.0/include,/usr/include/atk-1.0,/usr/include/cairo,/usr/include/pango-1.0,/usr/include/glib -2.0,/usr/lib/x86_64-linux-gnu/glib-2.0/include,/usr/include/freetype2,/usr/include/libpng12,/usr/lib/x86_64-linux-gnu/gtk-2.0/includ e,/usr/include/gdk-pixbuf-2.0
SYS_INCLUDE=sys_include=\($(PRECOMPPUBH),/usr/include,/usr/include/glib-2.0/glib,/usr/lib/gcc/x86_64-linux-gnu/4.6/include,/usr/lib/g cc/x86_64-linux-gnu/4.6.1/include,$(GTKINC)\)
# Compiler Flags.
OPTIMIZE=-O2
LDPATHFLAG=-L
SPFLAGS=-DLINUX -D_GNU_SOURCE -D_LARGEFILE64_SOURCE=1 -D_LARGEFILE_SOURCE=1 -DSLTS_ENABLE -DSLMXMX_ENABLE -D_REENTRANT -DNS_THREADS
CCFLAGS= -fPIC -DPRECOMP
LDFLAGS=-g
LPFLAGS=
GFLAG=
CDEBUG=
USRFLAGS=
ICLIBPATH=$(LDPATHFLAG)$(ICLIBHOME)
PFLAGS=$(CCINCLUDES) $(SPFLAGS) $(LPFLAGS) $(GTKFLAGS)
CFLAGS=$(GFLAG) $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(PFLAGS) $(USRFLAGS)
# Libraries.
PROLDLIBS=$(LDCLIENTLIBS) $(THREADLIBS)
LDCLIENTLIBS=$(ICLIBPATH) $(LLIBCLNTSH) $(LDLIBS)
LLIBCLNTSH=$(LDLIBFLAG)$(LIBCLNTSHNAME)
LDLIBFLAG=-l
LIBCLNTSHNAME=clntsh
LDLIBS=$(EXSYSLIBS) $(MATHLIB) $(USRLIBS) $(GTKLIBS)
EXSYSLIBS=-ldl
MATHLIB=-lm
THREADLIBS=-lpthread
C2O=$(CC) $(CFLAGS) -c $*.c
PCC2C=$(PROC) $(PROCFLAGS) iname=$(PCCSRC) $(PRECOMP_INCLUDE)
DEMO_PROC_BUILD=$(CC) -o $(EXE) $(OBJS) $(LDFLAGS) $(PROLDLIBS)
#-----------------------------------------------------------------------------
# Targets for building the proc sample programs.
all: clean $(PROCDEMO)
$(PROCDEMO):
$(MAKE) -f $(MAKEFILE) build OBJS=$@.o EXE=$@
build: $(CLNCACHE) $(OBJS)
$(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT)
$(DEMO_PROC_BUILD)
$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
#-----------------------------------------------------------------------------
# Here are some rules for converting .pc -> .c -> .o
.SUFFIXES: .pc .c .o
pc1:
$(PCC2C)
.pc.c:
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCFLAGS)" PCCSRC=$* I_SYM=include= pc1
.pc.o:
$(MAKE) -f $(MAKEFILE) PROCFLAGS="$(PROCFLAGS)" PCCSRC=$* I_SYM=include= pc1
$(C2O)
.c.o:
$(C2O)
#-----------------------------------------------------------------------------
# Clean up all executables, *.o and generated *.c files
clean: $(CLNCACHE)
$(REMOVE) $(PROCDEMO) $(PROCDEMO).o $(PROCDEMO).c $(PROCDEMO).lis
cleancache:
$(REMOVE) $(CACHEDIR)
$(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT)
This works with none GTK apps, But when i use gtk functions the precompiler complains.
This is a demo makefile that comes with the precompiler, Have added includes and libs for gtk.
Thanks,
Thein
|
|
|
|
|
Re: does proc precompile gtk libraries? [message #563942 is a reply to message #563941] |
Sat, 18 August 2012 11:21 |
|
thein
Messages: 9 Registered: February 2012
|
Junior Member |
|
|
/usr/lib/oracle/11.2/client64/bin/proc iname=prufa include=. sys_include=\(/usr/include/oracle/11.2/client64,/usr/include,/usr/include/glib-2.0/glib,/usr/lib/gcc/x86_64-linux-gnu/4.6/include,/us r/lib/gcc/x86_64-linux-gnu/4.6.1/include,/usr/include/gtk-2.0,/usr/lib/gtk-2.0/include,/usr/include/atk-1.0,/usr/include/cairo,/usr/i nclude/pango-1.0,/usr/include/glib-2.0,/usr/lib/x86_64-linux-gnu/glib-2.0/include,/usr/include/freetype2,/usr/include/libpng12,/usr/l ib/x86_64-linux-gnu/gtk-2.0/include,/usr/include/gdk-pixbuf-2.0\)
Pro*C/C++: Release 11.2.0.3.0 - Production on Sat Aug 18 16:01:30 2012
This is the pcc that is run
Thanks,
Thein
|
|
|
|
Re: does proc precompile gtk libraries? [message #563947 is a reply to message #563944] |
Sat, 18 August 2012 13:20 |
|
thein
Messages: 9 Registered: February 2012
|
Junior Member |
|
|
Hi,
It is at another location "/usr/lib/oracle/11.2/client64/lib/precomp/admin/pcscfg.cfg"
I can put a logical name so it refernces it correctly but then there comes a error when it finds it
The file looks like this
sys_include=($ORACLE_HOME/include,/usr/include/linux,/usr/include,/usr/lib/gcc/x86_64-linux-gnu/4.6/include,/usr/lib/gcc/x86_64-linux -gnu/4.6.1/include,
/usr/include/gtk-2.0,/usr/lib/gtk-2.0/include,/usr/include/atk-1.0,/usr/include/cairo,/usr/include/pango-1.0,
/usr/include/glib-2.0,/usr/lib/x86_64-linux-gnu/glib-2.0/include,/usr/include/freetype2,/usr/include/libpng12,
/usr/lib/x86_64-linux-gnu/gtk-2.0/include,/usr/include/gdk-pixbuf-2.0)
ltype=short
define=__x86_64__
Thanks,
Thein
|
|
|
|
|
Re: does proc precompile gtk libraries? [message #564010 is a reply to message #563952] |
Mon, 20 August 2012 02:58 |
|
dws1
Messages: 15 Registered: July 2012
|
Junior Member |
|
|
This could be Pro*C bug 4149809, which hasn't been fixed yet:
Syntax error at line 1, column 12, file test2.pc:
Error at line 1, column 12 in file test2.pc
#define m(a...) f()
...........1
PCC-S-02014, Encountered the symbol "..." when expecting one of the
following:
, )
The symbol ")" was substituted for "..." to continue.
Error at line 0, column 0 in file test2.pc
PCC-F-02102, Fatal error while doing C preprocessing
You can use the precompiler-defined symbol ORA_PROC to make Pro*C skip problematic includes; suppose you are #including gmessages.h directly, which you probably aren't, but this will illustrate the solution:
#ifndef ORA_PROC
#include "gmessages.h"
#endif
|
|
|
|
Re: does proc precompile gtk libraries? [message #564025 is a reply to message #564011] |
Mon, 20 August 2012 09:33 |
|
thein
Messages: 9 Registered: February 2012
|
Junior Member |
|
|
The way I can work around it is having gtk functions in a separate file: gtkfuncs.c and oracle precompiler functions in a file called sqlfuncs.pc
If I use the script i mentioned previously:
make -f demo_proc_ic.mk build EXE=gtkfuncs OBJS="gtkfuncs.o sqlfuncs.o"
This works. Maybe it can be done another way.
Thanks for your help
Thein
|
|
|
Goto Forum:
Current Time: Sun Feb 02 08:19:39 CST 2025
|