[HACKERS] Mag Gam
http://outlet.vanlooken.com/qqwcl/yqlivfckw.rcxaekidbyraanhw Mag Gam 7/21/2013 7:23:01 AM -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Compiling tsearch2 on AIX
I am trying to compile PostgreSQL 8.0.3/tsearch2 contrib module on AIX 5.2 ML 3 gcc version 3.3.2 GNU Make 3.80 bash-2.05b# gmake gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -I./snowball -I./ispell -I./wordparser -I. -I../../src/include -c -o dict_ex.o dict_ex.c In file included from ../../src/include/c.h:64, from ../../src/include/postgres.h:48, from dict_ex.c:9: /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:484: error: conflicting types for `fgetpos64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:310: error: previous declaration of `fgetpos64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:487: error: conflicting types for `fseeko64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:430: error: previous declaration of `fseeko64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:488: error: conflicting types for `fsetpos64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:312: error: previous declaration of `fsetpos64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:489: error: conflicting types for `ftello64' /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:431: error: previous declaration of `ftello64' gmake: *** [dict_ex.o] Error 1 Can someone please let me know why this is happening? ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [HACKERS] Compiling tsearch2 on AIX
Thanks for the reply Tom! I managed to get the cvs version and I made more progress compiling tsearch2 Here is where it errors out. touch libtsearch2.a ../../src/backend/port/aix/mkldexport.sh libtsearch2.a > libtsearch2.exp gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels -fno-strict-aliasing -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE -o libtsearch2.so libtsearch2.a -L../../src/port -L../../src/port -lm -Wl,-bI:../../src/backend/postgres.imp -Wl,-bE:libtsearch2.exp ld: 0711-317 ERROR: Undefined symbol: .get_share_path ld: 0711-317 ERROR: Undefined symbol: .pg_strncasecmp ld: 0711-317 ERROR: Undefined symbol: .pg_strcasecmp ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. collect2: ld returned 8 exit status gmake: *** [libtsearch2.so] Error 1 Any ideas? TIA On 5/17/05, Tom Lane <[EMAIL PROTECTED]> wrote: > Mag Gam <[EMAIL PROTECTED]> writes: > > I am trying to compile PostgreSQL 8.0.3/tsearch2 contrib module on AIX 5.2 > > ML 3 > > > /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:484: > > error: conflicting types for `fgetpos64' > > /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:310: > > error: previous declaration of `fgetpos64' > > I'm just guessing, but this smells to me like a problem with largefile- > vs-not-largefile support. We discovered long ago that when pg_config.h > defines _FILE_OFFSET_BITS or _LARGEFILE_SOURCE, it's critical that the > compiler see that *before* it includes stdio.h. Unfortunately it seems > this hard-won knowledge didn't get propagated into tsearch2 until just > recently :-(. Try applying the tsearch2 changes linked here: > http://archives.postgresql.org/pgsql-committers/2005-05/msg00068.php > and let us know if that helps. I have not back-patched these changes > into existing release branches, but if it turns out to address a real > problem-seen-in-the-field then that should get done ... > > regards, tom lane > ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings
Re: [HACKERS] Compiling tsearch2 on AIX
Tom: Got it working! I had to modify this line in the tsearch2 Makefile from SHLIB_LINK := -lm to SHLIB_LINK := -lm -lpgport it works like a charm! thanks for your help! On 5/18/05, Mag Gam <[EMAIL PROTECTED]> wrote: > Thanks for the reply Tom! > > I managed to get the cvs version and I made more progress compiling tsearch2 > > Here is where it errors out. > > > > touch libtsearch2.a > ../../src/backend/port/aix/mkldexport.sh libtsearch2.a > libtsearch2.exp > gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wendif-labels > -fno-strict-aliasing -Wl,-bnoentry -Wl,-H512 -Wl,-bM:SRE -o > libtsearch2.so libtsearch2.a -L../../src/port -L../../src/port -lm > -Wl,-bI:../../src/backend/postgres.imp -Wl,-bE:libtsearch2.exp > ld: 0711-317 ERROR: Undefined symbol: .get_share_path > ld: 0711-317 ERROR: Undefined symbol: .pg_strncasecmp > ld: 0711-317 ERROR: Undefined symbol: .pg_strcasecmp > ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information. > collect2: ld returned 8 exit status > gmake: *** [libtsearch2.so] Error 1 > > Any ideas? > > TIA > > > On 5/17/05, Tom Lane <[EMAIL PROTECTED]> wrote: > > Mag Gam <[EMAIL PROTECTED]> writes: > > > I am trying to compile PostgreSQL 8.0.3/tsearch2 contrib module on AIX > > > 5.2 ML 3 > > > > > /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:484: > > > error: conflicting types for `fgetpos64' > > > /opt/freeware/lib/gcc-lib/powerpc-ibm-aix5.2.0.0/3.3.2/include/stdio.h:310: > > > error: previous declaration of `fgetpos64' > > > > I'm just guessing, but this smells to me like a problem with largefile- > > vs-not-largefile support. We discovered long ago that when pg_config.h > > defines _FILE_OFFSET_BITS or _LARGEFILE_SOURCE, it's critical that the > > compiler see that *before* it includes stdio.h. Unfortunately it seems > > this hard-won knowledge didn't get propagated into tsearch2 until just > > recently :-(. Try applying the tsearch2 changes linked here: > > http://archives.postgresql.org/pgsql-committers/2005-05/msg00068.php > > and let us know if that helps. I have not back-patched these changes > > into existing release branches, but if it turns out to address a real > > problem-seen-in-the-field then that should get done ... > > > > regards, tom lane > > > ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [HACKERS] 8.1 Release Candidate 1 Coming ...
Is this issue only on AIX 5.3 ML1 thru ML 3? Does the build work fine with 5.2 (ALL MLs)? On 10/31/05, Tom Lane <[EMAIL PROTECTED]> wrote: > Chris Browne <[EMAIL PROTECTED]> writes: > > [EMAIL PROTECTED] (Tom Lane) writes: > >> (My guess is that the problem is a compiler or libc bug anyway, > >> given that one report says that replacing a memcpy call with an > >> equivalent loop makes the failure go away.) > > > It seems unlikely to be a compiler bug as the same issue has been > > reported with both GCC and IBM XLC. I could believe it being a libc > > bug... > > As best I can tell after poking at it on Stefan's machine, it's a linker > bug, or else there is something strange about memcpy as compared to, > say, memcmp. A function pointer to memcmp works, a function pointer to > memcpy contains a bogus value that points entirely outside the program's > address space. This despite the assembly code that generates them > looking just the same in both cases, viz > > LC..12: > .tc memcmp[TC],memcmp[DS] > LC..14: > .tc memcpy[TC],memcpy[DS] > > Even more interesting, if you start the postmaster under gdb and examine > the pointer, then set a breakpoint at "main" and say "run", by the time > control arrives at main() the bogus value has changed to a different > bogus value. So something in the basic C runtime support is frobbing it > --- incorrectly :-(. I think all the signs point to incorrect > relocation data generated by the linker, though I have no idea why only > memcpy would be affected. > > > It would be terribly disappointing to have to report both internally > > and externally that AIX 5.3 is not a usable platform for recent > > releases of PostgreSQL... > > According to Stefan it broke between 5.3ML1 and 5.3ML3. I suggest > filing a defect report with IBM. We're not going to stop using memcpy > because one version of one platform is broken. > > regards, tom lane > > ---(end of broadcast)--- > TIP 5: don't forget to increase your free space map settings > ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq