Following my earlier post about memory limit in 32 bit programs in AIX
http://www.gnu-pascal.de/crystal/gpc/en/mail11103.html
I am now trying to get around the memory limitations by using 64 bit program with GPC. I am using the -maix64 flag. I can build a simple c program using GCC and this flag. When I try to do this for a simple pascal program I get linking problems. I get this using both GNU LD 2.14 or the AIX linker.
This is probably a simple path or library problem, I would be very grateful for any suggestions.
gpc -g3 -maix64 testmem.pas
gives
/tmp//ccGWEOVZ.o(.pr+0x2c): In function `.pascal_main_program': testmem.pas:17: undefined reference to `._p_New' /tmp//ccGWEOVZ.o(.pr+0x72):testmem.pas:19: undefined reference to `_p_Output' /tmp//ccGWEOVZ.o(.pr+0x7c):testmem.pas: undefined reference to `._p_Write_Init' /tmp//ccGWEOVZ.o(.pr+0x86):testmem.pas: undefined reference to `_p_InOutRes' /tmp//ccGWEOVZ.o(.pr+0x96):testmem.pas: undefined reference to `_p_Output' /tmp//ccGWEOVZ.o(.pr+0xac):testmem.pas: undefined reference to `._p_Write_String' /tmp//ccGWEOVZ.o(.pr+0xb6):testmem.pas: undefined reference to `_p_Output' /tmp//ccGWEOVZ.o(.pr+0xc8):testmem.pas: undefined reference to `._p_Write_Integer' /tmp//ccGWEOVZ.o(.pr+0xd2):testmem.pas: undefined reference to `_p_Output' /tmp//ccGWEOVZ.o(.pr+0xd8):testmem.pas: undefined reference to `._p_Write_Line' /tmp//ccGWEOVZ.o(.pr+0xe2):testmem.pas: undefined reference to `_p_Output' /tmp//ccGWEOVZ.o(.pr+0xe8):testmem.pas: undefined reference to `._p_Write_Flush' /tmp//ccGWEOVZ.o(.pr+0xf2):testmem.pas: undefined reference to `_p_InOutRes' /tmp//ccGWEOVZ.o(.pr+0x100):testmem.pas: undefined reference to `._p_CheckInOutRes' /tmp//ccGWEOVZ.o(.pr+0x1b0): In function `.init_pascal_main_program': testmem.pas:22: undefined reference to `._p_DoInitProc' /tmp//ccGWEOVZ.o(.pr+0x21e): In function `.main': testmem.pas:22: undefined reference to `_p_GPC_RTS_VERSION_20041017'
Peter Keenan wrote:
Following my earlier post about memory limit in 32 bit programs in AIX
http://www.gnu-pascal.de/crystal/gpc/en/mail11103.html
I am now trying to get around the memory limitations by using 64 bit program with GPC. I am using the -maix64 flag. I can build a simple c program using GCC and this flag. When I try to do this for a simple pascal program I get linking problems. I get this using both GNU LD 2.14 or the AIX linker.
This is probably a simple path or library problem, I would be very grateful for any suggestions.
gpc -g3 -maix64 testmem.pas
GCC needs separate 32-bit and 64-bit libraries. When GCC is build all needed libraries are build automatically (it is called multilib support). Unfortunatly, GPC currently only builds libraries for default architecture.
The simplest way to solve the problem is to recompile GPC making 64-bit as default. Something like:
configure --target=powerpc64-aix
should do. Be careful not to wipe-out 32-bit version if you need it (the compiler will be installed as `powerpc64-aix-gpc', but there is a risk that it will overwrite plain `gpc').
All you need is really 64-bit version of `libgpc.a'. If you put it in proper directory your original command should work.