Re: Compiling on 8.1.3 on Openserver 5.05
От | Mark Campbell |
---|---|
Тема | Re: Compiling on 8.1.3 on Openserver 5.05 |
Дата | |
Msg-id | 446443E5.2000309@ucs-software.co.za обсуждение исходный текст |
Ответ на | Re: Compiling on 8.1.3 on Openserver 5.05 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Compiling on 8.1.3 on Openserver 5.05
|
Список | pgsql-ports |
I added your bit of code to the gettaddrinfo.c file, ran gmake, and then got an error on the same h_errno with a different file "thread.c"
gmake -C doc all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake -C src all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake -C port all
gmake[2]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o getaddrinfo.o getaddrinfo.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o getopt_long.o getopt_long.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o snprintf.o snprintf.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o copydir.o copydir.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o dirmod.o dirmod.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o exec.o exec.cgcc -b elf -O2 -Wall -Wmissing-prototypes-Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o noblock.o noblock.c
echo "#define PGBINDIR \"/usr/local/pgsql/bin\"" >pg_config_paths.h
echo "#define PGSHAREDIR \"/usr/local/pgsql/share\"" >>pg_config_paths.h
echo "#define SYSCONFDIR \"/usr/local/pgsql/etc\"" >>pg_config_paths.h
echo "#define INCLUDEDIR \"/usr/local/pgsql/include\"" >>pg_config_paths.h
echo "#define PKGINCLUDEDIR \"/usr/local/pgsql/include\"" >>pg_config_paths.h
echo "#define INCLUDEDIRSERVER \"/usr/local/pgsql/include/server\"" >>pg_config_paths.h
echo "#define LIBDIR \"/usr/local/pgsql/lib\"" >>pg_config_paths.h
echo "#define PKGLIBDIR \"/usr/local/pgsql/lib\"" >>pg_config_paths.h
echo "#define LOCALEDIR \"\"" >>pg_config_paths.h
echo "#define DOCDIR \"/usr/local/pgsql/doc\"" >>pg_config_paths.h
echo "#define MANDIR \"/usr/local/pgsql/man\"" >>pg_config_paths.h
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o path.o path.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o pipe.o pipe.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o pgsleep.o pgsleep.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o pgstrcasecmp.o pgstrcasecmp.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o sprompt.o sprompt.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c thread.c
thread.c: In function `pqGethostbyname':
thread.c:149: `h_errno' undeclared (first use in this function)
thread.c:149: (Each undeclared identifier is reported only once
thread.c:149: for each function it appears in.)
gmake[2]: *** [thread.o] Error 1
gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake: *** [all] Error 2
Then I added your code into the thread.c file and got the command "ar" not found. If have searched for the "ar" command, but it is not on my system.
ksh# gmake
gmake -C doc all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake -C src all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake -C port all
gmake[2]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
ar cr libpgport.a isinf.o fseeko.o unsetenv.o getaddrinfo.o getopt_long.o snprintf.o copydir.o dirmod.o exec.o noblock.o path.o pipe.o pgsleep.o pgstrcasecmp.osprompt.o thread.o
gmake[2]: ar: Command not found
gmake[2]: *** [libpgport.a] Error 127
gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake: *** [all] Error 2
ksh#
Back to ftp Caldera and found "ar", now gmake runs for quite some time and after a while I get the next error:
gmake -C transam SUBSYS.o
gmake[4]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend/access/transam'gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o clog.o clog.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o transam.o transam.cgcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith-Winline -fno-strict-aliasing -I../../../../src/include -c -o varsup.o varsup.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o xact.o xact.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o xlog.o xlog.c
/usr/tmp/cczOwssE.s:651:syntax error at name: f
/usr/tmp/cczOwssE.s:654:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:1092:syntax error at name: f
/usr/tmp/cczOwssE.s:1095:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:1541:syntax error at name: f
/usr/tmp/cczOwssE.s:1544:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:2218:syntax error at name: f
/usr/tmp/cczOwssE.s:2221:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:2327:syntax error at name: f
/usr/tmp/cczOwssE.s:2330:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:10457:syntax error at name: f
/usr/tmp/cczOwssE.s:10460:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:10732:syntax error at name: f
/usr/tmp/cczOwssE.s:10735:syntax error at integer constant: 1
gmake[4]: *** [xlog.o] Error 1
gmake[4]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend/access/transam'
gmake[3]: *** [transam-recursive] Error 2
gmake[3]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend/access'
gmake[2]: *** [access-recursive] Error 2
gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake: *** [all] Error 2
ksh#
Now I seem to be lost again
Tom Lane wrote:
gmake -C doc all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake -C src all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake -C port all
gmake[2]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o getaddrinfo.o getaddrinfo.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o getopt_long.o getopt_long.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o snprintf.o snprintf.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o copydir.o copydir.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o dirmod.o dirmod.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o exec.o exec.cgcc -b elf -O2 -Wall -Wmissing-prototypes-Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o noblock.o noblock.c
echo "#define PGBINDIR \"/usr/local/pgsql/bin\"" >pg_config_paths.h
echo "#define PGSHAREDIR \"/usr/local/pgsql/share\"" >>pg_config_paths.h
echo "#define SYSCONFDIR \"/usr/local/pgsql/etc\"" >>pg_config_paths.h
echo "#define INCLUDEDIR \"/usr/local/pgsql/include\"" >>pg_config_paths.h
echo "#define PKGINCLUDEDIR \"/usr/local/pgsql/include\"" >>pg_config_paths.h
echo "#define INCLUDEDIRSERVER \"/usr/local/pgsql/include/server\"" >>pg_config_paths.h
echo "#define LIBDIR \"/usr/local/pgsql/lib\"" >>pg_config_paths.h
echo "#define PKGLIBDIR \"/usr/local/pgsql/lib\"" >>pg_config_paths.h
echo "#define LOCALEDIR \"\"" >>pg_config_paths.h
echo "#define DOCDIR \"/usr/local/pgsql/doc\"" >>pg_config_paths.h
echo "#define MANDIR \"/usr/local/pgsql/man\"" >>pg_config_paths.h
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o path.o path.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o pipe.o pipe.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o pgsleep.o pgsleep.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o pgstrcasecmp.o pgstrcasecmp.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c -o sprompt.o sprompt.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../src/port -DFRONTEND -I../../src/include -c thread.c
thread.c: In function `pqGethostbyname':
thread.c:149: `h_errno' undeclared (first use in this function)
thread.c:149: (Each undeclared identifier is reported only once
thread.c:149: for each function it appears in.)
gmake[2]: *** [thread.o] Error 1
gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake: *** [all] Error 2
Then I added your code into the thread.c file and got the command "ar" not found. If have searched for the "ar" command, but it is not on my system.
ksh# gmake
gmake -C doc all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake[1]: Nothing to be done for `all'.
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/doc'
gmake -C src all
gmake[1]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake -C port all
gmake[2]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
ar cr libpgport.a isinf.o fseeko.o unsetenv.o getaddrinfo.o getopt_long.o snprintf.o copydir.o dirmod.o exec.o noblock.o path.o pipe.o pgsleep.o pgstrcasecmp.osprompt.o thread.o
gmake[2]: ar: Command not found
gmake[2]: *** [libpgport.a] Error 127
gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/port'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake: *** [all] Error 2
ksh#
Back to ftp Caldera and found "ar", now gmake runs for quite some time and after a while I get the next error:
gmake -C transam SUBSYS.o
gmake[4]: Entering directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend/access/transam'gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o clog.o clog.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o transam.o transam.cgcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith-Winline -fno-strict-aliasing -I../../../../src/include -c -o varsup.o varsup.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o xact.o xact.c
gcc -b elf -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -fno-strict-aliasing -I../../../../src/include -c -o xlog.o xlog.c
/usr/tmp/cczOwssE.s:651:syntax error at name: f
/usr/tmp/cczOwssE.s:654:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:1092:syntax error at name: f
/usr/tmp/cczOwssE.s:1095:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:1541:syntax error at name: f
/usr/tmp/cczOwssE.s:1544:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:2218:syntax error at name: f
/usr/tmp/cczOwssE.s:2221:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:2327:syntax error at name: f
/usr/tmp/cczOwssE.s:2330:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:10457:syntax error at name: f
/usr/tmp/cczOwssE.s:10460:syntax error at integer constant: 1
/usr/tmp/cczOwssE.s:10732:syntax error at name: f
/usr/tmp/cczOwssE.s:10735:syntax error at integer constant: 1
gmake[4]: *** [xlog.o] Error 1
gmake[4]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend/access/transam'
gmake[3]: *** [transam-recursive] Error 2
gmake[3]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend/access'
gmake[2]: *** [access-recursive] Error 2
gmake[2]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src/backend'
gmake[1]: *** [all] Error 2
gmake[1]: Leaving directory `/tmp/mdc_postgres8.1.3/postgresql-8.1.3/src'
gmake: *** [all] Error 2
ksh#
Now I seem to be lost again
Mark Campbell mark.campbell@ucs-software.co.za (011) 712 1521 Confidentiality Notice: http://ucs.co.za/conf.html
Tom Lane wrote:
Mark Campbell <mark.campbell@ucs-software.co.za> writes:and this in resolv.h/** This used to be defined in res_query.c, now it's in herror.c. It was* never extern'd by any *.h file before it was placed here. herror.c is* part of libresolv.a even though it might make more sense in libnetdb.a* or even libnet.a.*/extern int h_errno;So reading the standard isn't high on their to-do list for resolving such questions :-( Although you could probably fix this with #include <resolv.h>, that seems a bit random to me. Why don't you try this instead in getaddrinfo.c: #ifndef h_errnoextern int h_errno;#endif regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 2: Don't 'kill -9' the postmaster
В списке pgsql-ports по дате отправления: