I wonder if anyone can help me with a problem that is making me pull what's left of my hair out...
I am currently working on a project that requires me to talk to a Unidata database. PHP has no native driver to access this type of database, however, after some Googling, I found the following:
https://u2devzone.rocketsoftware.com/accelerate/articles/u2-pdo-driver/u2-pdo-driver.
I have the U2 Intercall header and library and I think I am including them correctly. However, the extension compiles but does not pass the tests as it errors out with
pdo_u2.so: undefined symbol: ic_universe_session in Unknown on line 0
which suggests to me that it is not being linked against the library. When I edit the makefile and specify by hand that the library should be included, it errors out with
relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
/home/kaigoh/Downloads/intcall/lib/libuvic.a: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [pdo_u2.la] Error 1
I have tried forcing the -fPIC switch in the makefile but I get the same error.
I simply do not know enough about compiling custom PHP extensions to assist myself, and I am hoping there is a guru here who can point me in the right direction!
UPDATE: This compiles perfectly using a 32-bit install of Linux, so no idea why it is failing with a 64-bit install...
I know I asked this question a long while back, but the ultimate solution I came up with was to write a piece of middleware in C# with the .Net libraries from Rocket along with some PHP classes that can read and process the data from UniData.
If anyone is interested in more detail in how I accessed UniData from PHP, please feel free to drop me a line.