C code for Gembuilder For C

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

C code for Gembuilder For C

GLASS mailing list
Hallo

I am new to gemstone and still leaning c.
I am writing c code for gembuilder for c.

I wrote a c program that includes gci.hf and gcirtl.hf as specified  in the GemBuilder for C documentation.

I am using Ubuntu 16.04.1 LTS 64bit, GemStone/S 64 Bit v3.3.3. I use gcc/g++ version 5.4.0 20160609 to compile the code.

I am using the next commands to compile the code.

Compile c code:
$ g++ -fmessage-length=0 -fcheck-new -O3 -ggdb -m64 -pipe -D_REENTRANT -D_GNU_SOURCE -pthread -fPIC -fno-strict-aliasing -fno-exceptions -I/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/include -x c++ -c userCode.c -o userCode.o

Link c objects:
$ g++ userCode.o $GEMSTONE/lib/gcirtlobj.o -Wl,-traditional -Wl,--warn-unresolved-symbols -m64 -lpthread -lcrypt -ldl -lc -lm -lrt -lpam -lpam_misc -Wl,-z,muldefs -o userAppl

Can you please help me by giving some suggestions on debugging the code?

When I compile and link the c code I get the following warnings:
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufHolder::free()':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:61: warning: undefined reference to `GciFree'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufType::malloc(unsigned long, int, char const*)':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:33: warning: undefined reference to `GciUtlMalloc_'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciRtlUnload':
/export/derby1/users/buildgss/33/build40760/src/gcirtl.c:189: warning: undefined reference to `GciShutdown'
/export/derby1/users/buildgss/33/build40760/src/gcirtl.c:190: warning: undefined reference to `GciUnload'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufType::GciTravBufType(unsigned long)':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:45: warning: undefined reference to `GciHostCallDebuggerMsg'

How do I go about addressing these warnings?

I had some problems importing the pam libs, the system could not locate them. I installed libpam0g-dev this solved the problem. Should I have done something else?

Are there any more libs that is recommended to install?

Any pointers and advice will be appreciated.

Thanking you in advance
Gustav

_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: C code for Gembuilder For C

GLASS mailing list

Gustav,

Here'sthe answer from engineering:

  The warnings about undefined Gci*   symbols is normal.
  Those functions are resolved at runtime after one of the  $GEMSTONE/lib/libgci*.so  
  library is loaded.  The library load is normally accomplished by
  calling  GciRtlLoad   or GciTsLoad  from your application's initialization code .

  See comments on gcirtl.hf for GciRtlLoad and GciTsLoad
  The "default path" is  $GEMSTONE/lib  

  libpam0g-dev is an appropriate package .

  If using the thread-safe GCI library ,  include  gcits.hf instead of gci.hf 
  and call GciTsLoad instead of GciRtlLoad .  

Dale

On 8/7/17 10:29 PM, gustav de ridder via Glass wrote:
Hallo

I am new to gemstone and still leaning c.
I am writing c code for gembuilder for c.

I wrote a c program that includes gci.hf and gcirtl.hf as specified  in the GemBuilder for C documentation.

I am using Ubuntu 16.04.1 LTS 64bit, GemStone/S 64 Bit v3.3.3. I use gcc/g++ version 5.4.0 20160609 to compile the code.

I am using the next commands to compile the code.

Compile c code:
$ g++ -fmessage-length=0 -fcheck-new -O3 -ggdb -m64 -pipe -D_REENTRANT -D_GNU_SOURCE -pthread -fPIC -fno-strict-aliasing -fno-exceptions -I/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/include -x c++ -c userCode.c -o userCode.o

Link c objects:
$ g++ userCode.o $GEMSTONE/lib/gcirtlobj.o -Wl,-traditional -Wl,--warn-unresolved-symbols -m64 -lpthread -lcrypt -ldl -lc -lm -lrt -lpam -lpam_misc -Wl,-z,muldefs -o userAppl

Can you please help me by giving some suggestions on debugging the code?

When I compile and link the c code I get the following warnings:
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufHolder::free()':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:61: warning: undefined reference to `GciFree'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufType::malloc(unsigned long, int, char const*)':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:33: warning: undefined reference to `GciUtlMalloc_'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciRtlUnload':
/export/derby1/users/buildgss/33/build40760/src/gcirtl.c:189: warning: undefined reference to `GciShutdown'
/export/derby1/users/buildgss/33/build40760/src/gcirtl.c:190: warning: undefined reference to `GciUnload'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufType::GciTravBufType(unsigned long)':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:45: warning: undefined reference to `GciHostCallDebuggerMsg'

How do I go about addressing these warnings?

I had some problems importing the pam libs, the system could not locate them. I installed libpam0g-dev this solved the problem. Should I have done something else?

Are there any more libs that is recommended to install?

Any pointers and advice will be appreciated.

Thanking you in advance
Gustav


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass
Reply | Threaded
Open this post in threaded view
|

Re: C code for Gembuilder For C

GLASS mailing list
Dale, Allen

Thank you very much for the quick response, I appreciate it.

Regards
Gustav

On Tue, Aug 8, 2017 at 7:39 PM, Dale Henrichs via Glass <[hidden email]> wrote:

Gustav,

Here'sthe answer from engineering:

  The warnings about undefined Gci*   symbols is normal.
  Those functions are resolved at runtime after one of the  $GEMSTONE/lib/libgci*.so  
  library is loaded.  The library load is normally accomplished by
  calling  GciRtlLoad   or GciTsLoad  from your application's initialization code .

  See comments on gcirtl.hf for GciRtlLoad and GciTsLoad
  The "default path" is  $GEMSTONE/lib  

  libpam0g-dev is an appropriate package .

  If using the thread-safe GCI library ,  include  gcits.hf instead of gci.hf 
  and call GciTsLoad instead of GciRtlLoad .  

Dale


On 8/7/17 10:29 PM, gustav de ridder via Glass wrote:
Hallo

I am new to gemstone and still leaning c.
I am writing c code for gembuilder for c.

I wrote a c program that includes gci.hf and gcirtl.hf as specified  in the GemBuilder for C documentation.

I am using Ubuntu 16.04.1 LTS 64bit, GemStone/S 64 Bit v3.3.3. I use gcc/g++ version 5.4.0 20160609 to compile the code.

I am using the next commands to compile the code.

Compile c code:
$ g++ -fmessage-length=0 -fcheck-new -O3 -ggdb -m64 -pipe -D_REENTRANT -D_GNU_SOURCE -pthread -fPIC -fno-strict-aliasing -fno-exceptions -I/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/include -x c++ -c userCode.c -o userCode.o

Link c objects:
$ g++ userCode.o $GEMSTONE/lib/gcirtlobj.o -Wl,-traditional -Wl,--warn-unresolved-symbols -m64 -lpthread -lcrypt -ldl -lc -lm -lrt -lpam -lpam_misc -Wl,-z,muldefs -o userAppl

Can you please help me by giving some suggestions on debugging the code?

When I compile and link the c code I get the following warnings:
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufHolder::free()':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:61: warning: undefined reference to `GciFree'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufType::malloc(unsigned long, int, char const*)':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:33: warning: undefined reference to `GciUtlMalloc_'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciRtlUnload':
/export/derby1/users/buildgss/33/build40760/src/gcirtl.c:189: warning: undefined reference to `GciShutdown'
/export/derby1/users/buildgss/33/build40760/src/gcirtl.c:190: warning: undefined reference to `GciUnload'
/opt/gemstone/GemStone64Bit3.3.3-x86_64.Linux/lib/gcirtlobj.o: In function `GciTravBufType::GciTravBufType(unsigned long)':
/export/derby1/users/buildgss/33/build40760/src/gcicpp.hc:45: warning: undefined reference to `GciHostCallDebuggerMsg'

How do I go about addressing these warnings?

I had some problems importing the pam libs, the system could not locate them. I installed libpam0g-dev this solved the problem. Should I have done something else?

Are there any more libs that is recommended to install?

Any pointers and advice will be appreciated.

Thanking you in advance
Gustav


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass


_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass



_______________________________________________
Glass mailing list
[hidden email]
http://lists.gemtalksystems.com/mailman/listinfo/glass