RE: Lessons learned on how to build 7.0.2 on AIX 4.x
От | Darren King |
---|---|
Тема | RE: Lessons learned on how to build 7.0.2 on AIX 4.x |
Дата | |
Msg-id | NDBBJNEIGLIPLCHCMANLIEANCEAA.darrenk@insightdist.com обсуждение исходный текст |
Ответ на | Re: Lessons learned on how to build 7.0.2 on AIX 4.x (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
> > lpgsql.exp > > ld -H512 -bM:SRE -bI:../../../backend/postgres.imp -bE:libplpgsql.exp -o > > libplpg > > sql.so libplpgsql.a -lPW -lcrypt -lld -lnsl -ldl -lm -lcurses -lc > > ld: 0711-327 WARNING: Entry point not found: __start > > ld: 0711-317 ERROR: Undefined symbol: CurrentMemoryContext > > ld: 0711-317 ERROR: Undefined symbol: .MemoryContextAlloc > > ld: 0711-317 ERROR: Undefined symbol: .MemoryContextFree > [more of that] > > Well, yes, these symbols are undefined within plpgsql. They are supposed > to be resolved when you load plpgsql into the server at runtime. Now I am > venturing a guess here that this postgres.imp file is supposed to contain > a list of symbols that are defined by the postmaster and that the > dynamically loadable modules such as plpgsql should not worry about, but > as we saw, this file is not being created correctly. (Perhaps you should > try to move it back to src/backend for the purposes of building plpgsql. > That would at least give it a chance of finding the file.) Exactly that...postgres.imp contains a list of symbols that are available for modules to use to resolve in their code. The script src/backend/port/aix/mkldexport.sh gathers the symbols from postgres.o. Then that list is given to the linker via -bE when making the executable to allow those symbols to be used by external modules. When compiling the other modules, the linker needs to get that file with -bI to tell it that any unresolved symbols that are in postgres.imp will be in the postgres exectable. Did you get it to compile without munging the order of the #includes? On my 4.1.5 system, postgres.h has to the first #include file. Seems there are two different prototypes for getopt in the aix system includes. If unistd.h or math.h are included *before* postgres.h, the bogus prototype is encountered first. There's also a function somewhere in libpq that has an unsigned char parameter that is at odds with the -qchars=signed flag in the aix compile. These are really only problems because I put in -qhalt=w to cause the compile to treat warnings as errors and stop the compile. I believe Andreas wanted to turn this off a while back, but I had always found it useful and rather cool that a project as large as postgres could compile without any warnings whatsoever. darrenk
В списке pgsql-hackers по дате отправления: